Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index e27fa5ce66af073d3b35c869321c000938253407..cffe32059f73b005caa7b01c061ff38a45a36e6e 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -90,12 +90,13 @@ CSSPropertyParser::CSSPropertyParser(CSSParserValueList* valueList, |
, m_inParseShorthand(0) |
, m_currentShorthand(CSSPropertyInvalid) |
, m_implicitShorthand(false) |
+ , m_usesRems(false) |
{ |
} |
bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool important, |
CSSParserValueList* valueList, const CSSParserContext& context, |
- WillBeHeapVector<CSSProperty, 256>& parsedProperties, StyleRule::Type ruleType) |
+ WillBeHeapVector<CSSProperty, 256>& parsedProperties, StyleRule::Type ruleType, bool &usesRems) |
{ |
int parsedPropertiesSize = parsedProperties.size(); |
@@ -118,6 +119,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
if (!parseSuccess) |
parser.rollbackLastProperties(parsedProperties.size() - parsedPropertiesSize); |
+ else |
+ usesRems = parser.m_usesRems; |
return parseSuccess; |
} |
@@ -382,6 +385,10 @@ inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPr |
return cssValuePool().createIdentifierValue(identifier); |
if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ) |
return createPrimitiveNumericValue(value); |
+ if (value->unit == CSSPrimitiveValue::CSS_REMS) { |
Timothy Loh
2015/06/17 01:35:18
Probably better in createPrimitiveNumericValue, I
|
+ m_usesRems = true; |
+ return createPrimitiveNumericValue(value); |
+ } |
if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_CHS) |
return createPrimitiveNumericValue(value); |
if (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMAX) |