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

Unified Diff: Source/core/rendering/RenderTableSection.cpp

Issue 335963002: Change LayoutState to be stack-allocated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix assert Created 6 years, 6 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: Source/core/rendering/RenderTableSection.cpp
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index 0180cd131718d7fabd1d074ad3c31d9fdf087b87..a7677b116cb6d6fcd70cfed1a7ad891ab8c9b3b3 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -642,7 +642,7 @@ int RenderTableSection::calcRowLogicalHeight()
RenderTableCell* cell;
- LayoutStateMaintainer statePusher(*this);
+ LayoutState statePusher(*this);
m_rowPos.resize(m_grid.size() + 1);
@@ -695,11 +695,6 @@ int RenderTableSection::calcRowLogicalHeight()
ASSERT(cell->rowSpan() == 1);
if (cell->hasOverrideHeight()) {
- if (!statePusher.didPush()) {
- // Technically, we should also push state for the row, but since
- // rows don't push a coordinate transform, that's not necessary.
- statePusher.push(*this, locationOffset());
- }
cell->clearIntrinsicPadding();
cell->clearOverrideSize();
cell->forceChildLayout();
@@ -735,7 +730,7 @@ void RenderTableSection::layout()
// can be called in a loop (e.g during parsing). Doing it now ensures we have a stable-enough structure.
m_grid.shrinkToFit();
- LayoutStateMaintainer statePusher(*this, locationOffset());
+ LayoutState statePusher(*this, locationOffset());
const Vector<int>& columnPos = table()->columnPositions();
@@ -892,7 +887,8 @@ void RenderTableSection::layoutRows()
int vspacing = table()->vBorderSpacing();
unsigned nEffCols = table()->numEffCols();
- LayoutStateMaintainer statePusher(*this, locationOffset());
+ // FIXME: This LayoutState invocation should be fixed for consistency.
esprehn 2014/06/13 23:25:26 Fixed how?
+ LayoutState statePusher(*this);
for (unsigned r = 0; r < totalRows; r++) {
// Set the row's x/y position and width/height.

Powered by Google App Engine
This is Rietveld 408576698