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

Unified Diff: Source/core/accessibility/AXListBoxOption.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
« no previous file with comments | « Source/core/accessibility/AXImageMapLink.h ('k') | Source/core/accessibility/AXMenuList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXListBoxOption.h
diff --git a/Source/core/accessibility/AXListBoxOption.h b/Source/core/accessibility/AXListBoxOption.h
index 63c634a1d7c3ec93b235ebc51070e466becd9cb0..02e04330ebc45d1448d318a51d5c4fe9f3c4c9ab 100644
--- a/Source/core/accessibility/AXListBoxOption.h
+++ b/Source/core/accessibility/AXListBoxOption.h
@@ -75,20 +75,7 @@ private:
AXObject* listBoxOptionAXObject(HTMLElement*) const;
};
-inline AXListBoxOption* toAXListBoxOption(AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBoxOption());
- return static_cast<AXListBoxOption*>(object);
-}
-
-inline const AXListBoxOption* toAXListBoxOption(const AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBoxOption());
- return static_cast<const AXListBoxOption*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toAXListBoxOption(const AXListBoxOption*);
+DEFINE_AX_OBJECT_TYPE_CASTS(AXListBoxOption, isListBoxOption());
r.kasibhatla 2013/10/21 12:28:31 Wouldn't it be better to construct even isFoo from
tkent 2013/10/21 22:06:11 We should go ahead with this CL as is, and discuss
} // namespace WebCore
« no previous file with comments | « Source/core/accessibility/AXImageMapLink.h ('k') | Source/core/accessibility/AXMenuList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698