Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index cadb60c657c9f07ffa7d796e95fa7fd8748d4454..529871d6d3260b4d4e337ab9cb7a7e4b58bd5a80 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -1597,16 +1597,32 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval |
invalidatePaintForOverflowIfNeeded(); |
// 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()) |
- invalidatePaintRectangle(area->verticalBarDamage()); |
- if (area->hasHorizontalBarDamage()) |
- invalidatePaintRectangle(area->horizontalBarDamage()); |
- area->resetScrollbarDamage(); |
- } |
+ if (ScrollableArea* area = scrollableArea()) { |
+ if (area->hasVerticalBarDamage()) |
+ invalidatePaintRectangle(area->verticalBarDamage()); |
+ if (area->hasHorizontalBarDamage()) |
+ invalidatePaintRectangle(area->horizontalBarDamage()); |
+ } |
+} |
+ |
+void RenderBox::clearPaintInvalidationState() |
+{ |
+ RenderBoxModelObject::clearPaintInvalidationState(); |
+ |
+ if (ScrollableArea* area = scrollableArea()) |
+ area->resetScrollbarDamage(); |
+} |
+ |
+#if ENABLE(ASSERT) |
+bool RenderBox::paintInvalidationStateIsDirty() const |
+{ |
+ if (ScrollableArea* area = scrollableArea()) { |
+ if (area->hasVerticalBarDamage() || area->hasHorizontalBarDamage()) |
+ return true; |
} |
+ return RenderBoxModelObject::paintInvalidationStateIsDirty(); |
} |
+#endif |
bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset, ContentsClipBehavior contentsClipBehavior) |
{ |