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

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 push function to match old behavior... 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..2a94548a3a4bafb76dd305a469e40c2755daea07 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -642,7 +642,8 @@ int RenderTableSection::calcRowLogicalHeight()
RenderTableCell* cell;
- LayoutStateMaintainer statePusher(*this);
+ // FIXME: This shouldn't use the same constructor as RenderView.
+ LayoutState state(*this);
m_rowPos.resize(m_grid.size() + 1);
@@ -695,11 +696,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 +731,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 state(*this, locationOffset());
const Vector<int>& columnPos = table()->columnPositions();
@@ -892,7 +888,7 @@ void RenderTableSection::layoutRows()
int vspacing = table()->vBorderSpacing();
unsigned nEffCols = table()->numEffCols();
- LayoutStateMaintainer statePusher(*this, locationOffset());
+ LayoutState state(*this, locationOffset());
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