OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, 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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "platform/Timer.h" | 29 #include "platform/Timer.h" |
30 #include "platform/Widget.h" | 30 #include "platform/Widget.h" |
31 #include "platform/scroll/ScrollTypes.h" | 31 #include "platform/scroll/ScrollTypes.h" |
32 #include "platform/scroll/ScrollbarThemeClient.h" | 32 #include "platform/scroll/ScrollbarThemeClient.h" |
33 #include "wtf/MathExtras.h" | 33 #include "wtf/MathExtras.h" |
34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 class AXObjectCache; | |
39 class GraphicsContext; | 38 class GraphicsContext; |
40 class IntRect; | 39 class IntRect; |
41 class PlatformGestureEvent; | 40 class PlatformGestureEvent; |
42 class PlatformMouseEvent; | 41 class PlatformMouseEvent; |
43 class ScrollableArea; | 42 class ScrollableArea; |
44 class ScrollbarTheme; | 43 class ScrollbarTheme; |
45 class ScrollView; | 44 class ScrollView; |
46 | 45 |
47 class Scrollbar : public Widget, | 46 class Scrollbar : public Widget, |
48 public ScrollbarThemeClient { | 47 public ScrollbarThemeClient { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 185 |
187 Timer<Scrollbar> m_scrollTimer; | 186 Timer<Scrollbar> m_scrollTimer; |
188 bool m_overlapsResizer; | 187 bool m_overlapsResizer; |
189 | 188 |
190 bool m_suppressInvalidation; | 189 bool m_suppressInvalidation; |
191 | 190 |
192 bool m_isAlphaLocked; | 191 bool m_isAlphaLocked; |
193 | 192 |
194 private: | 193 private: |
195 virtual bool isScrollbar() const { return true; } | 194 virtual bool isScrollbar() const { return true; } |
196 virtual AXObjectCache* existingAXObjectCache() const; | |
197 | 195 |
198 float scrollableAreaCurrentPos() const; | 196 float scrollableAreaCurrentPos() const; |
199 }; | 197 }; |
200 | 198 |
201 inline Scrollbar* toScrollbar(Widget* widget) | 199 inline Scrollbar* toScrollbar(Widget* widget) |
202 { | 200 { |
203 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); | 201 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); |
204 return static_cast<Scrollbar*>(widget); | 202 return static_cast<Scrollbar*>(widget); |
205 } | 203 } |
206 | 204 |
207 inline const Scrollbar* toScrollbar(const Widget* widget) | 205 inline const Scrollbar* toScrollbar(const Widget* widget) |
208 { | 206 { |
209 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); | 207 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); |
210 return static_cast<const Scrollbar*>(widget); | 208 return static_cast<const Scrollbar*>(widget); |
211 } | 209 } |
212 | 210 |
213 // This will catch anyone doing an unnecessary cast. | 211 // This will catch anyone doing an unnecessary cast. |
214 void toScrollbar(const Scrollbar*); | 212 void toScrollbar(const Scrollbar*); |
215 | 213 |
216 } // namespace WebCore | 214 } // namespace WebCore |
217 | 215 |
218 #endif // Scrollbar_h | 216 #endif // Scrollbar_h |
OLD | NEW |