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

Unified Diff: Source/core/rendering/RenderBox.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/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 6245b13d9c5c65345753c31990ed1d75bb31f0cb..2b26048e86636357185829815ee675db7d2804e2 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -321,7 +321,7 @@ void RenderBox::layout()
return;
}
- LayoutStateMaintainer statePusher(*this, locationOffset());
+ LayoutState state(*this, locationOffset());
while (child) {
child->layoutIfNeeded();
ASSERT(!child->needsLayout());
@@ -1588,7 +1588,7 @@ void RenderBox::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInv
// issue paint invalidations. We can then skip issuing of paint invalidations for the child
// renderers as they'll be covered by the RenderView.
if (view()->doingFullRepaint()) {
- LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : locationOffset());
+ LayoutState state(*this, isTableRow() ? LayoutSize() : locationOffset());
RenderObject::invalidateTreeAfterLayout(newPaintInvalidationContainer);
return;
}
@@ -1628,7 +1628,7 @@ void RenderBox::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInv
// FIXME: This concept of a tree walking state for fast lookups should be generalized away from
// just layout.
// FIXME: Table rows shouldn't be special-cased.
- LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : locationOffset());
+ LayoutState state(*this, isTableRow() ? LayoutSize() : locationOffset());
RenderObject::invalidateTreeAfterLayout(newPaintInvalidationContainer);
}
}
@@ -1817,7 +1817,7 @@ void RenderBox::mapLocalToContainer(const RenderLayerModelObject* repaintContain
return;
if (RenderView* v = view()) {
- if (v->canUseLayoutStateForContainer(repaintContainer)) {
+ if (v->canMapUsingLayoutStateForContainer(repaintContainer)) {
LayoutState* layoutState = v->layoutState();
LayoutSize offset = layoutState->paintOffset() + locationOffset();
if (style()->hasInFlowPosition() && layer())
@@ -1870,7 +1870,7 @@ void RenderBox::mapLocalToContainer(const RenderLayerModelObject* repaintContain
void RenderBox::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
{
// We don't expect to be called during layout.
- ASSERT(!view() || !view()->layoutStateEnabled());
+ ASSERT(!view() || !view()->layoutStateCachedOffsetsEnabled());
bool isFixedPos = style()->position() == FixedPosition;
bool hasTransform = hasLayer() && layer()->transform();
@@ -2020,7 +2020,7 @@ void RenderBox::mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
RenderStyle* styleToUse = style();
if (RenderView* v = view()) {
// LayoutState is only valid for root-relative, non-fixed position repainting
- if (v->canUseLayoutStateForContainer(paintInvalidationContainer) && styleToUse->position() != FixedPosition) {
+ if (v->canMapUsingLayoutStateForContainer(paintInvalidationContainer) && styleToUse->position() != FixedPosition) {
LayoutState* layoutState = v->layoutState();
if (layer() && layer()->transform())

Powered by Google App Engine
This is Rietveld 408576698