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

Unified Diff: Source/core/rendering/RenderLayer.h

Issue 445263002: Remove cached bounds in RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | Source/core/rendering/RenderLayer.cpp » ('j') | Source/core/rendering/RenderLayer.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index 03d5fe0e62f3423b2c7cf015733cfdd5d8c73889..a25b9c0d045a016663ecbceb2914c3688f7d1dff 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -135,11 +135,8 @@ public:
return curr;
}
- const LayoutPoint& location() const { ASSERT(!m_needsPositionUpdate); return m_location; }
- // FIXME: size() should ASSERT(!m_needsPositionUpdate) as well, but that fails in some tests,
- // for example, fast/repaint/clipped-relative.html.
- const IntSize& size() const { return m_size; }
- void setSizeHackForRenderTreeAsText(const IntSize& size) { m_size = size; }
+ const LayoutPoint location() const;
+ const IntSize size() const;
LayoutRect rect() const { return LayoutRect(location(), size()); }
@@ -152,7 +149,6 @@ public:
void contentChanged(ContentChangeType);
void updateLayerPositionsAfterLayout();
- void updateLayerPositionsAfterOverflowScroll();
bool isPaginated() const { return m_isPaginated; }
RenderLayer* enclosingPaginationLayer() const { return m_enclosingPaginationLayer; }
@@ -160,7 +156,8 @@ public:
void updateTransformationMatrix();
RenderLayer* renderingContextRoot();
- const LayoutSize& offsetForInFlowPosition() const { return m_offsetForInFlowPosition; }
+ // Our current relative position offset.
+ const LayoutSize offsetForInFlowPosition() const;
void blockSelectionGapsBoundsChanged();
void addBlockSelectionGapsBounds(const LayoutRect&);
@@ -552,11 +549,7 @@ private:
void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&);
- // Returns true if the position changed.
- bool updateLayerPosition();
-
void updateLayerPositionRecursive();
- void updateLayerPositionsAfterScrollRecursive();
void setNextSibling(RenderLayer* next) { m_next = next; }
void setPreviousSibling(RenderLayer* prev) { m_previous = prev; }
@@ -683,10 +676,6 @@ private:
unsigned m_isPaginated : 1; // If we think this layer is split by a multi-column ancestor, then this bit will be set.
-#if ENABLE(ASSERT)
- unsigned m_needsPositionUpdate : 1;
-#endif
-
unsigned m_3DTransformedDescendantStatusDirty : 1;
// Set on a stacking context layer that has 3D descendants anywhere
// in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
@@ -724,15 +713,6 @@ private:
RenderLayer* m_first;
RenderLayer* m_last;
- // Our current relative position offset.
- LayoutSize m_offsetForInFlowPosition;
-
- // Our (x,y) coordinates are in our parent layer's coordinate space.
- LayoutPoint m_location;
-
- // The layer's width/height
- IntSize m_size;
-
// Cached normal flow values for absolute positioned elements with static left/top values.
LayoutUnit m_staticInlinePosition;
LayoutUnit m_staticBlockPosition;
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayer.cpp » ('j') | Source/core/rendering/RenderLayer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698