OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 AccessibilityObject* parent = parentObjectUnignored(); | 74 AccessibilityObject* parent = parentObjectUnignored(); |
75 if (!parent) | 75 if (!parent) |
76 return; | 76 return; |
77 | 77 |
78 if (parent->isTableRow()) { | 78 if (parent->isTableRow()) { |
79 // We already got a table row, use its API. | 79 // We already got a table row, use its API. |
80 rowRange.first = static_cast<AccessibilityTableRow*>(parent)->rowIndex()
; | 80 rowRange.first = static_cast<AccessibilityTableRow*>(parent)->rowIndex()
; |
81 } else if (parent->isAccessibilityTable()) { | 81 } else if (parent->isAccessibilityTable()) { |
82 // We reached the parent table, so we need to inspect its | 82 // We reached the parent table, so we need to inspect its |
83 // children to determine the row index for the cell in it. | 83 // children to determine the row index for the cell in it. |
84 unsigned columnCount = static_cast<AccessibilityTable*>(parent)->columnC
ount(); | 84 unsigned columnCount = toAccessibilityTable(parent)->columnCount(); |
85 if (!columnCount) | 85 if (!columnCount) |
86 return; | 86 return; |
87 | 87 |
88 AccessibilityChildrenVector siblings = parent->children(); | 88 AccessibilityChildrenVector siblings = parent->children(); |
89 unsigned childrenSize = siblings.size(); | 89 unsigned childrenSize = siblings.size(); |
90 for (unsigned k = 0; k < childrenSize; ++k) { | 90 for (unsigned k = 0; k < childrenSize; ++k) { |
91 if (siblings[k].get() == this) { | 91 if (siblings[k].get() == this) { |
92 rowRange.first = k / columnCount; | 92 rowRange.first = k / columnCount; |
93 break; | 93 break; |
94 } | 94 } |
(...skipping 20 matching lines...) Expand all Loading... |
115 columnRange.first = k; | 115 columnRange.first = k; |
116 break; | 116 break; |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 // as far as I can tell, grid cells cannot span columns | 120 // as far as I can tell, grid cells cannot span columns |
121 columnRange.second = 1; | 121 columnRange.second = 1; |
122 } | 122 } |
123 | 123 |
124 } // namespace WebCore | 124 } // namespace WebCore |
OLD | NEW |