Loading layout/style/nsCSSParser.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -7876,8 +7876,10 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue, (eCSSToken_Function == tk->mType) && (tk->mIdent.LowerCaseEqualsLiteral("calc") || tk->mIdent.LowerCaseEqualsLiteral("-moz-calc"))) { // calc() currently allows only lengths and percents inside it. if (!ParseCalc(aValue, aVariantMask & VARIANT_LP)) { // calc() currently allows only lengths and percents and number inside it. // And note that in current implementation, number cannot be mixed with // length and percent. if (!ParseCalc(aValue, aVariantMask & VARIANT_LPN)) { return CSSParseResult::Error; } return CSSParseResult::Ok; Loading Loading @@ -12960,7 +12962,6 @@ CSSParserImpl::ParseCalc(nsCSSValue &aValue, uint32_t aVariantMask) // for a token that is *either* a value of the property or a number. // This can be done without lookahead when we assume that the property // values cannot themselves be numbers. NS_ASSERTION(!(aVariantMask & VARIANT_NUMBER), "unexpected variant mask"); MOZ_ASSERT(aVariantMask != 0, "unexpected variant mask"); bool oldUnitlessLengthQuirk = mUnitlessLengthQuirk; Loading layout/style/nsCSSValue.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -812,7 +812,9 @@ struct CSSValueSerializeCalcOps { void AppendLeafValue(const input_type& aValue) { MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Percent || aValue.IsLengthUnit(), MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Percent || aValue.IsLengthUnit() || aValue.GetUnit() == eCSSUnit_Number, "unexpected unit"); aValue.AppendToString(mProperty, mResult, mValueSerialization); } Loading Loading
layout/style/nsCSSParser.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -7876,8 +7876,10 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue, (eCSSToken_Function == tk->mType) && (tk->mIdent.LowerCaseEqualsLiteral("calc") || tk->mIdent.LowerCaseEqualsLiteral("-moz-calc"))) { // calc() currently allows only lengths and percents inside it. if (!ParseCalc(aValue, aVariantMask & VARIANT_LP)) { // calc() currently allows only lengths and percents and number inside it. // And note that in current implementation, number cannot be mixed with // length and percent. if (!ParseCalc(aValue, aVariantMask & VARIANT_LPN)) { return CSSParseResult::Error; } return CSSParseResult::Ok; Loading Loading @@ -12960,7 +12962,6 @@ CSSParserImpl::ParseCalc(nsCSSValue &aValue, uint32_t aVariantMask) // for a token that is *either* a value of the property or a number. // This can be done without lookahead when we assume that the property // values cannot themselves be numbers. NS_ASSERTION(!(aVariantMask & VARIANT_NUMBER), "unexpected variant mask"); MOZ_ASSERT(aVariantMask != 0, "unexpected variant mask"); bool oldUnitlessLengthQuirk = mUnitlessLengthQuirk; Loading
layout/style/nsCSSValue.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -812,7 +812,9 @@ struct CSSValueSerializeCalcOps { void AppendLeafValue(const input_type& aValue) { MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Percent || aValue.IsLengthUnit(), MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Percent || aValue.IsLengthUnit() || aValue.GetUnit() == eCSSUnit_Number, "unexpected unit"); aValue.AppendToString(mProperty, mResult, mValueSerialization); } Loading