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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 AccessibilityRole parentRole = parent->roleValue(); | 944 AccessibilityRole parentRole = parent->roleValue(); |
945 if (parentRole == GroupRole) | 945 if (parentRole == GroupRole) |
946 level++; | 946 level++; |
947 else if (parentRole == TreeRole) | 947 else if (parentRole == TreeRole) |
948 break; | 948 break; |
949 } | 949 } |
950 | 950 |
951 return level; | 951 return level; |
952 } | 952 } |
953 | 953 |
| 954 String AXNodeObject::ariaAutoComplete() const |
| 955 { |
| 956 if (roleValue() != ComboBoxRole && roleValue() != TextAreaRole) |
| 957 return String(); |
| 958 |
| 959 const AtomicString& ariaAutoComplete = getAttribute(aria_autocompleteAttr).l
ower(); |
| 960 |
| 961 if (ariaAutoComplete == "inline" || ariaAutoComplete == "list" |
| 962 || ariaAutoComplete == "both") |
| 963 return ariaAutoComplete; |
| 964 |
| 965 return String(); |
| 966 } |
| 967 |
954 String AXNodeObject::text() const | 968 String AXNodeObject::text() const |
955 { | 969 { |
956 // If this is a user defined static text, use the accessible name computatio
n. | 970 // If this is a user defined static text, use the accessible name computatio
n. |
957 if (ariaRoleAttribute() == StaticTextRole) | 971 if (ariaRoleAttribute() == StaticTextRole) |
958 return ariaAccessibilityDescription(); | 972 return ariaAccessibilityDescription(); |
959 | 973 |
960 if (!isTextControl()) | 974 if (!isTextControl()) |
961 return String(); | 975 return String(); |
962 | 976 |
963 Node* node = this->node(); | 977 Node* node = this->node(); |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1837 float range = maxValueForRange() - minValueForRange(); | 1851 float range = maxValueForRange() - minValueForRange(); |
1838 float value = valueForRange(); | 1852 float value = valueForRange(); |
1839 | 1853 |
1840 value += range * (percentChange / 100); | 1854 value += range * (percentChange / 100); |
1841 setValue(String::number(value)); | 1855 setValue(String::number(value)); |
1842 | 1856 |
1843 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1857 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
1844 } | 1858 } |
1845 | 1859 |
1846 } // namespace blink | 1860 } // namespace blink |
OLD | NEW |