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

Unified Diff: Source/core/accessibility/AccessibilityTableColumn.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/AccessibilityTableColumn.h
diff --git a/Source/core/accessibility/AccessibilityTableColumn.h b/Source/core/accessibility/AccessibilityTableColumn.h
index 09de7ecab27c28c40214e26cd7d443739c06b421..bf0ffd3dacbfa6396d7c1bf73305935bf3954011 100644
--- a/Source/core/accessibility/AccessibilityTableColumn.h
+++ b/Source/core/accessibility/AccessibilityTableColumn.h
@@ -60,10 +60,26 @@ private:
unsigned m_columnIndex;
LayoutRect m_columnRect;
+ virtual bool isTableCol() const OVERRIDE { return true; }
AccessibilityObject* headerObjectForSection(RenderTableSection*, bool thTagRequired);
virtual bool computeAccessibilityIsIgnored() const OVERRIDE;
};
+inline AccessibilityTableColumn* toAccessibilityTableColumn(AccessibilityObject* object)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCol());
+ return static_cast<AccessibilityTableColumn*>(object);
+}
+
+inline const AccessibilityTableColumn* toAccessibilityTableColumn(const AccessibilityObject* object)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCol());
+ return static_cast<const AccessibilityTableColumn*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toAccessibilityTableColumn(const AccessibilityTableColumn*);
+
} // namespace WebCore
#endif // AccessibilityTableColumn_h
« no previous file with comments | « Source/core/accessibility/AccessibilityTableCell.h ('k') | Source/core/accessibility/AccessibilityTableRow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698