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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h

Issue 1491193003: Fix several corner case issues of scrollbar paint invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
index 1120378da9abda5c09dbe7df6eea57d0749e2609..24e55be0540a808f17d287a4129d57a57ab2a262 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.h
@@ -21,14 +21,23 @@ class PaintInvalidationState;
// TODO(wangxianzhu): Combine this into PaintLayerScrollableArea when root-layer-scrolls launches.
class CORE_EXPORT PaintInvalidationCapableScrollableArea : public ScrollableArea {
public:
+ PaintInvalidationCapableScrollableArea()
+ : m_horizontalScrollbarPreviouslyWasOverlay(false)
+ , m_verticalScrollbarPreviouslyWasOverlay(false) { }
+
void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) override;
void invalidatePaintOfScrollControlsIfNeeded(const PaintInvalidationState&, const LayoutBoxModelObject& paintInvalidationContainer);
+ // Should be called when the previous paint invalidation rects are no longer valid.
+ void clearPreviousPaintInvalidationRects();
+
private:
virtual LayoutBox& boxForScrollControlPaintInvalidation() const = 0;
virtual LayoutScrollbarPart* scrollCorner() const = 0;
virtual LayoutScrollbarPart* resizer() const = 0;
+ bool m_horizontalScrollbarPreviouslyWasOverlay;
+ bool m_verticalScrollbarPreviouslyWasOverlay;
LayoutRect m_horizontalScrollbarPreviousPaintInvalidationRect;
LayoutRect m_verticalScrollbarPreviousPaintInvalidationRect;
LayoutRect m_scrollCornerPreviousPaintInvalidationRect;

Powered by Google App Engine
This is Rietveld 408576698