Chromium Code Reviews| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 return true; | 117 return true; |
| 118 | 118 |
| 119 if (accessibilityIsIgnoredByDefault(ignoredReasons)) | 119 if (accessibilityIsIgnoredByDefault(ignoredReasons)) |
| 120 return true; | 120 return true; |
| 121 | 121 |
| 122 return false; | 122 return false; |
| 123 } | 123 } |
| 124 | 124 |
| 125 bool AXListBoxOption::canSetSelectedAttribute() const | 125 bool AXListBoxOption::canSetSelectedAttribute() const |
| 126 { | 126 { |
| 127 if (ancestorExposesActiveDescendant()) | |
|
dmazzoni
2016/03/31 05:48:30
This shouldn't be before some of the other checks,
| |
| 128 return true; | |
| 129 | |
| 127 if (!isHTMLOptionElement(getNode())) | 130 if (!isHTMLOptionElement(getNode())) |
| 128 return false; | 131 return false; |
| 129 | 132 |
| 130 if (toHTMLOptionElement(getNode())->isDisabledFormControl()) | 133 if (toHTMLOptionElement(getNode())->isDisabledFormControl()) |
| 131 return false; | 134 return false; |
| 132 | 135 |
| 133 HTMLSelectElement* selectElement = listBoxOptionParentNode(); | 136 HTMLSelectElement* selectElement = listBoxOptionParentNode(); |
| 134 if (selectElement && selectElement->isDisabledFormControl()) | 137 if (selectElement && selectElement->isDisabledFormControl()) |
| 135 return false; | 138 return false; |
| 136 | 139 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 unsigned length = listItems.size(); | 205 unsigned length = listItems.size(); |
| 203 for (unsigned i = 0; i < length; i++) { | 206 for (unsigned i = 0; i < length; i++) { |
| 204 if (listItems[i] == getNode()) | 207 if (listItems[i] == getNode()) |
| 205 return i; | 208 return i; |
| 206 } | 209 } |
| 207 | 210 |
| 208 return -1; | 211 return -1; |
| 209 } | 212 } |
| 210 | 213 |
| 211 } // namespace blink | 214 } // namespace blink |
| OLD | NEW |