Index: Source/core/accessibility/AccessibilityMenuListOption.h |
diff --git a/Source/core/accessibility/AccessibilityMenuListOption.h b/Source/core/accessibility/AccessibilityMenuListOption.h |
index 91ca5ef648383a1de12e9ad5512c9b6cb5fb6440..0cda8db0894ddffe7c3ad18b8e7ebf4d6b77990a 100644 |
--- a/Source/core/accessibility/AccessibilityMenuListOption.h |
+++ b/Source/core/accessibility/AccessibilityMenuListOption.h |
@@ -61,6 +61,21 @@ private: |
RefPtr<HTMLElement> m_element; |
}; |
+inline AccessibilityMenuListOption* toAccessibilityMenuListOption(AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isMenuListOption()); |
+ return static_cast<AccessibilityMenuListOption*>(object); |
+} |
+ |
+inline const AccessibilityMenuListOption* toAccessibilityMenuListOption(const AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isMenuListOption()); |
+ return static_cast<const AccessibilityMenuListOption*>(object); |
+} |
+ |
+// This will catch anyone doing an unnecessary cast. |
+void toAccessibilityMenuListOption(const AccessibilityMenuListOption*); |
+ |
} // namespace WebCore |
#endif // AccessibilityMenuListOption_h |