Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: Source/WebCore/css/CSSGrammar.y.in

Issue 13771002: Recalc styles on resize if we have viewport units. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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; }

Powered by Google App Engine
This is Rietveld 408576698