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

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 098c11f63e382eb7aacbf9ab8cdc2a79368075b0..26f7e40714e0ee32d4b688a77fc27252b3d88913 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -461,11 +461,7 @@ static RawPtr<CSSValueList> valueForContentPositionAndDistributionWithOverflowAl
static RawPtr<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.computedLineHeight(), style);
}
static CSSValueID identifierForFamily(const AtomicString& family)

Powered by Google App Engine
This is Rietveld 408576698