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

Side by Side 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, 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 53
54 virtual void addChildren() OVERRIDE; 54 virtual void addChildren() OVERRIDE;
55 virtual void setParent(AccessibilityObject*) OVERRIDE; 55 virtual void setParent(AccessibilityObject*) OVERRIDE;
56 56
57 virtual LayoutRect elementRect() const OVERRIDE; 57 virtual LayoutRect elementRect() const OVERRIDE;
58 58
59 private: 59 private:
60 unsigned m_columnIndex; 60 unsigned m_columnIndex;
61 LayoutRect m_columnRect; 61 LayoutRect m_columnRect;
62 62
63 virtual bool isTableCol() const OVERRIDE { return true; }
63 AccessibilityObject* headerObjectForSection(RenderTableSection*, bool thTagR equired); 64 AccessibilityObject* headerObjectForSection(RenderTableSection*, bool thTagR equired);
64 virtual bool computeAccessibilityIsIgnored() const OVERRIDE; 65 virtual bool computeAccessibilityIsIgnored() const OVERRIDE;
65 }; 66 };
66 67
68 inline AccessibilityTableColumn* toAccessibilityTableColumn(AccessibilityObject* object)
69 {
70 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCol());
71 return static_cast<AccessibilityTableColumn*>(object);
72 }
73
74 inline const AccessibilityTableColumn* toAccessibilityTableColumn(const Accessib ilityObject* object)
75 {
76 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTableCol());
77 return static_cast<const AccessibilityTableColumn*>(object);
78 }
79
80 // This will catch anyone doing an unnecessary cast.
81 void toAccessibilityTableColumn(const AccessibilityTableColumn*);
82
67 } // namespace WebCore 83 } // namespace WebCore
68 84
69 #endif // AccessibilityTableColumn_h 85 #endif // AccessibilityTableColumn_h
OLDNEW
« 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