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

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

Issue 24752002: Cleanup <static_cast>: Switch to toFoo for Accessibility Objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/AccessibilityTableRow.h
diff --git a/Source/core/accessibility/AccessibilityTableRow.h b/Source/core/accessibility/AccessibilityTableRow.h
index 3f9faa9f0c35b2a8e70016ccccad2d132326ef28..3a0a6a1a33d28ec4979dab7cc39d25ce87f31d6b 100644
--- a/Source/core/accessibility/AccessibilityTableRow.h
+++ b/Source/core/accessibility/AccessibilityTableRow.h
@@ -64,6 +64,21 @@ private:
virtual bool computeAccessibilityIsIgnored() const OVERRIDE;
};
+inline AccessibilityTableRow* toAccessibilityTableRow(AccessibilityObject* object)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableRow());
+ return static_cast<AccessibilityTableRow*>(object);
+}
+
+inline const AccessibilityTableRow* toAccessibilityTableRow(const AccessibilityObject* object)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableRow());
+ return static_cast<const AccessibilityTableRow*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toAccessibilityTableRow(const AccessibilityTableRow*);
+
} // namespace WebCore
#endif // AccessibilityTableRow_h
« no previous file with comments | « Source/core/accessibility/AccessibilityTableColumn.h ('k') | Source/core/accessibility/AccessibilityTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698