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

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: Update test 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
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 9fbbb8b7a364b3f66cce6f67fb94f2afd0f1b294..57f465026ef4aceeb56f744614157a59a5a7fa06 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1603,10 +1603,32 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval
invalidatePaintRectangle(area->verticalBarDamage());
if (area->hasHorizontalBarDamage())
invalidatePaintRectangle(area->horizontalBarDamage());
+ }
+ }
+}
+
+void RenderBox::clearPaintInvalidationState()
+{
+ RenderBoxModelObject::clearPaintInvalidationState();
+
+ if (enclosingLayer()) {
Julien - ping for review 2014/08/01 18:13:45 I missed this in our current code: we will end up
Xianzhu 2014/08/01 18:20:01 Thanks for catching this. I think we should use ha
+ if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea())
area->resetScrollbarDamage();
+ }
+}
+
+#if ENABLE(ASSERT)
+bool RenderBox::paintInvalidationStateIsDirty() const
+{
+ if (enclosingLayer()) {
+ if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) {
+ if (area->hasVerticalBarDamage() || area->hasHorizontalBarDamage())
+ return true;
}
}
+ return RenderBoxModelObject::paintInvalidationStateIsDirty();
}
+#endif
bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset, ContentsClipBehavior contentsClipBehavior)
{
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698