| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 IgnoredReasons* ignored_reasons) const { | 109 IgnoredReasons* ignored_reasons) const { |
| 110 if (!GetNode()) | 110 if (!GetNode()) |
| 111 return true; | 111 return true; |
| 112 | 112 |
| 113 if (AccessibilityIsIgnoredByDefault(ignored_reasons)) | 113 if (AccessibilityIsIgnoredByDefault(ignored_reasons)) |
| 114 return true; | 114 return true; |
| 115 | 115 |
| 116 return false; | 116 return false; |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool AXListBoxOption::CanSetFocusAttribute() const { |
| 120 return CanSetSelectedAttribute(); |
| 121 } |
| 122 |
| 119 bool AXListBoxOption::CanSetSelectedAttribute() const { | 123 bool AXListBoxOption::CanSetSelectedAttribute() const { |
| 120 if (!isHTMLOptionElement(GetNode())) | 124 if (!isHTMLOptionElement(GetNode())) |
| 121 return false; | 125 return false; |
| 122 | 126 |
| 123 if (toHTMLOptionElement(GetNode())->IsDisabledFormControl()) | 127 if (toHTMLOptionElement(GetNode())->IsDisabledFormControl()) |
| 124 return false; | 128 return false; |
| 125 | 129 |
| 126 HTMLSelectElement* select_element = ListBoxOptionParentNode(); | 130 HTMLSelectElement* select_element = ListBoxOptionParentNode(); |
| 127 if (select_element && select_element->IsDisabledFormControl()) | 131 if (!select_element || select_element->IsDisabledFormControl()) |
| 128 return false; | 132 return false; |
| 129 | 133 |
| 130 return true; | 134 return IsEnabled(); |
| 131 } | 135 } |
| 132 | 136 |
| 133 String AXListBoxOption::TextAlternative(bool recursive, | 137 String AXListBoxOption::TextAlternative(bool recursive, |
| 134 bool in_aria_labelled_by_traversal, | 138 bool in_aria_labelled_by_traversal, |
| 135 AXObjectSet& visited, | 139 AXObjectSet& visited, |
| 136 AXNameFrom& name_from, | 140 AXNameFrom& name_from, |
| 137 AXRelatedObjectVector* related_objects, | 141 AXRelatedObjectVector* related_objects, |
| 138 NameSources* name_sources) const { | 142 NameSources* name_sources) const { |
| 139 // If nameSources is non-null, relatedObjects is used in filling it in, so it | 143 // If nameSources is non-null, relatedObjects is used in filling it in, so it |
| 140 // must be non-null as well. | 144 // must be non-null as well. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 if (!GetNode()) | 186 if (!GetNode()) |
| 183 return 0; | 187 return 0; |
| 184 | 188 |
| 185 if (isHTMLOptionElement(GetNode())) | 189 if (isHTMLOptionElement(GetNode())) |
| 186 return toHTMLOptionElement(GetNode())->OwnerSelectElement(); | 190 return toHTMLOptionElement(GetNode())->OwnerSelectElement(); |
| 187 | 191 |
| 188 return 0; | 192 return 0; |
| 189 } | 193 } |
| 190 | 194 |
| 191 } // namespace blink | 195 } // namespace blink |
| OLD | NEW |