| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 92909837daab0c2cdb153ab6dced0a56b7772107..549f36ac47d41b471b65bf67e368a39a96ecad84 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -148,7 +148,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
|
| // the canvas. Just dirty the entire canvas when our style changes substantially.
|
| if ((diff.needsRepaint() || diff.needsLayout()) && node()
|
| && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
|
| - view()->repaint();
|
| + view()->invalidatePaint();
|
|
|
| if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFixedBackground())
|
| view()->compositor()->setNeedsUpdateFixedBackground();
|
| @@ -159,7 +159,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
|
| if (diff.needsFullLayout() && parent() && oldStyle->position() != newStyle.position()) {
|
| markContainingBlocksForLayout();
|
| if (oldStyle->position() == StaticPosition)
|
| - repaint();
|
| + invalidatePaint();
|
| else if (newStyle.hasOutOfFlowPosition())
|
| parent()->setChildNeedsLayout();
|
| if (isFloating() && !isOutOfFlowPositioned() && newStyle.hasOutOfFlowPosition())
|
| @@ -167,8 +167,9 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
|
| }
|
| // FIXME: This branch runs when !oldStyle, which means that layout was never called
|
| // so what's the point in invalidating the whole view that we never painted?
|
| - } else if (isBody())
|
| - view()->repaint();
|
| + } else if (isBody()) {
|
| + view()->invalidatePaint();
|
| + }
|
|
|
| RenderBoxModelObject::styleWillChange(diff, newStyle);
|
| }
|
| @@ -292,7 +293,7 @@ void RenderBox::updateFromStyle()
|
| // If we are getting an overflow clip, preemptively erase any overflowing content.
|
| // FIXME: This should probably consult RenderOverflow.
|
| if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
|
| - repaint();
|
| + invalidatePaint();
|
| }
|
| }
|
| }
|
| @@ -1501,7 +1502,7 @@ void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*)
|
|
|
| if ((style()->borderImage().image() && style()->borderImage().image()->data() == image) ||
|
| (style()->maskBoxImage().image() && style()->maskBoxImage().image()->data() == image)) {
|
| - repaint();
|
| + invalidatePaint();
|
| return;
|
| }
|
|
|
| @@ -1557,11 +1558,11 @@ bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer
|
| if (geometry.hasNonLocalGeometry()) {
|
| // Rather than incur the costs of computing the paintContainer for renderers with fixed backgrounds
|
| // in order to get the right destRect, just repaint the entire renderer.
|
| - layerRenderer->repaint();
|
| + layerRenderer->invalidatePaint();
|
| return true;
|
| }
|
|
|
| - layerRenderer->repaintRectangle(geometry.destRect());
|
| + layerRenderer->invalidatePaintRectangle(geometry.destRect());
|
| if (geometry.destRect() == rendererRect)
|
| return true;
|
| }
|
| @@ -1612,20 +1613,20 @@ void RenderBox::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInv
|
|
|
| const LayoutRect& newPaintInvalidationRect = previousPaintInvalidationRect();
|
| const LayoutPoint& newPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
|
| - bool didFullPaintInvalidation = repaintAfterLayoutIfNeeded(&newPaintInvalidationContainer,
|
| + bool didFullPaintInvalidation = invalidatePaintAfterLayoutIfNeeded(&newPaintInvalidationContainer,
|
| shouldDoFullPaintInvalidationAfterLayout(), oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer,
|
| &newPaintInvalidationRect, &newPositionFromPaintInvalidationContainer);
|
|
|
| if (!didFullPaintInvalidation)
|
| - repaintOverflowIfNeeded();
|
| + invalidateOverflowPaintIfNeeded();
|
|
|
| // Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
|
| if (enclosingLayer()) {
|
| if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) {
|
| if (area->hasVerticalBarDamage())
|
| - repaintRectangle(area->verticalBarDamage());
|
| + invalidatePaintRectangle(area->verticalBarDamage());
|
| if (area->hasHorizontalBarDamage())
|
| - repaintRectangle(area->horizontalBarDamage());
|
| + invalidatePaintRectangle(area->horizontalBarDamage());
|
| area->resetScrollbarDamage();
|
| }
|
| }
|
| @@ -2124,10 +2125,10 @@ void RenderBox::repaintDuringLayoutIfMoved(const LayoutRect& oldRect)
|
| // The child moved. Invalidate the object's old and new positions. We have to do this
|
| // since the object may not have gotten a layout.
|
| m_frameRect = oldRect;
|
| - repaint();
|
| + invalidatePaint();
|
| repaintOverhangingFloats(true);
|
| m_frameRect = newRect;
|
| - repaint();
|
| + invalidatePaint();
|
| repaintOverhangingFloats(true);
|
| }
|
| }
|
|
|