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

Unified Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.h

Issue 1406133005: Calculate paint invalidation rect for scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/platform/scroll/Scrollbar.h
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.h b/third_party/WebKit/Source/platform/scroll/Scrollbar.h
index 4f6596d06935f5de54000c24b51eb0e51b686528..0ec1b88e8a8197190e3287423addafd2e9c8618f 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.h
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.h
@@ -65,9 +65,6 @@ public:
void setFrameRect(const IntRect&) override;
IntRect frameRect() const override { return Widget::frameRect(); }
- void invalidate() override { Widget::invalidate(); }
- void invalidateRect(const IntRect&) override;
-
ScrollbarOverlayStyle scrollbarOverlayStyle() const override;
void getTickmarks(Vector<IntRect>&) const override;
bool isScrollableAreaActive() const override;
@@ -129,9 +126,6 @@ public:
ScrollbarTheme* theme() const { return m_theme; }
- bool suppressInvalidation() const { return m_suppressInvalidation; }
- void setSuppressInvalidation(bool s) { m_suppressInvalidation = s; }
-
IntRect convertToContainingView(const IntRect&) const override;
IntRect convertFromContainingView(const IntRect&) const override;
@@ -152,6 +146,8 @@ public:
DisplayItemClient displayItemClient() const override { return toDisplayItemClient(this); }
String debugName() const override { return m_orientation == HorizontalScrollbar ? "HorizontalScrollbar" : "VerticalScrollbar"; }
+ void setNeedsPaintInvalidation();
+
// Promptly unregister from the theme manager + run finalizers of derived Scrollbars.
EAGERLY_FINALIZE();
#if ENABLE(OILPAN)
@@ -195,8 +191,6 @@ protected:
Timer<Scrollbar> m_scrollTimer;
bool m_overlapsResizer;
- bool m_suppressInvalidation;
-
bool m_isAlphaLocked;
float m_elasticOverscroll;
@@ -204,6 +198,9 @@ protected:
private:
bool isScrollbar() const override { return true; }
+ void invalidate() override { setNeedsPaintInvalidation(); }
+ void invalidateRect(const IntRect&) override { setNeedsPaintInvalidation(); }
+
float scrollableAreaCurrentPos() const;
};

Powered by Google App Engine
This is Rietveld 408576698