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

Side by Side Diff: Source/core/accessibility/AccessibilityTableCell.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, 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 int m_rowIndex; 53 int m_rowIndex;
54 virtual AccessibilityRole determineAccessibilityRole() OVERRIDE; 54 virtual AccessibilityRole determineAccessibilityRole() OVERRIDE;
55 55
56 private: 56 private:
57 // If a table cell is not exposed as a table cell, a TH element can serve as its title UI element. 57 // If a table cell is not exposed as a table cell, a TH element can serve as its title UI element.
58 virtual AccessibilityObject* titleUIElement() const OVERRIDE; 58 virtual AccessibilityObject* titleUIElement() const OVERRIDE;
59 virtual bool exposesTitleUIElement() const OVERRIDE { return true; } 59 virtual bool exposesTitleUIElement() const OVERRIDE { return true; }
60 virtual bool computeAccessibilityIsIgnored() const OVERRIDE; 60 virtual bool computeAccessibilityIsIgnored() const OVERRIDE;
61 }; 61 };
62 62
63 inline AccessibilityTableCell* toAccessibilityTableCell(AccessibilityObject* obj ect)
64 {
65 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCell());
66 return static_cast<AccessibilityTableCell*>(object);
67 }
68
69 inline const AccessibilityTableCell* toAccessibilityTableCell(const Accessibilit yObject* object)
70 {
71 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCell());
72 return static_cast<const AccessibilityTableCell*>(object);
73 }
74
75 // This will catch anyone doing an unnecessary cast.
76 void toAccessibilityTableCell(const AccessibilityTableCell*);
77
63 } // namespace WebCore 78 } // namespace WebCore
64 79
65 #endif // AccessibilityTableCell_h 80 #endif // AccessibilityTableCell_h
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilityTable.cpp ('k') | Source/core/accessibility/AccessibilityTableColumn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698