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

Side by Side Diff: Source/core/accessibility/AccessibilityTableRow.cpp

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
« no previous file with comments | « Source/core/accessibility/AccessibilityTableRow.h ('k') | Source/core/platform/Scrollbar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 AccessibilityChildrenVector rowChildren = children(); 112 AccessibilityChildrenVector rowChildren = children();
113 if (!rowChildren.size()) 113 if (!rowChildren.size())
114 return 0; 114 return 0;
115 115
116 // check the first element in the row to see if it is a TH element 116 // check the first element in the row to see if it is a TH element
117 AccessibilityObject* cell = rowChildren[0].get(); 117 AccessibilityObject* cell = rowChildren[0].get();
118 if (!cell->isTableCell()) 118 if (!cell->isTableCell())
119 return 0; 119 return 0;
120 120
121 RenderObject* cellRenderer = static_cast<AccessibilityTableCell*>(cell)->ren derer(); 121 RenderObject* cellRenderer = toAccessibilityTableCell(cell)->renderer();
122 if (!cellRenderer) 122 if (!cellRenderer)
123 return 0; 123 return 0;
124 124
125 Node* cellNode = cellRenderer->node(); 125 Node* cellNode = cellRenderer->node();
126 if (!cellNode || !cellNode->hasTagName(thTag)) 126 if (!cellNode || !cellNode->hasTagName(thTag))
127 return 0; 127 return 0;
128 128
129 return cell; 129 return cell;
130 } 130 }
131 131
132 } // namespace WebCore 132 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilityTableRow.h ('k') | Source/core/platform/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698