OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 | 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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 return getAttribute(aria_invalidAttr); | 1342 return getAttribute(aria_invalidAttr); |
1343 | 1343 |
1344 return String(); | 1344 return String(); |
1345 } | 1345 } |
1346 | 1346 |
1347 String AXNodeObject::valueDescription() const | 1347 String AXNodeObject::valueDescription() const |
1348 { | 1348 { |
1349 if (!supportsRangeValue()) | 1349 if (!supportsRangeValue()) |
1350 return String(); | 1350 return String(); |
1351 | 1351 |
1352 return getAttribute(aria_valuetextAttr).string(); | 1352 return getAttribute(aria_valuetextAttr).getString(); |
1353 } | 1353 } |
1354 | 1354 |
1355 float AXNodeObject::valueForRange() const | 1355 float AXNodeObject::valueForRange() const |
1356 { | 1356 { |
1357 if (hasAttribute(aria_valuenowAttr)) | 1357 if (hasAttribute(aria_valuenowAttr)) |
1358 return getAttribute(aria_valuenowAttr).toFloat(); | 1358 return getAttribute(aria_valuenowAttr).toFloat(); |
1359 | 1359 |
1360 if (isNativeSlider()) | 1360 if (isNativeSlider()) |
1361 return toHTMLInputElement(*getNode()).valueAsNumber(); | 1361 return toHTMLInputElement(*getNode()).valueAsNumber(); |
1362 | 1362 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 | 1521 |
1522 // Step 2E from: http://www.w3.org/TR/accname-aam-1.1 | 1522 // Step 2E from: http://www.w3.org/TR/accname-aam-1.1 |
1523 if (recursive && !inAriaLabelledByTraversal && isControl() && !isButton()) { | 1523 if (recursive && !inAriaLabelledByTraversal && isControl() && !isButton()) { |
1524 // No need to set any name source info in a recursive call. | 1524 // No need to set any name source info in a recursive call. |
1525 if (isTextControl()) | 1525 if (isTextControl()) |
1526 return text(); | 1526 return text(); |
1527 | 1527 |
1528 if (isRange()) { | 1528 if (isRange()) { |
1529 const AtomicString& ariaValuetext = getAttribute(aria_valuetextAttr)
; | 1529 const AtomicString& ariaValuetext = getAttribute(aria_valuetextAttr)
; |
1530 if (!ariaValuetext.isNull()) | 1530 if (!ariaValuetext.isNull()) |
1531 return ariaValuetext.string(); | 1531 return ariaValuetext.getString(); |
1532 return String::number(valueForRange()); | 1532 return String::number(valueForRange()); |
1533 } | 1533 } |
1534 | 1534 |
1535 return stringValue(); | 1535 return stringValue(); |
1536 } | 1536 } |
1537 | 1537 |
1538 // Step 2D from: http://www.w3.org/TR/accname-aam-1.1 | 1538 // Step 2D from: http://www.w3.org/TR/accname-aam-1.1 |
1539 textAlternative = nativeTextAlternative(visited, nameFrom, relatedObjects, n
ameSources, &foundTextAlternative); | 1539 textAlternative = nativeTextAlternative(visited, nameFrom, relatedObjects, n
ameSources, &foundTextAlternative); |
1540 if (!textAlternative.isEmpty() && !nameSources) | 1540 if (!textAlternative.isEmpty() && !nameSources) |
1541 return textAlternative; | 1541 return textAlternative; |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 return placeholder; | 2759 return placeholder; |
2760 } | 2760 } |
2761 | 2761 |
2762 DEFINE_TRACE(AXNodeObject) | 2762 DEFINE_TRACE(AXNodeObject) |
2763 { | 2763 { |
2764 visitor->trace(m_node); | 2764 visitor->trace(m_node); |
2765 AXObject::trace(visitor); | 2765 AXObject::trace(visitor); |
2766 } | 2766 } |
2767 | 2767 |
2768 } // namespace blink | 2768 } // namespace blink |
OLD | NEW |