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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 const PlatformMouseEvent&); | 97 const PlatformMouseEvent&); |
98 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, | 98 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, |
99 const PlatformMouseEvent&) { | 99 const PlatformMouseEvent&) { |
100 return false; | 100 return false; |
101 } | 101 } |
102 | 102 |
103 // The position of the thumb relative to the track. | 103 // The position of the thumb relative to the track. |
104 int thumbPosition(const ScrollbarThemeClient& scrollbar) { | 104 int thumbPosition(const ScrollbarThemeClient& scrollbar) { |
105 return thumbPosition(scrollbar, scrollbar.currentPos()); | 105 return thumbPosition(scrollbar, scrollbar.currentPos()); |
106 } | 106 } |
107 // The position the thumb would have, relative to the track, at the specified
scroll position. | 107 // The position the thumb would have, relative to the track, at the specified |
| 108 // scroll position. |
108 virtual int thumbPosition(const ScrollbarThemeClient&, float scrollPosition); | 109 virtual int thumbPosition(const ScrollbarThemeClient&, float scrollPosition); |
109 // The length of the thumb along the axis of the scrollbar. | 110 // The length of the thumb along the axis of the scrollbar. |
110 virtual int thumbLength(const ScrollbarThemeClient&); | 111 virtual int thumbLength(const ScrollbarThemeClient&); |
111 // The position of the track relative to the scrollbar. | 112 // The position of the track relative to the scrollbar. |
112 virtual int trackPosition(const ScrollbarThemeClient&); | 113 virtual int trackPosition(const ScrollbarThemeClient&); |
113 // The length of the track along the axis of the scrollbar. | 114 // The length of the track along the axis of the scrollbar. |
114 virtual int trackLength(const ScrollbarThemeClient&); | 115 virtual int trackLength(const ScrollbarThemeClient&); |
115 // The opacity to be applied to the thumb. | 116 // The opacity to be applied to the thumb. |
116 virtual float thumbOpacity(const ScrollbarThemeClient&) const { return 1.0f; } | 117 virtual float thumbOpacity(const ScrollbarThemeClient&) const { return 1.0f; } |
117 | 118 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); | 179 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); |
179 | 180 |
180 private: | 181 private: |
181 static ScrollbarTheme& | 182 static ScrollbarTheme& |
182 nativeTheme(); // Must be implemented to return the correct theme subclass. | 183 nativeTheme(); // Must be implemented to return the correct theme subclass. |
183 static bool gMockScrollbarsEnabled; | 184 static bool gMockScrollbarsEnabled; |
184 }; | 185 }; |
185 | 186 |
186 } // namespace blink | 187 } // namespace blink |
187 #endif | 188 #endif |
OLD | NEW |