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

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

Issue 1550983002: Revert of Make ScrollbarThemeAura selectively invalidate scrollbar parts. (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/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 d7f430c1481d46b128e2bd1ea79439dd8d5a9a1f..0cf202f7f0ed9c1afe03aeacaca0b12e4176bfa1 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.h
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.h
@@ -94,15 +94,7 @@
void setEnabled(bool) override;
// Called by the ScrollableArea when the scroll offset changes.
- //
- // Will invalidate the scrollbar if either the track or the thumb is
- // invalidated. The caller is responsible for issuing paint invalidations
- // when only the thumb position changes, as the scrollbar is unaware of
- // whether the thumb can be moved without repainting.
- //
- // Returns true if the scrollbar's offset was actually updated, so that the
- // caller can issue additional invalidations as needed.
- bool offsetDidChange();
+ void offsetDidChange();
void disconnectFromScrollableArea();
ScrollableArea* scrollableArea() const { return m_scrollableArea; }
@@ -149,7 +141,6 @@
float elasticOverscroll() const override { return m_elasticOverscroll; }
void setElasticOverscroll(float elasticOverscroll) override { m_elasticOverscroll = elasticOverscroll; }
- // Use setNeedsPaintInvalidation to cause scrollbar parts to repaint.
bool trackNeedsRepaint() const { return m_trackNeedsRepaint; }
void setTrackNeedsRepaint(bool trackNeedsRepaint) { m_trackNeedsRepaint = trackNeedsRepaint; }
bool thumbNeedsRepaint() const { return m_thumbNeedsRepaint; }
@@ -163,9 +154,7 @@
// TODO(chrishtr): fix this.
IntRect visualRect() const override { return IntRect(); }
- // Marks the specified parts of the scrollbar as needing paint invalidation.
- // Uses the associated ScrollableArea to cause invalidation.
- void setNeedsPaintInvalidation(ScrollbarPart = AllParts);
+ void setNeedsPaintInvalidation();
// Promptly unregister from the theme manager + run finalizers of derived Scrollbars.
EAGERLY_FINALIZE();
@@ -177,6 +166,7 @@
protected:
Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0);
+ void updateThumb();
void autoscrollTimerFired(Timer<Scrollbar>*);
void startTimerIfNeeded(double delay);
@@ -217,6 +207,9 @@
float scrollableAreaCurrentPos() const;
+ void updateThumbPosition();
+ void updateThumbProportion();
+
bool m_trackNeedsRepaint;
bool m_thumbNeedsRepaint;
};

Powered by Google App Engine
This is Rietveld 408576698