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

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

Issue 2471283004: [css-grid] Fix simplified layout of positioned grid items (Closed)
Patch Set: Created 4 years, 1 month 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/LayoutGrid.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
index 05a01b709fbfee65abbd54397c163e4667c2d148..3a47a2c2fd267c6eae8eeaea5360dcf4222644c0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -472,6 +472,15 @@ void LayoutGrid::repeatTracksSizingIfNeeded(GridSizingData& sizingData,
}
}
+bool LayoutGrid::simplifiedLayout() {
+ // This is a way to protect simplifiedLayout(), as we cannot perform it
+ // on a dirty grid that has positioned items to be layout.
+ if (m_gridIsDirty && posChildNeedsLayout())
+ return false;
+
+ return LayoutBlock::simplifiedLayout();
+}
+
void LayoutGrid::layoutBlock(bool relayoutChildren) {
ASSERT(needsLayout());

Powered by Google App Engine
This is Rietveld 408576698