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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 bool m_isAlphaLocked; | 186 bool m_isAlphaLocked; |
187 | 187 |
188 private: | 188 private: |
189 virtual bool isScrollbar() const { return true; } | 189 virtual bool isScrollbar() const { return true; } |
190 virtual AXObjectCache* existingAXObjectCache() const; | 190 virtual AXObjectCache* existingAXObjectCache() const; |
191 | 191 |
192 float scrollableAreaCurrentPos() const; | 192 float scrollableAreaCurrentPos() const; |
193 }; | 193 }; |
194 | 194 |
| 195 inline Scrollbar* toScrollbar(Widget* widget) |
| 196 { |
| 197 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); |
| 198 return static_cast<Scrollbar*>(widget); |
| 199 } |
| 200 |
| 201 inline const Scrollbar* toScrollbar(const Widget* widget) |
| 202 { |
| 203 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isScrollbar()); |
| 204 return static_cast<const Scrollbar*>(widget); |
| 205 } |
| 206 |
| 207 // This will catch anyone doing an unnecessary cast. |
| 208 void toScrollbar(const Scrollbar*); |
| 209 |
195 } // namespace WebCore | 210 } // namespace WebCore |
196 | 211 |
197 #endif // Scrollbar_h | 212 #endif // Scrollbar_h |
OLD | NEW |