Index: Source/core/accessibility/AccessibilityScrollbar.h |
diff --git a/Source/core/accessibility/AccessibilityScrollbar.h b/Source/core/accessibility/AccessibilityScrollbar.h |
index fe0714aa3eb2a6634672ea12d4654713260ed566..7696f62c88ea163ef43f08da38e3832444d45949 100644 |
--- a/Source/core/accessibility/AccessibilityScrollbar.h |
+++ b/Source/core/accessibility/AccessibilityScrollbar.h |
@@ -64,6 +64,21 @@ private: |
RefPtr<Scrollbar> m_scrollbar; |
}; |
+inline AccessibilityScrollbar* toAccessibilityScrollbar(AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAccessibilityScrollbar()); |
+ return static_cast<AccessibilityScrollbar*>(object); |
+} |
+ |
+inline const AccessibilityScrollbar* toAccessibilityScrollbar(const AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAccessibilityScrollbar()); |
+ return static_cast<const AccessibilityScrollbar*>(object); |
+} |
+ |
+// This will catch anyone doing an unnecessary cast. |
+void toAccessibilityScrollbar(const AccessibilityScrollbar*); |
+ |
} // namespace WebCore |
#endif // AccessibilityScrollbar_h |