| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 void registerScrollbar(ScrollbarThemeClient&) override; | 44 void registerScrollbar(ScrollbarThemeClient&) override; |
| 45 void unregisterScrollbar(ScrollbarThemeClient&) override; | 45 void unregisterScrollbar(ScrollbarThemeClient&) override; |
| 46 void preferencesChanged(float initialButtonDelay, float autoscrollButtonDela
y, NSScrollerStyle preferredScrollerStyle, bool redraw, WebScrollbarButtonsPlace
ment); | 46 void preferencesChanged(float initialButtonDelay, float autoscrollButtonDela
y, NSScrollerStyle preferredScrollerStyle, bool redraw, WebScrollbarButtonsPlace
ment); |
| 47 | 47 |
| 48 bool supportsControlTints() const override { return true; } | 48 bool supportsControlTints() const override { return true; } |
| 49 | 49 |
| 50 double initialAutoscrollTimerDelay() override; | 50 double initialAutoscrollTimerDelay() override; |
| 51 double autoscrollTimerDelay() override; | 51 double autoscrollTimerDelay() override; |
| 52 | 52 |
| 53 void paintTickmarks(GraphicsContext&, const ScrollbarThemeClient&, const Int
Rect&) override; | 53 void paintTickmarks(GraphicsContext&, const Scrollbar&, const IntRect&) over
ride; |
| 54 | 54 |
| 55 bool shouldRepaintAllPartsOnInvalidation() const override { return false; } | 55 bool shouldRepaintAllPartsOnInvalidation() const override { return false; } |
| 56 ScrollbarPart invalidateOnThumbPositionChange( | 56 ScrollbarPart invalidateOnThumbPositionChange( |
| 57 const ScrollbarThemeClient&, float oldPosition, float newPosition) const
override; | 57 const ScrollbarThemeClient&, float oldPosition, float newPosition) const
override; |
| 58 void updateEnabledState(const ScrollbarThemeClient&) override; | 58 void updateEnabledState(const ScrollbarThemeClient&) override; |
| 59 int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override; | 59 int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override; |
| 60 bool usesOverlayScrollbars() const override; | 60 bool usesOverlayScrollbars() const override; |
| 61 void updateScrollbarOverlayStyle(const ScrollbarThemeClient&) override; | 61 void updateScrollbarOverlayStyle(const ScrollbarThemeClient&) override; |
| 62 WebScrollbarButtonsPlacement buttonsPlacement() const override; | 62 WebScrollbarButtonsPlacement buttonsPlacement() const override; |
| 63 | 63 |
| 64 void setNewPainterForScrollbar(ScrollbarThemeClient&, ScrollbarPainter); | 64 void setNewPainterForScrollbar(ScrollbarThemeClient&, ScrollbarPainter); |
| 65 ScrollbarPainter painterForScrollbar(const ScrollbarThemeClient&) const; | 65 ScrollbarPainter painterForScrollbar(const ScrollbarThemeClient&) const; |
| 66 | 66 |
| 67 void paintTrackBackground(GraphicsContext&, const ScrollbarThemeClient&, con
st IntRect&) override; | 67 void paintTrackBackground(GraphicsContext&, const Scrollbar&, const IntRect&
) override; |
| 68 void paintThumb(GraphicsContext&, const ScrollbarThemeClient&, const IntRect
&) override; | 68 void paintThumb(GraphicsContext&, const Scrollbar&, const IntRect&) override
; |
| 69 | 69 |
| 70 float thumbOpacity(const ScrollbarThemeClient&) const override; | 70 float thumbOpacity(const ScrollbarThemeClient&) const override; |
| 71 | 71 |
| 72 static NSScrollerStyle recommendedScrollerStyle(); | 72 static NSScrollerStyle recommendedScrollerStyle(); |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 int maxOverlapBetweenPages() override { return 40; } | 75 int maxOverlapBetweenPages() override { return 40; } |
| 76 | 76 |
| 77 bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, const Pla
tformMouseEvent&) override; | 77 bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, const Pla
tformMouseEvent&) override; |
| 78 int scrollbarPartToHIPressedState(ScrollbarPart); | 78 int scrollbarPartToHIPressedState(ScrollbarPart); |
| 79 | 79 |
| 80 virtual void updateButtonPlacement(WebScrollbarButtonsPlacement) {} | 80 virtual void updateButtonPlacement(WebScrollbarButtonsPlacement) {} |
| 81 | 81 |
| 82 void paintGivenTickmarks(SkCanvas*, const ScrollbarThemeClient&, const IntRe
ct&, const Vector<IntRect>&); | 82 void paintGivenTickmarks(SkCanvas*, const Scrollbar&, const IntRect&, const
Vector<IntRect>&); |
| 83 | 83 |
| 84 IntRect trackRect(const ScrollbarThemeClient&, bool painting = false) overri
de; | 84 IntRect trackRect(const ScrollbarThemeClient&, bool painting = false) overri
de; |
| 85 IntRect backButtonRect(const ScrollbarThemeClient&, ScrollbarPart, bool pain
ting = false) override; | 85 IntRect backButtonRect(const ScrollbarThemeClient&, ScrollbarPart, bool pain
ting = false) override; |
| 86 IntRect forwardButtonRect(const ScrollbarThemeClient&, ScrollbarPart, bool p
ainting = false) override; | 86 IntRect forwardButtonRect(const ScrollbarThemeClient&, ScrollbarPart, bool p
ainting = false) override; |
| 87 | 87 |
| 88 bool hasButtons(const ScrollbarThemeClient&) override { return false; } | 88 bool hasButtons(const ScrollbarThemeClient&) override { return false; } |
| 89 bool hasThumb(const ScrollbarThemeClient&) override; | 89 bool hasThumb(const ScrollbarThemeClient&) override; |
| 90 | 90 |
| 91 int minimumThumbLength(const ScrollbarThemeClient&) override; | 91 int minimumThumbLength(const ScrollbarThemeClient&) override; |
| 92 | 92 |
| 93 RefPtr<Pattern> m_overhangPattern; | 93 RefPtr<Pattern> m_overhangPattern; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } | 96 } |
| 97 | 97 |
| 98 #endif // ScrollbarThemeMac_h | 98 #endif // ScrollbarThemeMac_h |
| OLD | NEW |