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

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

Issue 2513953002: [css-grid] Avoid double loop in positioned objects layout (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 cb52b7acaa913ca94f88f90c69cc728421147d4e..b727972cb354e9d01de455ebf1e1656eab40389b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -2482,17 +2482,11 @@ void LayoutGrid::prepareChildForPositionedLayout(LayoutBox& child) {
childLayer->setStaticBlockPosition(borderAndPaddingBefore());
}
-void LayoutGrid::layoutPositionedObjects(bool relayoutChildren,
- PositionedLayoutBehavior info) {
- TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects();
- if (!positionedDescendants)
- return;
-
- for (auto* child : *positionedDescendants) {
- if (isOrthogonalChild(*child)) {
- // FIXME: Properly support orthogonal writing mode.
- continue;
- }
+void LayoutGrid::layoutPositionedObject(LayoutBox* child,
jfernandez 2016/11/18 16:18:22 Ditto.
+ bool relayoutChildren,
+ PositionedLayoutBehavior info) {
+ if (!isOrthogonalChild(*child)) {
+ // FIXME: Properly support orthogonal writing mode.
LayoutUnit columnOffset = LayoutUnit();
LayoutUnit columnBreadth = LayoutUnit();
@@ -2514,7 +2508,7 @@ void LayoutGrid::layoutPositionedObjects(bool relayoutChildren,
}
}
- LayoutBlock::layoutPositionedObjects(relayoutChildren, info);
+ LayoutBlock::layoutPositionedObject(child, relayoutChildren, info);
}
void LayoutGrid::offsetAndBreadthForPositionedChild(

Powered by Google App Engine
This is Rietveld 408576698