Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index 96dffc7295543f0d1fcc1c1ffffd2c87c9d34458..778f7231902a33592f5e7975dfa2b9ddbe7095c3 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -247,8 +247,10 @@ bool CSSPropertyParser::validUnit(CSSParserValue* value, Units unitflags, CSSPar |
return false; |
case CSSPrimitiveValue::CSS_PERCENTAGE: |
return unitflags & FPercent; |
- // TODO(timloh): Restrict usage of __qem to UA sheets |
case CSSParserValue::Q_EMS: |
+ if (cssParserMode != UASheetMode) |
+ return false; |
+ /* fallthrough intentional */ |
case CSSPrimitiveValue::CSS_EMS: |
case CSSPrimitiveValue::CSS_REMS: |
case CSSPrimitiveValue::CSS_CHS: |