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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 virtual int scrollbarMargin() const { return 0; } | 55 virtual int scrollbarMargin() const { return 0; } |
56 | 56 |
57 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba
rButtonsPlacementSingle; } | 57 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba
rButtonsPlacementSingle; } |
58 | 58 |
59 virtual bool supportsControlTints() const { return false; } | 59 virtual bool supportsControlTints() const { return false; } |
60 virtual bool usesOverlayScrollbars() const { return false; } | 60 virtual bool usesOverlayScrollbars() const { return false; } |
61 virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) { } | 61 virtual void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) { } |
62 | 62 |
63 virtual bool invalidateOnMouseEnterExit() { return false; } | 63 virtual bool invalidateOnMouseEnterExit() { return false; } |
64 | 64 |
| 65 void invalidateParts(ScrollbarThemeClient* scrollbar, ScrollbarControlPartMa
sk mask) |
| 66 { |
| 67 if (mask & BackButtonStartPart) |
| 68 invalidatePart(scrollbar, BackButtonStartPart); |
| 69 if (mask & ForwardButtonStartPart) |
| 70 invalidatePart(scrollbar, ForwardButtonStartPart); |
| 71 if (mask & BackTrackPart) |
| 72 invalidatePart(scrollbar, BackTrackPart); |
| 73 if (mask & ThumbPart) |
| 74 invalidatePart(scrollbar, ThumbPart); |
| 75 if (mask & ForwardTrackPart) |
| 76 invalidatePart(scrollbar, ForwardTrackPart); |
| 77 if (mask & BackButtonEndPart) |
| 78 invalidatePart(scrollbar, BackButtonEndPart); |
| 79 if (mask & ForwardButtonEndPart) |
| 80 invalidatePart(scrollbar, ForwardButtonEndPart); |
| 81 } |
| 82 |
| 83 virtual void invalidatePart(ScrollbarThemeClient*, ScrollbarPart); |
| 84 |
65 virtual void paintScrollCorner(GraphicsContext*, const DisplayItemClientWrap
per&, const IntRect& cornerRect); | 85 virtual void paintScrollCorner(GraphicsContext*, const DisplayItemClientWrap
per&, const IntRect& cornerRect); |
66 virtual void paintTickmarks(GraphicsContext*, const ScrollbarThemeClient*, c
onst IntRect&) { } | 86 virtual void paintTickmarks(GraphicsContext*, const ScrollbarThemeClient*, c
onst IntRect&) { } |
67 | 87 |
68 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient*, const Platform
MouseEvent&); | 88 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient*, const Platform
MouseEvent&); |
69 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient*, const P
latformMouseEvent&); | 89 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient*, const P
latformMouseEvent&); |
70 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient*, c
onst PlatformMouseEvent&) { return false; } | 90 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient*, c
onst PlatformMouseEvent&) { return false; } |
71 | 91 |
72 // The position of the thumb relative to the track. | 92 // The position of the thumb relative to the track. |
73 virtual int thumbPosition(const ScrollbarThemeClient*); | 93 virtual int thumbPosition(const ScrollbarThemeClient*); |
74 // The length of the thumb along the axis of the scrollbar. | 94 // The length of the thumb along the axis of the scrollbar. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); | 138 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); |
119 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); | 139 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); |
120 | 140 |
121 private: | 141 private: |
122 static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
orrect theme subclass. | 142 static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
orrect theme subclass. |
123 static bool gMockScrollbarsEnabled; | 143 static bool gMockScrollbarsEnabled; |
124 }; | 144 }; |
125 | 145 |
126 } | 146 } |
127 #endif | 147 #endif |
OLD | NEW |