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

Unified Diff: Source/core/accessibility/AccessibilityImageMapLink.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, 3 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/core/accessibility/AccessibilityARIAGridCell.cpp ('k') | Source/core/accessibility/AccessibilityListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698