mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 03:47:31 +09:00
Issue #1826 - Support calc() in media queries
This commit is contained in:
parent
19e946c77e
commit
adde59de74
3 changed files with 14 additions and 5 deletions
|
|
@ -310,7 +310,8 @@ nsMediaExpression::Matches(nsPresContext *aPresContext,
|
|||
case nsMediaFeature::eLength:
|
||||
{
|
||||
NS_ASSERTION(actual.IsLengthUnit(), "bad actual value");
|
||||
NS_ASSERTION(required.IsLengthUnit(), "bad required value");
|
||||
NS_ASSERTION(required.IsLengthUnit() || required.IsCalcUnit(),
|
||||
"bad required value");
|
||||
nscoord actualCoord = nsRuleNode::CalcLengthWithInitialFont(
|
||||
aPresContext, actual);
|
||||
nscoord requiredCoord = nsRuleNode::CalcLengthWithInitialFont(
|
||||
|
|
@ -649,7 +650,8 @@ nsMediaQuery::AppendToString(nsAString& aString) const
|
|||
}
|
||||
switch (feature->mValueType) {
|
||||
case nsMediaFeature::eLength:
|
||||
NS_ASSERTION(expr.mValue.IsLengthUnit(), "bad unit");
|
||||
NS_ASSERTION(expr.mValue.IsLengthUnit() || expr.mValue.IsCalcUnit(),
|
||||
"bad unit");
|
||||
// Use 'width' as a property that takes length values
|
||||
// written in the normal way.
|
||||
expr.mValue.AppendToString(eCSSProperty_width, aString,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue