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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 float autoscrollButtonDelay, | 47 float autoscrollButtonDelay, |
48 NSScrollerStyle preferredScrollerStyle, | 48 NSScrollerStyle preferredScrollerStyle, |
49 bool redraw, | 49 bool redraw, |
50 WebScrollbarButtonsPlacement); | 50 WebScrollbarButtonsPlacement); |
51 | 51 |
52 bool supportsControlTints() const override { return true; } | 52 bool supportsControlTints() const override { return true; } |
53 | 53 |
54 double initialAutoscrollTimerDelay() override; | 54 double initialAutoscrollTimerDelay() override; |
55 double autoscrollTimerDelay() override; | 55 double autoscrollTimerDelay() override; |
56 | 56 |
57 void paintTickmarks(GraphicsContext&, | 57 void paintTickmarks(GraphicsContext&, |
bokan
2016/11/15 02:03:28
Don't override paintTickmarks. Add a new method `v
| |
58 const Scrollbar&, | 58 const Scrollbar&, |
59 const IntRect&) override; | 59 const IntRect&) override; |
60 | 60 |
61 bool shouldRepaintAllPartsOnInvalidation() const override { return false; } | 61 bool shouldRepaintAllPartsOnInvalidation() const override { return false; } |
62 ScrollbarPart invalidateOnThumbPositionChange( | 62 ScrollbarPart invalidateOnThumbPositionChange( |
63 const ScrollbarThemeClient&, | 63 const ScrollbarThemeClient&, |
64 float oldPosition, | 64 float oldPosition, |
65 float newPosition) const override; | 65 float newPosition) const override; |
66 void updateEnabledState(const ScrollbarThemeClient&) override; | 66 void updateEnabledState(const ScrollbarThemeClient&) override; |
67 int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override; | 67 int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override; |
(...skipping 15 matching lines...) Expand all Loading... | |
83 | 83 |
84 protected: | 84 protected: |
85 int maxOverlapBetweenPages() override { return 40; } | 85 int maxOverlapBetweenPages() override { return 40; } |
86 | 86 |
87 bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, | 87 bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, |
88 const PlatformMouseEvent&) override; | 88 const PlatformMouseEvent&) override; |
89 int scrollbarPartToHIPressedState(ScrollbarPart); | 89 int scrollbarPartToHIPressedState(ScrollbarPart); |
90 | 90 |
91 virtual void updateButtonPlacement(WebScrollbarButtonsPlacement) {} | 91 virtual void updateButtonPlacement(WebScrollbarButtonsPlacement) {} |
92 | 92 |
93 void paintGivenTickmarks(SkCanvas*, | |
94 const Scrollbar&, | |
95 const IntRect&, | |
96 const Vector<IntRect>&); | |
97 | |
98 IntRect trackRect(const ScrollbarThemeClient&, | 93 IntRect trackRect(const ScrollbarThemeClient&, |
99 bool painting = false) override; | 94 bool painting = false) override; |
100 IntRect backButtonRect(const ScrollbarThemeClient&, | 95 IntRect backButtonRect(const ScrollbarThemeClient&, |
101 ScrollbarPart, | 96 ScrollbarPart, |
102 bool painting = false) override; | 97 bool painting = false) override; |
103 IntRect forwardButtonRect(const ScrollbarThemeClient&, | 98 IntRect forwardButtonRect(const ScrollbarThemeClient&, |
104 ScrollbarPart, | 99 ScrollbarPart, |
105 bool painting = false) override; | 100 bool painting = false) override; |
106 | 101 |
107 bool hasButtons(const ScrollbarThemeClient&) override { return false; } | 102 bool hasButtons(const ScrollbarThemeClient&) override { return false; } |
108 bool hasThumb(const ScrollbarThemeClient&) override; | 103 bool hasThumb(const ScrollbarThemeClient&) override; |
109 | 104 |
110 int minimumThumbLength(const ScrollbarThemeClient&) override; | 105 int minimumThumbLength(const ScrollbarThemeClient&) override; |
111 | 106 |
112 RefPtr<Pattern> m_overhangPattern; | 107 RefPtr<Pattern> m_overhangPattern; |
113 }; | 108 }; |
114 } | 109 } |
115 | 110 |
116 #endif // ScrollbarThemeMac_h | 111 #endif // ScrollbarThemeMac_h |
OLD | NEW |