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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc

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/layout/ng/ng_length_utils.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
index 10b9102d797bb0a73e69da7ab4577a0cb45d9393..f01a9e9353c377e4ddb5b572c52ba2769d9ac944 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
@@ -50,7 +50,7 @@ LayoutUnit resolveBlockLength(const NGConstraintSpace& constraintSpace,
// Make sure that indefinite percentages resolve to NGSizeIndefinite, not to
// a random negative number.
- if (length.hasPercent() &&
+ if (length.isPercentOrCalc() &&
constraintSpace.ContainerSize().block_size == NGSizeIndefinite)
return contentSize;

Powered by Google App Engine
This is Rietveld 408576698