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

Unified Diff: Source/core/css/resolver/ViewportStyleResolver.cpp

Issue 705783002: Decouple font unit conversion in computeLengthDouble from RenderStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Forgot to remove ASSERT(rootStyle). Created 6 years, 1 month 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
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ViewportStyleResolver.cpp
diff --git a/Source/core/css/resolver/ViewportStyleResolver.cpp b/Source/core/css/resolver/ViewportStyleResolver.cpp
index dba44849fda6c31920b9f4b1becb7e06c1d2f090..904f3bcf00903c1c8096b158113f6eae2ca774f9 100644
--- a/Source/core/css/resolver/ViewportStyleResolver.cpp
+++ b/Source/core/css/resolver/ViewportStyleResolver.cpp
@@ -189,7 +189,9 @@ Length ViewportStyleResolver::viewportLengthValue(CSSPropertyID id) const
float width = view ? view->width() : 0;
float height = view ? view->height() : 0;
- Length result = primitiveValue->convertToLength<AnyConversion>(CSSToLengthConversionData(documentStyle, documentStyle, width, height, 1.0f));
+ CSSToLengthConversionData::FontSizes fontSizes(documentStyle, documentStyle);
+ CSSToLengthConversionData::ViewportSize viewportSize(width, height);
+ Length result = primitiveValue->convertToLength<AnyConversion>(CSSToLengthConversionData(documentStyle, fontSizes, viewportSize, 1.0f));
if (documentStyle->hasViewportUnits())
m_document->setHasViewportUnits();
documentStyle->setHasViewportUnits(documentStyleHasViewportUnits);
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698