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

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

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/LayoutFullScreen.cpp ('k') | Source/core/layout/LayoutHTMLCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutGrid.cpp
diff --git a/Source/core/layout/LayoutGrid.cpp b/Source/core/layout/LayoutGrid.cpp
index acc7c54ea048db8e40e96c86d2c282b54c890254..e1cecf43798c952b6bf443784d1ca73fe5be0156 100644
--- a/Source/core/layout/LayoutGrid.cpp
+++ b/Source/core/layout/LayoutGrid.cpp
@@ -614,7 +614,7 @@ LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, Vector<GridTrack>
LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child.hasOverrideContainingBlockLogicalWidth() ? child.overrideContainingBlockContentLogicalWidth() : LayoutUnit();
LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChild(child, ForColumns, columnTracks);
if (child.hasRelativeLogicalHeight() || oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth) {
- layoutScope.setNeedsLayout(&child);
+ layoutScope.setNeedsLayout(&child, LayoutInvalidationReason::GridChanged);
// We need to clear the stretched height to properly compute logical height during layout.
child.clearOverrideLogicalContentHeight();
}
@@ -1108,7 +1108,7 @@ void LayoutGrid::dirtyGrid()
// is still ongoing.
// Forcing a new layout for the Grid render would cancel any ongoing painting and ensure
// the grid and its children are correctly laid out according to the new style rules.
- setNeedsLayout();
+ setNeedsLayout(LayoutInvalidationReason::GridChanged);
m_grid.resize(0);
m_gridItemCoordinate.clear();
@@ -1152,7 +1152,7 @@ void LayoutGrid::layoutGridItems()
SubtreeLayoutScope layoutScope(*child);
if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth || (oldOverrideContainingBlockContentLogicalHeight != overrideContainingBlockContentLogicalHeight && child->hasRelativeLogicalHeight()))
- layoutScope.setNeedsLayout(child);
+ layoutScope.setNeedsLayout(child, LayoutInvalidationReason::GridChanged);
child->setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth);
child->setOverrideContainingBlockContentLogicalHeight(overrideContainingBlockContentLogicalHeight);
@@ -1561,7 +1561,7 @@ void LayoutGrid::applyStretchAlignmentToChildIfNeeded(LayoutBox& child, LayoutUn
child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight());
if (childNeedsRelayout) {
child.setLogicalHeight(0);
- child.setNeedsLayout();
+ child.setNeedsLayout(LayoutInvalidationReason::GridChanged);
}
}
}
« no previous file with comments | « Source/core/layout/LayoutFullScreen.cpp ('k') | Source/core/layout/LayoutHTMLCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698