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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2216903004: [css-flexbox] Correctly implement contain: size on a flex item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 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/LayoutFlexibleBox.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/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 56fcdcaad14c3c8bea7e21c193d6f9675f918caf..41dba4ef9b60ad6c8700410bd6eb1b2720df4d7f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -710,6 +710,11 @@ static inline bool objectIsRelayoutBoundary(const LayoutObject* object)
if (object->isLayoutScrollbarPart())
return false;
+ // In general we can't relayout a flex item independently of its container; not only is the result
+ // incorrect due to the override size that's set, it also messes with the cached main size on the flexbox.
+ if (object->isBox() && toLayoutBox(object)->isFlexItem())
+ return false;
+
// Inside multicol it's generally problematic to allow relayout roots. The multicol container
// itself may be scheduled for relayout as well (due to other changes that may have happened
// since the previous layout pass), which might affect the column heights, which may affect how
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698