| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 AXListBoxOption::~AXListBoxOption() | 47 AXListBoxOption::~AXListBoxOption() |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 PassRefPtr<AXListBoxOption> AXListBoxOption::create(LayoutObject* layoutObject,
AXObjectCacheImpl* axObjectCache) | 51 PassRefPtr<AXListBoxOption> AXListBoxOption::create(LayoutObject* layoutObject,
AXObjectCacheImpl* axObjectCache) |
| 52 { | 52 { |
| 53 return adoptRef(new AXListBoxOption(layoutObject, axObjectCache)); | 53 return adoptRef(new AXListBoxOption(layoutObject, axObjectCache)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 AccessibilityRole AXListBoxOption::roleValue() const |
| 57 { |
| 58 AccessibilityRole ariaRole = ariaRoleAttribute(); |
| 59 if (ariaRole != UnknownRole) |
| 60 return ariaRole; |
| 61 return ListBoxOptionRole; |
| 62 } |
| 63 |
| 56 bool AXListBoxOption::isEnabled() const | 64 bool AXListBoxOption::isEnabled() const |
| 57 { | 65 { |
| 58 if (!node()) | 66 if (!node()) |
| 59 return false; | 67 return false; |
| 60 | 68 |
| 61 if (equalIgnoringCase(getAttribute(aria_disabledAttr), "true")) | 69 if (equalIgnoringCase(getAttribute(aria_disabledAttr), "true")) |
| 62 return false; | 70 return false; |
| 63 | 71 |
| 64 if (toElement(node())->hasAttribute(disabledAttr)) | 72 if (toElement(node())->hasAttribute(disabledAttr)) |
| 65 return false; | 73 return false; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 unsigned length = listItems.size(); | 169 unsigned length = listItems.size(); |
| 162 for (unsigned i = 0; i < length; i++) { | 170 for (unsigned i = 0; i < length; i++) { |
| 163 if (listItems[i] == node()) | 171 if (listItems[i] == node()) |
| 164 return i; | 172 return i; |
| 165 } | 173 } |
| 166 | 174 |
| 167 return -1; | 175 return -1; |
| 168 } | 176 } |
| 169 | 177 |
| 170 } // namespace blink | 178 } // namespace blink |
| OLD | NEW |