Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1041)

Side by Side Diff: Source/core/platform/Scrollbar.h

Issue 24752002: Cleanup <static_cast>: Switch to toFoo for Accessibility Objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/accessibility/AccessibilityTableRow.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilityTableRow.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698