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

Unified Diff: Source/core/css/CSSParser-in.cpp

Issue 23604037: Recompute percentage based @viewport on resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issue Created 7 years, 3 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/core/css/CSSParser-in.cpp
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index 8907000f6087060f6bb068e600e091bfa4c0c538..a6fada511198fc1d19af6e55abf927e0b1442191 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -1679,6 +1679,13 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
if (!value)
return false;
+ if (inViewport()) {
+ if (!RuntimeEnabledFeatures::cssViewportEnabled())
+ return false;
+
+ return parseViewportProperty(propId, important);
+ }
+
// Note: m_parsedCalculation is used to pass the calc value to validUnit and then cleared at the end of this function.
// FIXME: This is to avoid having to pass parsedCalc to all validUnit callers.
ASSERT(!m_parsedCalculation);
@@ -1716,13 +1723,6 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
return true;
}
- if (inViewport()) {
- if (!RuntimeEnabledFeatures::cssViewportEnabled())
- return false;
-
- return parseViewportProperty(propId, important);
- }
-
bool validPrimitive = false;
RefPtr<CSSValue> parsedValue;

Powered by Google App Engine
This is Rietveld 408576698