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

Unified Diff: third_party/WebKit/Source/platform/Length.h

Issue 2065243003: [css-sizing] Ensure positive available size on replaced elements Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaselined test. Created 3 years, 11 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 | « third_party/WebKit/Source/core/layout/LayoutReplaced.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/Length.h
diff --git a/third_party/WebKit/Source/platform/Length.h b/third_party/WebKit/Source/platform/Length.h
index e170642da04838abe7a9af02eb25194738d2693b..2928356f840cb5e15efcdbed91539883ee8c4112 100644
--- a/third_party/WebKit/Source/platform/Length.h
+++ b/third_party/WebKit/Source/platform/Length.h
@@ -249,6 +249,13 @@ class PLATFORM_EXPORT Length {
bool isPercentOrCalc() const {
return type() == Percent || type() == Calculated;
}
+ // This group of lengths require layout because they need the containing
+ // block's available size. There might be other reasons that could imply
+ // a Length requiring a layout, but in that case we should re-define the
+ // function that groups all these Lengths.
+ bool isLayoutDependent() const {
+ return isPercentOrCalc() || isFillAvailable() || isFitContent();
+ }
Length blend(const Length& from, double progress, ValueRange range) const {
ASSERT(isSpecified() && from.isSpecified());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutReplaced.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698