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

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

Issue 2430663002: [css-grid] Use firstInFlowChildBox API for iterate over the grid items (Closed)
Patch Set: Created 4 years, 2 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
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 438d518648bf5d113cde2b62a4ba90cc3751a2e3..001bfe8d48d6a656c9e05451807fe278d08ca305 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -492,9 +492,9 @@ void LayoutGrid::layoutBlock(bool relayoutChildren) {
// computed again in the updateLogicalWidth call bellow.
if (sizesLogicalWidthToFitContent(styleRef().logicalWidth()) ||
styleRef().logicalWidth().isIntrinsicOrAuto()) {
- for (auto* child = firstChildBox(); child;
+ for (auto* child = firstInFlowChildBox(); child;
child = child->nextInFlowSiblingBox()) {
- if (child->isOutOfFlowPositioned() || !isOrthogonalChild(*child))
+ if (!isOrthogonalChild(*child))
continue;
child->clearOverrideSize();
child->clearContainingBlockOverrideSize();
@@ -1995,11 +1995,8 @@ void LayoutGrid::populateExplicitGridAndOrderIterator() {
ASSERT(m_gridItemsIndexesMap.isEmpty());
size_t childIndex = 0;
- for (LayoutBox* child = firstChildBox(); child;
+ for (LayoutBox* child = firstInFlowChildBox(); child;
child = child->nextInFlowSiblingBox()) {
- if (child->isOutOfFlowPositioned())
- continue;
-
populator.collectChild(child);
m_gridItemsIndexesMap.set(child, childIndex++);

Powered by Google App Engine
This is Rietveld 408576698