Index: Source/core/accessibility/AccessibilityTableCell.h |
diff --git a/Source/core/accessibility/AccessibilityTableCell.h b/Source/core/accessibility/AccessibilityTableCell.h |
index 844c56ab59eb006746d041ceec9006ceecd2d464..46959f41dcc6c9c7e10489869cb34afb1cd94e3e 100644 |
--- a/Source/core/accessibility/AccessibilityTableCell.h |
+++ b/Source/core/accessibility/AccessibilityTableCell.h |
@@ -60,6 +60,21 @@ private: |
virtual bool computeAccessibilityIsIgnored() const OVERRIDE; |
}; |
+inline AccessibilityTableCell* toAccessibilityTableCell(AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCell()); |
+ return static_cast<AccessibilityTableCell*>(object); |
+} |
+ |
+inline const AccessibilityTableCell* toAccessibilityTableCell(const AccessibilityObject* object) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCell()); |
+ return static_cast<const AccessibilityTableCell*>(object); |
+} |
+ |
+// This will catch anyone doing an unnecessary cast. |
+void toAccessibilityTableCell(const AccessibilityTableCell*); |
+ |
} // namespace WebCore |
#endif // AccessibilityTableCell_h |