| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 | 1155 |
| 1156 size_t vectorSize = lineBreaksVector.size(); | 1156 size_t vectorSize = lineBreaksVector.size(); |
| 1157 WebVector<int> lineBreaksWebVector(vectorSize); | 1157 WebVector<int> lineBreaksWebVector(vectorSize); |
| 1158 for (size_t i = 0; i< vectorSize; i++) | 1158 for (size_t i = 0; i< vectorSize; i++) |
| 1159 lineBreaksWebVector[i] = lineBreaksVector[i]; | 1159 lineBreaksWebVector[i] = lineBreaksVector[i]; |
| 1160 result.swap(lineBreaksWebVector); | 1160 result.swap(lineBreaksWebVector); |
| 1161 | 1161 |
| 1162 return true; | 1162 return true; |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 int WebAXObject::ariaColumnCount() const |
| 1166 { |
| 1167 if (isDetached()) |
| 1168 return 0; |
| 1169 |
| 1170 if (!m_private->isAXTable()) |
| 1171 return 0; |
| 1172 |
| 1173 return toAXTable(m_private.get())->ariaColumnCount(); |
| 1174 } |
| 1175 |
| 1176 unsigned WebAXObject::ariaColumnIndex() const |
| 1177 { |
| 1178 if (isDetached()) |
| 1179 return 0; |
| 1180 |
| 1181 if (!m_private->isTableCell()) |
| 1182 return 0; |
| 1183 |
| 1184 return toAXTableCell(m_private.get())->ariaColumnIndex(); |
| 1185 } |
| 1186 |
| 1187 int WebAXObject::ariaRowCount() const |
| 1188 { |
| 1189 if (isDetached()) |
| 1190 return 0; |
| 1191 |
| 1192 if (!m_private->isAXTable()) |
| 1193 return 0; |
| 1194 |
| 1195 return toAXTable(m_private.get())->ariaRowCount(); |
| 1196 } |
| 1197 |
| 1198 unsigned WebAXObject::ariaRowIndex() const |
| 1199 { |
| 1200 if (isDetached()) |
| 1201 return 0; |
| 1202 |
| 1203 if (m_private->isTableCell()) |
| 1204 return toAXTableCell(m_private.get())->ariaRowIndex(); |
| 1205 |
| 1206 if (m_private->isTableRow()) |
| 1207 return toAXTableRow(m_private.get())->ariaRowIndex(); |
| 1208 |
| 1209 return 0; |
| 1210 } |
| 1211 |
| 1165 unsigned WebAXObject::columnCount() const | 1212 unsigned WebAXObject::columnCount() const |
| 1166 { | 1213 { |
| 1167 if (isDetached()) | 1214 if (isDetached()) |
| 1168 return false; | 1215 return 0; |
| 1169 | 1216 |
| 1170 if (!m_private->isAXTable()) | 1217 if (!m_private->isAXTable()) |
| 1171 return 0; | 1218 return 0; |
| 1172 | 1219 |
| 1173 return toAXTable(m_private.get())->columnCount(); | 1220 return toAXTable(m_private.get())->columnCount(); |
| 1174 } | 1221 } |
| 1175 | 1222 |
| 1176 unsigned WebAXObject::rowCount() const | 1223 unsigned WebAXObject::rowCount() const |
| 1177 { | 1224 { |
| 1178 if (isDetached()) | 1225 if (isDetached()) |
| 1179 return false; | 1226 return 0; |
| 1180 | 1227 |
| 1181 if (!m_private->isAXTable()) | 1228 if (!m_private->isAXTable()) |
| 1182 return 0; | 1229 return 0; |
| 1183 | 1230 |
| 1184 return toAXTable(m_private.get())->rowCount(); | 1231 return toAXTable(m_private.get())->rowCount(); |
| 1185 } | 1232 } |
| 1186 | 1233 |
| 1187 WebAXObject WebAXObject::cellForColumnAndRow(unsigned column, unsigned row) cons
t | 1234 WebAXObject WebAXObject::cellForColumnAndRow(unsigned column, unsigned row) cons
t |
| 1188 { | 1235 { |
| 1189 if (isDetached()) | 1236 if (isDetached()) |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 m_private = object; | 1555 m_private = object; |
| 1509 return *this; | 1556 return *this; |
| 1510 } | 1557 } |
| 1511 | 1558 |
| 1512 WebAXObject::operator AXObject*() const | 1559 WebAXObject::operator AXObject*() const |
| 1513 { | 1560 { |
| 1514 return m_private.get(); | 1561 return m_private.get(); |
| 1515 } | 1562 } |
| 1516 | 1563 |
| 1517 } // namespace blink | 1564 } // namespace blink |
| OLD | NEW |