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

Unified Diff: Source/core/accessibility/AXMenuListPopup.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/AXMenuListPopup.h
diff --git a/Source/core/accessibility/AXMenuListPopup.h b/Source/core/accessibility/AXMenuListPopup.h
index 643cf9ba24f4bb04cef85f55da58a3e29c3b89c5..44b8917aefa0786fd2cee102c1e3b4074d9b24c8 100644
--- a/Source/core/accessibility/AXMenuListPopup.h
+++ b/Source/core/accessibility/AXMenuListPopup.h
@@ -61,20 +61,7 @@ private:
AXMenuListOption* menuListOptionAXObject(HTMLElement*) const;
};
-inline AXMenuListPopup* toAXMenuListPopup(AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isMenuListPopup());
- return static_cast<AXMenuListPopup*>(object);
-}
-
-inline const AXMenuListPopup* toAXMenuListPopup(const AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isMenuListPopup());
- return static_cast<const AXMenuListPopup*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toAXMenuListPopup(const AXMenuListPopup*);
+DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, isMenuListPopup());
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698