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

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

Issue 2471283004: [css-grid] Fix simplified layout of positioned grid items (Closed)
Patch Set: Remove unneeded line in test. 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index eadfef9c82765fe03c6eccf06e10c2f8e1529a44..2cfa6705e532e5ee1a0bd93402cee3c2df57fc14 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -404,6 +404,11 @@ void LayoutBox::updateGridPositionAfterStyleChange(
oldStyle->hasOutOfFlowPosition() == style()->hasOutOfFlowPosition())
return;
+ // Positioned items don't participate on the layout of the grid,
+ // so we don't need to mark the grid as dirty if they change positions.
+ if (oldStyle->hasOutOfFlowPosition() && style()->hasOutOfFlowPosition())
+ return;
+
// It should be possible to not dirty the grid in some cases (like moving an
// explicitly placed grid item).
// For now, it's more simple to just always recompute the grid.
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698