Index: Source/WebCore/css/CSSGrammar.y.in |
diff --git a/Source/WebCore/css/CSSGrammar.y.in b/Source/WebCore/css/CSSGrammar.y.in |
index 32b439831bb4eea5e203e83a85d9cc873d897eb3..003c1a81817c9c9e8f06b37e91748b2b1d6006ab 100644 |
--- a/Source/WebCore/css/CSSGrammar.y.in |
+++ b/Source/WebCore/css/CSSGrammar.y.in |
@@ -1795,10 +1795,26 @@ unary_term: |
parser->m_styleSheet->parserSetUsesRemUnits(true); |
} |
| CHS maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_CHS; } |
- | VW maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VW; } |
- | VH maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VH; } |
- | VMIN maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMIN; } |
- | VMAX maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMAX; } |
+ | VW maybe_space { |
+ $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VW; |
+ if (parser->m_styleSheet) |
+ parser->m_styleSheet->parserSetUsesViewportUnits(true); |
+ } |
+ | VH maybe_space { |
+ $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VH; |
+ if (parser->m_styleSheet) |
+ parser->m_styleSheet->parserSetUsesViewportUnits(true); |
+ } |
+ | VMIN maybe_space { |
+ $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMIN; |
+ if (parser->m_styleSheet) |
+ parser->m_styleSheet->parserSetUsesViewportUnits(true); |
+ } |
+ | VMAX maybe_space { |
+ $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMAX; |
+ if (parser->m_styleSheet) |
+ parser->m_styleSheet->parserSetUsesViewportUnits(true); |
+ } |
| DPPX maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_DPPX; } |
| DPI maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_DPI; } |
| DPCM maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_DPCM; } |