| 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 | 1100 |
| 1101 size_t vectorSize = lineBreaksVector.size(); | 1101 size_t vectorSize = lineBreaksVector.size(); |
| 1102 WebVector<int> lineBreaksWebVector(vectorSize); | 1102 WebVector<int> lineBreaksWebVector(vectorSize); |
| 1103 for (size_t i = 0; i < vectorSize; i++) | 1103 for (size_t i = 0; i < vectorSize; i++) |
| 1104 lineBreaksWebVector[i] = lineBreaksVector[i]; | 1104 lineBreaksWebVector[i] = lineBreaksVector[i]; |
| 1105 result.swap(lineBreaksWebVector); | 1105 result.swap(lineBreaksWebVector); |
| 1106 | 1106 |
| 1107 return true; | 1107 return true; |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 int WebAXObject::ariaColumnCount() const { |
| 1111 if (isDetached()) |
| 1112 return 0; |
| 1113 |
| 1114 if (!m_private->isAXTable()) |
| 1115 return 0; |
| 1116 |
| 1117 return toAXTable(m_private.get())->ariaColumnCount(); |
| 1118 } |
| 1119 |
| 1120 unsigned WebAXObject::ariaColumnIndex() const { |
| 1121 if (isDetached()) |
| 1122 return 0; |
| 1123 |
| 1124 if (!m_private->isTableCell()) |
| 1125 return 0; |
| 1126 |
| 1127 return toAXTableCell(m_private.get())->ariaColumnIndex(); |
| 1128 } |
| 1129 |
| 1130 int WebAXObject::ariaRowCount() const { |
| 1131 if (isDetached()) |
| 1132 return 0; |
| 1133 |
| 1134 if (!m_private->isAXTable()) |
| 1135 return 0; |
| 1136 |
| 1137 return toAXTable(m_private.get())->ariaRowCount(); |
| 1138 } |
| 1139 |
| 1140 unsigned WebAXObject::ariaRowIndex() const { |
| 1141 if (isDetached()) |
| 1142 return 0; |
| 1143 |
| 1144 if (m_private->isTableCell()) |
| 1145 return toAXTableCell(m_private.get())->ariaRowIndex(); |
| 1146 |
| 1147 if (m_private->isTableRow()) |
| 1148 return toAXTableRow(m_private.get())->ariaRowIndex(); |
| 1149 |
| 1150 return 0; |
| 1151 } |
| 1152 |
| 1110 unsigned WebAXObject::columnCount() const { | 1153 unsigned WebAXObject::columnCount() const { |
| 1111 if (isDetached()) | 1154 if (isDetached()) |
| 1112 return false; | 1155 return false; |
| 1113 | 1156 |
| 1114 if (!m_private->isAXTable()) | 1157 if (!m_private->isAXTable()) |
| 1115 return 0; | 1158 return 0; |
| 1116 | 1159 |
| 1117 return toAXTable(m_private.get())->columnCount(); | 1160 return toAXTable(m_private.get())->columnCount(); |
| 1118 } | 1161 } |
| 1119 | 1162 |
| 1120 unsigned WebAXObject::rowCount() const { | 1163 unsigned WebAXObject::rowCount() const { |
| 1121 if (isDetached()) | 1164 if (isDetached()) |
| 1122 return false; | 1165 return 0; |
| 1123 | 1166 |
| 1124 if (!m_private->isAXTable()) | 1167 if (!m_private->isAXTable()) |
| 1125 return 0; | 1168 return 0; |
| 1126 | 1169 |
| 1127 return toAXTable(m_private.get())->rowCount(); | 1170 return toAXTable(m_private.get())->rowCount(); |
| 1128 } | 1171 } |
| 1129 | 1172 |
| 1130 WebAXObject WebAXObject::cellForColumnAndRow(unsigned column, | 1173 WebAXObject WebAXObject::cellForColumnAndRow(unsigned column, |
| 1131 unsigned row) const { | 1174 unsigned row) const { |
| 1132 if (isDetached()) | 1175 if (isDetached()) |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 WebAXObject& WebAXObject::operator=(AXObject* object) { | 1510 WebAXObject& WebAXObject::operator=(AXObject* object) { |
| 1468 m_private = object; | 1511 m_private = object; |
| 1469 return *this; | 1512 return *this; |
| 1470 } | 1513 } |
| 1471 | 1514 |
| 1472 WebAXObject::operator AXObject*() const { | 1515 WebAXObject::operator AXObject*() const { |
| 1473 return m_private.get(); | 1516 return m_private.get(); |
| 1474 } | 1517 } |
| 1475 | 1518 |
| 1476 } // namespace blink | 1519 } // namespace blink |
| OLD | NEW |