Chromium Code Reviews

Unified Diff: Source/core/accessibility/AXRenderObject.h

Issue 31463002: Introduce DEFINE_AX_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class (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.
Jump to:
View side-by-side diff with in-line comments
Index: Source/core/accessibility/AXRenderObject.h
diff --git a/Source/core/accessibility/AXRenderObject.h b/Source/core/accessibility/AXRenderObject.h
index 6c73eb500458a7a7db9638112caea13ff483e180..160d0d7db3aa34da2e86e70d81318c6d28d42964 100644
--- a/Source/core/accessibility/AXRenderObject.h
+++ b/Source/core/accessibility/AXRenderObject.h
@@ -231,20 +231,7 @@ private:
int indexForVisiblePosition(const VisiblePosition&) const;
};
-inline AXRenderObject* toAXRenderObject(AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAXRenderObject());
- return static_cast<AXRenderObject*>(object);
-}
-
-inline const AXRenderObject* toAXRenderObject(const AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAXRenderObject());
- return static_cast<const AXRenderObject*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toAXRenderObject(const AXRenderObject*);
+DEFINE_AX_OBJECT_TYPE_CASTS(AXRenderObject, isAXRenderObject());
} // namespace WebCore

Powered by Google App Engine