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

Unified Diff: Source/core/css/MediaQueryEvaluator.cpp

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rebased.. Created 7 years 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/MediaQueryEvaluator.cpp
diff --git a/Source/core/css/MediaQueryEvaluator.cpp b/Source/core/css/MediaQueryEvaluator.cpp
index e4154aeb590342538b83553f3b48f6ac4c057576..d4d95f662ce2082e546e7bd7862f7330e49c617c 100644
--- a/Source/core/css/MediaQueryEvaluator.cpp
+++ b/Source/core/css/MediaQueryEvaluator.cpp
@@ -348,7 +348,8 @@ static bool computeLength(CSSValue* value, bool strict, RenderStyle* initialStyl
if (primitiveValue->isLength()) {
// Relative (like EM) and root relative (like REM) units are always resolved against the initial values
// for media queries, hence the two initialStyle parameters.
- result = primitiveValue->computeLength<int>(CSSToLengthConversionData(initialStyle, initialStyle, 1.0 /* zoom */, true /* computingFontSize */));
+ // FIXME: We need to plumb viewport units down to here.
+ result = primitiveValue->computeLength<int>(CSSToLengthConversionData(initialStyle, initialStyle, 0, 1.0 /* zoom */, true /* computingFontSize */));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698