| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 } | 218 } |
| 219 | 219 |
| 220 bool WebAXObject::isAnchor() const | 220 bool WebAXObject::isAnchor() const |
| 221 { | 221 { |
| 222 if (isDetached()) | 222 if (isDetached()) |
| 223 return false; | 223 return false; |
| 224 | 224 |
| 225 return m_private->isAnchor(); | 225 return m_private->isAnchor(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 WebAXOptionalBool WebAXObject::isAriaGrabbed() const | |
| 229 { | |
| 230 if (isDetached()) | |
| 231 return WebAXOptionalBoolUndefined; | |
| 232 | |
| 233 return static_cast<WebAXOptionalBool>(m_private->isAriaGrabbed()); | |
| 234 } | |
| 235 | |
| 236 bool WebAXObject::isAriaReadOnly() const | 228 bool WebAXObject::isAriaReadOnly() const |
| 237 { | 229 { |
| 238 if (isDetached()) | 230 if (isDetached()) |
| 239 return false; | 231 return false; |
| 240 | 232 |
| 241 return equalIgnoringCase(m_private->getAttribute(HTMLNames::aria_readonlyAtt
r), "true"); | 233 return equalIgnoringCase(m_private->getAttribute(HTMLNames::aria_readonlyAtt
r), "true"); |
| 242 } | 234 } |
| 243 | 235 |
| 244 WebString WebAXObject::ariaAutoComplete() const | 236 WebString WebAXObject::ariaAutoComplete() const |
| 245 { | 237 { |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 m_private->ariaControlsElements(controls); | 481 m_private->ariaControlsElements(controls); |
| 490 | 482 |
| 491 WebVector<WebAXObject> result(controls.size()); | 483 WebVector<WebAXObject> result(controls.size()); |
| 492 for (size_t i = 0; i < controls.size(); i++) | 484 for (size_t i = 0; i < controls.size(); i++) |
| 493 result[i] = WebAXObject(controls[i]); | 485 result[i] = WebAXObject(controls[i]); |
| 494 controlsElements.swap(result); | 486 controlsElements.swap(result); |
| 495 | 487 |
| 496 return true; | 488 return true; |
| 497 } | 489 } |
| 498 | 490 |
| 499 WebString WebAXObject::ariaDropEffect() const | |
| 500 { | |
| 501 if (isDetached()) | |
| 502 return WebString(); | |
| 503 | |
| 504 return WebString(m_private->ariaDropEffect()); | |
| 505 } | |
| 506 | |
| 507 bool WebAXObject::ariaHasPopup() const | 491 bool WebAXObject::ariaHasPopup() const |
| 508 { | 492 { |
| 509 if (isDetached()) | 493 if (isDetached()) |
| 510 return false; | 494 return false; |
| 511 | 495 |
| 512 return m_private->ariaHasPopup(); | 496 return m_private->ariaHasPopup(); |
| 513 } | 497 } |
| 514 | 498 |
| 515 bool WebAXObject::ariaFlowTo(WebVector<WebAXObject>& flowToElements) const | 499 bool WebAXObject::ariaFlowTo(WebVector<WebAXObject>& flowToElements) const |
| 516 { | 500 { |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 | 1219 |
| 1236 size_t vectorSize = lineBreaksVector.size(); | 1220 size_t vectorSize = lineBreaksVector.size(); |
| 1237 WebVector<int> lineBreaksWebVector(vectorSize); | 1221 WebVector<int> lineBreaksWebVector(vectorSize); |
| 1238 for (size_t i = 0; i< vectorSize; i++) | 1222 for (size_t i = 0; i< vectorSize; i++) |
| 1239 lineBreaksWebVector[i] = lineBreaksVector[i]; | 1223 lineBreaksWebVector[i] = lineBreaksVector[i]; |
| 1240 result.swap(lineBreaksWebVector); | 1224 result.swap(lineBreaksWebVector); |
| 1241 | 1225 |
| 1242 return true; | 1226 return true; |
| 1243 } | 1227 } |
| 1244 | 1228 |
| 1245 WebString WebAXObject::textInputType() const | |
| 1246 { | |
| 1247 if (isDetached()) | |
| 1248 return WebString(); | |
| 1249 | |
| 1250 return WebString(m_private->textInputType()); | |
| 1251 } | |
| 1252 | |
| 1253 unsigned WebAXObject::columnCount() const | 1229 unsigned WebAXObject::columnCount() const |
| 1254 { | 1230 { |
| 1255 if (isDetached()) | 1231 if (isDetached()) |
| 1256 return false; | 1232 return false; |
| 1257 | 1233 |
| 1258 if (!m_private->isAXTable()) | 1234 if (!m_private->isAXTable()) |
| 1259 return 0; | 1235 return 0; |
| 1260 | 1236 |
| 1261 return toAXTable(m_private.get())->columnCount(); | 1237 return toAXTable(m_private.get())->columnCount(); |
| 1262 } | 1238 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1594 m_private = object; | 1570 m_private = object; |
| 1595 return *this; | 1571 return *this; |
| 1596 } | 1572 } |
| 1597 | 1573 |
| 1598 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1574 WebAXObject::operator WTF::PassRefPtr<AXObject>() const |
| 1599 { | 1575 { |
| 1600 return m_private.get(); | 1576 return m_private.get(); |
| 1601 } | 1577 } |
| 1602 | 1578 |
| 1603 } // namespace blink | 1579 } // namespace blink |
| OLD | NEW |