LayoutStateMaintainer should use references where possible
https://bugs.webkit.org/show_bug.cgi?id=124471
Reviewed by Dan Bernstein.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layout):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
* rendering/RenderFlowThread.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::layout):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
* rendering/RenderView.h:
(WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
(WebCore::LayoutStateMaintainer::push):
(WebCore::LayoutStateMaintainer::pop):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 2438446..61a5ae2 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -278,7 +278,7 @@
int spacing = table()->vBorderSpacing();
- LayoutStateMaintainer statePusher(&view());
+ LayoutStateMaintainer statePusher(view());
m_rowPos.resize(m_grid.size() + 1);
m_rowPos[0] = spacing;
@@ -332,7 +332,7 @@
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());
+ statePusher.push(*this, locationOffset());
}
cell->clearIntrinsicPadding();
cell->clearOverrideSize();
@@ -385,7 +385,7 @@
// 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(&view(), this, locationOffset(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
+ LayoutStateMaintainer statePusher(view(), *this, locationOffset(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
const Vector<int>& columnPos = table()->columnPositions();
@@ -530,7 +530,7 @@
int vspacing = table()->vBorderSpacing();
unsigned nEffCols = table()->numEffCols();
- LayoutStateMaintainer statePusher(&view(), this, locationOffset(), hasTransform() || style().isFlippedBlocksWritingMode());
+ LayoutStateMaintainer statePusher(view(), *this, locationOffset(), hasTransform() || style().isFlippedBlocksWritingMode());
for (unsigned r = 0; r < totalRows; r++) {
// Set the row's x/y position and width/height.