Index: Source/core/accessibility/AccessibilityImageMapLink.h |
diff --git a/Source/core/accessibility/AccessibilityImageMapLink.h b/Source/core/accessibility/AccessibilityImageMapLink.h |
index 92345dcab1fed428ca9133d466aeaae6a1009176..05941d3e62c5c58580cd9e8691320a8374f3514b 100644 |
--- a/Source/core/accessibility/AccessibilityImageMapLink.h |
+++ b/Source/core/accessibility/AccessibilityImageMapLink.h |
@@ -75,6 +75,21 @@ private: |
virtual bool isImageMapLink() const OVERRIDE { return true; } |
}; |
+inline AccessibilityImageMapLink* toAccessibilityImageMapLink(AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isImageMapLink()); |
+ return static_cast<AccessibilityImageMapLink*>(object); |
+} |
+ |
+inline const AccessibilityImageMapLink* toAccessibilityImageMapLink(const AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isImageMapLink()); |
+ return static_cast<const AccessibilityImageMapLink*>(object); |
+} |
+ |
+// This will catch anyone doing an unnecessary cast. |
+void toAccessibilityImageMapLink(const AccessibilityImageMapLink*); |
+ |
} // namespace WebCore |
#endif // AccessibilityImageMapLink_h |