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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 403593005: Clear scrollbar damages in time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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 b1239206822ae5264809d81cf307f7e4b542dff4..721428684de0b3e23379d32242f20faf1f320717 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1569,6 +1569,19 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInvalidationContainer, &paintInvalidationState));
setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidationState));
+ // Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
+ if (enclosingLayer()) {
+ if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) {
+ if (!view()->doingFullRepaint()) {
dsinclair 2014/07/22 19:55:22 This is really confusing. I wonder if the resetScr
Xianzhu 2014/07/23 00:18:13 Done.
+ if (area->hasVerticalBarDamage())
+ invalidatePaintRectangle(area->verticalBarDamage());
+ if (area->hasHorizontalBarDamage())
+ invalidatePaintRectangle(area->horizontalBarDamage());
+ }
+ area->resetScrollbarDamage();
+ }
+ }
+
// If we are set to do a full paint invalidation that means the RenderView will be
// issue paint invalidations. We can then skip issuing of paint invalidations for the child
// renderers as they'll be covered by the RenderView.
@@ -1585,16 +1598,6 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState))
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();
- }
- }
}
bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset, ContentsClipBehavior contentsClipBehavior)

Powered by Google App Engine
This is Rietveld 408576698