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

Unified Diff: Source/core/accessibility/AXSpinButton.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/AXSpinButton.h
diff --git a/Source/core/accessibility/AXSpinButton.h b/Source/core/accessibility/AXSpinButton.h
index c118926c91e9ad367a6573ba066154b429c16f36..12ae3adb23b56b71ab141cad11759f122f1ef225 100644
--- a/Source/core/accessibility/AXSpinButton.h
+++ b/Source/core/accessibility/AXSpinButton.h
@@ -70,17 +70,8 @@ private:
virtual LayoutRect elementRect() const OVERRIDE;
};
-inline AXSpinButton* toAXSpinButton(AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isNativeSpinButton());
- return static_cast<AXSpinButton*>(object);
-}
-
-inline AXSpinButtonPart* toAXSpinButtonPart(AXObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSpinButtonPart());
- return static_cast<AXSpinButtonPart*>(object);
-}
+DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButton, isNativeSpinButton());
+DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButtonPart, isSpinButtonPart());
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698