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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index eadfef9c82765fe03c6eccf06e10c2f8e1529a44..33a03be7f65ed6108c7891a73c4d95196bc00699 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -404,6 +404,12 @@ 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() &&
mstensho (USE GERRIT) 2016/11/04 08:49:12 I.e. oldStyle->hasOutOfFlowPosition() && style()->
Manuel Rego 2016/11/04 09:29:17 Acknowledged.
+ 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.

Powered by Google App Engine
This is Rietveld 408576698