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

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

Issue 1017173002: Do not correct for zoom for number line-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 5 years, 9 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
« no previous file with comments | « LayoutTests/fast/css/line-height-number-zoom-get-computed-style-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/LayoutStyleCSSValueMapping.cpp
diff --git a/Source/core/css/LayoutStyleCSSValueMapping.cpp b/Source/core/css/LayoutStyleCSSValueMapping.cpp
index 4c8dbb4a7f6c217611e9f6c83b2b803f3fb056d7..c47287c7fdc23ba411d88908a809859cb0015e4c 100644
--- a/Source/core/css/LayoutStyleCSSValueMapping.cpp
+++ b/Source/core/css/LayoutStyleCSSValueMapping.cpp
@@ -476,7 +476,11 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(const Layout
if (length.isNegative())
return cssValuePool().createIdentifierValue(CSSValueNormal);
- return zoomAdjustedPixelValue(floatValueForLength(length, style.fontDescription().specifiedSize()), style);
+ float floatValue = floatValueForLength(length, style.fontDescription().specifiedSize());
+ if (length.isPercent())
+ return cssValuePool().createValue(floatValue, CSSPrimitiveValue::CSS_PX);
+
+ return zoomAdjustedPixelValue(floatValue, style);
}
static CSSValueID identifierForFamily(const AtomicString& family)
« no previous file with comments | « LayoutTests/fast/css/line-height-number-zoom-get-computed-style-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698