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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 ariaLabeledByElements(elements); | 1130 ariaLabeledByElements(elements); |
1131 | 1131 |
1132 return accessibilityDescriptionForElements(elements); | 1132 return accessibilityDescriptionForElements(elements); |
1133 } | 1133 } |
1134 | 1134 |
1135 AccessibilityRole AXNodeObject::ariaRoleAttribute() const | 1135 AccessibilityRole AXNodeObject::ariaRoleAttribute() const |
1136 { | 1136 { |
1137 return m_ariaRole; | 1137 return m_ariaRole; |
1138 } | 1138 } |
1139 | 1139 |
| 1140 AccessibilityOptionalBool AXNodeObject::isAriaGrabbed() const |
| 1141 { |
| 1142 const AtomicString& grabbed = getAttribute(aria_grabbedAttr); |
| 1143 if (equalIgnoringCase(grabbed, "true")) |
| 1144 return OptionalBoolTrue; |
| 1145 if (equalIgnoringCase(grabbed, "false")) |
| 1146 return OptionalBoolFalse; |
| 1147 |
| 1148 return OptionalBoolUndefined; |
| 1149 } |
| 1150 |
1140 // When building the textUnderElement for an object, determine whether or not | 1151 // When building the textUnderElement for an object, determine whether or not |
1141 // we should include the inner text of this given descendant object or skip it. | 1152 // we should include the inner text of this given descendant object or skip it. |
1142 static bool shouldUseAccessibilityObjectInnerText(AXObject* obj) | 1153 static bool shouldUseAccessibilityObjectInnerText(AXObject* obj) |
1143 { | 1154 { |
1144 // Consider this hypothetical example: | 1155 // Consider this hypothetical example: |
1145 // <div tabindex=0> | 1156 // <div tabindex=0> |
1146 // <h2> | 1157 // <h2> |
1147 // Table of contents | 1158 // Table of contents |
1148 // </h2> | 1159 // </h2> |
1149 // <a href="#start">Jump to start of book</a> | 1160 // <a href="#start">Jump to start of book</a> |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 float range = maxValueForRange() - minValueForRange(); | 1825 float range = maxValueForRange() - minValueForRange(); |
1815 float value = valueForRange(); | 1826 float value = valueForRange(); |
1816 | 1827 |
1817 value += range * (percentChange / 100); | 1828 value += range * (percentChange / 100); |
1818 setValue(String::number(value)); | 1829 setValue(String::number(value)); |
1819 | 1830 |
1820 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1831 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
1821 } | 1832 } |
1822 | 1833 |
1823 } // namespace blink | 1834 } // namespace blink |
OLD | NEW |