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

Unified Diff: third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp

Issue 2286543002: Add Length::isPercent and use it in tables. (Closed)
Patch Set: rebase Created 4 years, 3 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/animation/LengthPropertyFunctions.cpp
diff --git a/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp
index 87b7b2f5e88a05a8be4cae1fb6e67613110c3d06..a4550f0adb09462d0d96334b7654f1702b643f16 100644
--- a/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp
@@ -277,7 +277,7 @@ bool LengthPropertyFunctions::getLength(CSSPropertyID property, const ComputedSt
return true;
case CSSPropertyLineHeight:
// Percent Lengths are used to represent numbers on line-height.
- if (style.specifiedLineHeight().hasPercent())
+ if (style.specifiedLineHeight().isPercentOrCalc())
return false;
result = style.specifiedLineHeight();
return true;
@@ -414,7 +414,7 @@ bool LengthPropertyFunctions::setLength(CSSPropertyID property, ComputedStyle& s
case CSSPropertyLineHeight:
// Percent Lengths are used to represent numbers on line-height.
- if (value.hasPercent())
+ if (value.isPercentOrCalc())
return false;
style.setLineHeight(value);
return true;

Powered by Google App Engine
This is Rietveld 408576698