Don't pass paintInvalidationContainer to LayoutBox::savePreviousBoxSizesIfNeeded()

We only need the size of the invalidation rect, so don't need
paintInvalidationContainer to adjust the offset of the rect.

Review URL: https://codereview.chromium.org/1307663002

git-svn-id: svn://svn.chromium.org/blink/trunk@200957 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fa791406
...@@ -1396,7 +1396,7 @@ PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat ...@@ -1396,7 +1396,7 @@ PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat
} }
// This is for the next invalidatePaintIfNeeded so must be at the end. // This is for the next invalidatePaintIfNeeded so must be at the end.
savePreviousBoxSizesIfNeeded(newPaintInvalidationContainer); savePreviousBoxSizesIfNeeded();
return reason; return reason;
} }
...@@ -4574,13 +4574,13 @@ void LayoutBox::setPageLogicalOffset(LayoutUnit offset) ...@@ -4574,13 +4574,13 @@ void LayoutBox::setPageLogicalOffset(LayoutUnit offset)
ensureRareData().m_pageLogicalOffset = offset; ensureRareData().m_pageLogicalOffset = offset;
} }
bool LayoutBox::needToSavePreviousBoxSizes(const LayoutBoxModelObject& paintInvalidationContainer) bool LayoutBox::needToSavePreviousBoxSizes()
{ {
// If m_rareData is already created, always save. // If m_rareData is already created, always save.
if (m_rareData) if (m_rareData)
return true; return true;
LayoutSize paintInvalidationSize = previousPaintInvalidationRectIncludingCompositedScrolling(paintInvalidationContainer).size(); LayoutSize paintInvalidationSize = previousPaintInvalidationRectSize();
// Don't save old box sizes if the paint rect is empty because we'll // Don't save old box sizes if the paint rect is empty because we'll
// full invalidate once the paint rect becomes non-empty. // full invalidate once the paint rect becomes non-empty.
if (paintInvalidationSize.isEmpty()) if (paintInvalidationSize.isEmpty())
...@@ -4604,9 +4604,9 @@ bool LayoutBox::needToSavePreviousBoxSizes(const LayoutBoxModelObject& paintInva ...@@ -4604,9 +4604,9 @@ bool LayoutBox::needToSavePreviousBoxSizes(const LayoutBoxModelObject& paintInva
return false; return false;
} }
void LayoutBox::savePreviousBoxSizesIfNeeded(const LayoutBoxModelObject& paintInvalidationContainer) void LayoutBox::savePreviousBoxSizesIfNeeded()
{ {
if (!needToSavePreviousBoxSizes(paintInvalidationContainer)) if (!needToSavePreviousBoxSizes())
return; return;
LayoutBoxRareData& rareData = ensureRareData(); LayoutBoxRareData& rareData = ensureRareData();
......
...@@ -814,8 +814,8 @@ private: ...@@ -814,8 +814,8 @@ private:
return *m_rareData.get(); return *m_rareData.get();
} }
bool needToSavePreviousBoxSizes(const LayoutBoxModelObject& paintInvalidationContainer); bool needToSavePreviousBoxSizes();
void savePreviousBoxSizesIfNeeded(const LayoutBoxModelObject& paintInvalidationContainer); void savePreviousBoxSizesIfNeeded();
LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize) const; LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize) const;
bool logicalHeightComputesAsNone(SizeType) const; bool logicalHeightComputesAsNone(SizeType) const;
......
...@@ -999,6 +999,7 @@ public: ...@@ -999,6 +999,7 @@ public:
// The previous paint invalidation rect, in the the space of the paint invalidation container (*not* the graphics layer that paints // The previous paint invalidation rect, in the the space of the paint invalidation container (*not* the graphics layer that paints
// this object). // this object).
LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const LayoutBoxModelObject& paintInvalidationContainer) const; LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const LayoutBoxModelObject& paintInvalidationContainer) const;
LayoutSize previousPaintInvalidationRectSize() const { return previousPaintInvalidationRect().size(); }
void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPaintInvalidationRect = rect; } void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPaintInvalidationRect = rect; }
// Only adjusts if the paint invalidation container is not a composited scroller. // Only adjusts if the paint invalidation container is not a composited scroller.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment