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

Unified Diff: Source/core/accessibility/AXScrollbar.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. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AXScrollbar.h
diff --git a/Source/core/accessibility/AXScrollbar.h b/Source/core/accessibility/AXScrollbar.h
index 37fcdc8a383b7d489d3aa5767646ad62406ed494..42eaca23470d57f8c596f83f7c1177f002085d6d 100644
--- a/Source/core/accessibility/AXScrollbar.h
+++ b/Source/core/accessibility/AXScrollbar.h
@@ -64,20 +64,7 @@ private:
RefPtr<Scrollbar> m_scrollbar;
};
-inline AXScrollbar* toAXScrollbar(AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAXScrollbar());
- return static_cast<AXScrollbar*>(object);
-}
-
-inline const AXScrollbar* toAXScrollbar(const AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAXScrollbar());
- return static_cast<const AXScrollbar*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toAXScrollbar(const AXScrollbar*);
+DEFINE_AX_OBJECT_TYPE_CASTS(AXScrollbar, isAXScrollbar());
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698