| Index: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
|
| diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
|
| index aa474f1e5cc9f65e4c2642305caa40fee776f36b..8a0ad3363ef6a59695810931edcb1e42dbcf9281 100644
|
| --- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
|
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
|
| @@ -53,11 +53,11 @@ public:
|
| // Scrollbar::setTrackNeedsRepaint.
|
| virtual bool shouldRepaintAllPartsOnInvalidation() const { return true; }
|
|
|
| - virtual void updateEnabledState(const ScrollbarThemeClient*) { }
|
| + virtual void updateEnabledState(const ScrollbarThemeClient&) { }
|
|
|
| - virtual bool paint(const ScrollbarThemeClient*, GraphicsContext*, const CullRect&);
|
| + virtual bool paint(const ScrollbarThemeClient&, GraphicsContext&, const CullRect&);
|
|
|
| - virtual ScrollbarPart hitTest(const ScrollbarThemeClient*, const IntPoint&);
|
| + virtual ScrollbarPart hitTest(const ScrollbarThemeClient&, const IntPoint&);
|
|
|
| virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) { return 0; }
|
| virtual int scrollbarMargin() const { return 0; }
|
| @@ -66,61 +66,61 @@ public:
|
|
|
| virtual bool supportsControlTints() const { return false; }
|
| virtual bool usesOverlayScrollbars() const { return false; }
|
| - virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) { }
|
| + virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient&) { }
|
|
|
| virtual bool invalidateOnMouseEnterExit() { return false; }
|
| virtual bool invalidateOnWindowActiveChange() const { return false; }
|
|
|
| - virtual void paintScrollCorner(GraphicsContext*, const DisplayItemClient&, const IntRect& cornerRect);
|
| - virtual void paintTickmarks(GraphicsContext*, const ScrollbarThemeClient*, const IntRect&) { }
|
| + virtual void paintScrollCorner(GraphicsContext&, const DisplayItemClient&, const IntRect& cornerRect);
|
| + virtual void paintTickmarks(GraphicsContext&, const ScrollbarThemeClient&, const IntRect&) { }
|
|
|
| - virtual bool shouldCenterOnThumb(const ScrollbarThemeClient*, const PlatformMouseEvent&);
|
| - virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient*, const PlatformMouseEvent&);
|
| - virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient*, const PlatformMouseEvent&) { return false; }
|
| + virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&, const PlatformMouseEvent&);
|
| + virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&, const PlatformMouseEvent&);
|
| + virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, const PlatformMouseEvent&) { return false; }
|
|
|
| // The position of the thumb relative to the track.
|
| - virtual int thumbPosition(const ScrollbarThemeClient*);
|
| + virtual int thumbPosition(const ScrollbarThemeClient&);
|
| // The length of the thumb along the axis of the scrollbar.
|
| - virtual int thumbLength(const ScrollbarThemeClient*);
|
| + virtual int thumbLength(const ScrollbarThemeClient&);
|
| // The position of the track relative to the scrollbar.
|
| - virtual int trackPosition(const ScrollbarThemeClient*);
|
| + virtual int trackPosition(const ScrollbarThemeClient&);
|
| // The length of the track along the axis of the scrollbar.
|
| - virtual int trackLength(const ScrollbarThemeClient*);
|
| + virtual int trackLength(const ScrollbarThemeClient&);
|
| // The opacity to be applied to the thumb.
|
| - virtual float thumbOpacity(const ScrollbarThemeClient*) const { return 1.0f; }
|
| + virtual float thumbOpacity(const ScrollbarThemeClient&) const { return 1.0f; }
|
|
|
| - virtual bool hasButtons(const ScrollbarThemeClient*) = 0;
|
| - virtual bool hasThumb(const ScrollbarThemeClient*) = 0;
|
| + virtual bool hasButtons(const ScrollbarThemeClient&) = 0;
|
| + virtual bool hasThumb(const ScrollbarThemeClient&) = 0;
|
|
|
| - virtual IntRect backButtonRect(const ScrollbarThemeClient*, ScrollbarPart, bool painting = false) = 0;
|
| - virtual IntRect forwardButtonRect(const ScrollbarThemeClient*, ScrollbarPart, bool painting = false) = 0;
|
| - virtual IntRect trackRect(const ScrollbarThemeClient*, bool painting = false) = 0;
|
| - virtual IntRect thumbRect(const ScrollbarThemeClient*);
|
| - virtual int thumbThickness(const ScrollbarThemeClient*);
|
| + virtual IntRect backButtonRect(const ScrollbarThemeClient&, ScrollbarPart, bool painting = false) = 0;
|
| + virtual IntRect forwardButtonRect(const ScrollbarThemeClient&, ScrollbarPart, bool painting = false) = 0;
|
| + virtual IntRect trackRect(const ScrollbarThemeClient&, bool painting = false) = 0;
|
| + virtual IntRect thumbRect(const ScrollbarThemeClient&);
|
| + virtual int thumbThickness(const ScrollbarThemeClient&);
|
|
|
| - virtual int minimumThumbLength(const ScrollbarThemeClient*);
|
| + virtual int minimumThumbLength(const ScrollbarThemeClient&);
|
|
|
| - virtual void splitTrack(const ScrollbarThemeClient*, const IntRect& track, IntRect& startTrack, IntRect& thumb, IntRect& endTrack);
|
| + virtual void splitTrack(const ScrollbarThemeClient&, const IntRect& track, IntRect& startTrack, IntRect& thumb, IntRect& endTrack);
|
|
|
| - virtual void paintScrollbarBackground(GraphicsContext*, const ScrollbarThemeClient*) { }
|
| - virtual void paintTrackBackground(GraphicsContext*, const ScrollbarThemeClient*, const IntRect&) { }
|
| - virtual void paintTrackPiece(GraphicsContext*, const ScrollbarThemeClient*, const IntRect&, ScrollbarPart) { }
|
| - virtual void paintButton(GraphicsContext*, const ScrollbarThemeClient*, const IntRect&, ScrollbarPart) { }
|
| - virtual void paintThumb(GraphicsContext*, const ScrollbarThemeClient*, const IntRect&) { }
|
| + virtual void paintScrollbarBackground(GraphicsContext&, const ScrollbarThemeClient&) { }
|
| + virtual void paintTrackBackground(GraphicsContext&, const ScrollbarThemeClient&, const IntRect&) { }
|
| + virtual void paintTrackPiece(GraphicsContext&, const ScrollbarThemeClient&, const IntRect&, ScrollbarPart) { }
|
| + virtual void paintButton(GraphicsContext&, const ScrollbarThemeClient&, const IntRect&, ScrollbarPart) { }
|
| + virtual void paintThumb(GraphicsContext&, const ScrollbarThemeClient&, const IntRect&) { }
|
|
|
| virtual int maxOverlapBetweenPages() { return std::numeric_limits<int>::max(); }
|
|
|
| virtual double initialAutoscrollTimerDelay() { return 0.25; }
|
| virtual double autoscrollTimerDelay() { return 0.05; }
|
|
|
| - virtual IntRect constrainTrackRectToTrackPieces(const ScrollbarThemeClient*, const IntRect& rect) { return rect; }
|
| + virtual IntRect constrainTrackRectToTrackPieces(const ScrollbarThemeClient&, const IntRect& rect) { return rect; }
|
|
|
| - virtual void registerScrollbar(ScrollbarThemeClient*) { }
|
| - virtual void unregisterScrollbar(ScrollbarThemeClient*) { }
|
| + virtual void registerScrollbar(ScrollbarThemeClient&) { }
|
| + virtual void unregisterScrollbar(ScrollbarThemeClient&) { }
|
|
|
| virtual bool isMockTheme() const { return false; }
|
|
|
| - static ScrollbarTheme* theme();
|
| + static ScrollbarTheme& theme();
|
|
|
| static void setMockScrollbarsEnabled(bool flag);
|
| static bool mockScrollbarsEnabled();
|
| @@ -130,7 +130,7 @@ protected:
|
| static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart);
|
|
|
| private:
|
| - static ScrollbarTheme* nativeTheme(); // Must be implemented to return the correct theme subclass.
|
| + static ScrollbarTheme& nativeTheme(); // Must be implemented to return the correct theme subclass.
|
| static bool gMockScrollbarsEnabled;
|
| };
|
|
|
|
|