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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1820773002: getComputedStyle() should return used value for 'line-height' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index 9ec10b7bc0ac7b305243d9a57c8ee468a912d753..4ceff9dfc80ec4c2cf32326bebe41ae6371f7efc 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -515,11 +515,7 @@ static CSSValueList* valueForContentPositionAndDistributionWithOverflowAlignment
static CSSPrimitiveValue* valueForLineHeight(const ComputedStyle& style)
{
- Length length = style.lineHeight();
- if (length.isNegative())
- return cssValuePool().createIdentifierValue(CSSValueNormal);
-
- return zoomAdjustedPixelValue(floatValueForLength(length, style.getFontDescription().computedSize()), style);
+ return zoomAdjustedPixelValue(style.floatComputedLineHeight(), style);
}
static CSSValueID identifierForFamily(const AtomicString& family)

Powered by Google App Engine
This is Rietveld 408576698