OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return m_parent->isEnabled(); | 59 return m_parent->isEnabled(); |
60 } | 60 } |
61 | 61 |
62 bool AXMenuListPopup::computeAccessibilityIsIgnored() const | 62 bool AXMenuListPopup::computeAccessibilityIsIgnored() const |
63 { | 63 { |
64 return accessibilityIsIgnoredByDefault(); | 64 return accessibilityIsIgnoredByDefault(); |
65 } | 65 } |
66 | 66 |
67 AXMenuListOption* AXMenuListPopup::menuListOptionAXObject(HTMLElement* element)
const | 67 AXMenuListOption* AXMenuListPopup::menuListOptionAXObject(HTMLElement* element)
const |
68 { | 68 { |
69 if (!element->hasTagName(optionTag)) | 69 ASSERT(element); |
| 70 if (!isHTMLOptionElement(*element)) |
70 return 0; | 71 return 0; |
71 | 72 |
72 AXObject* object = document()->axObjectCache()->getOrCreate(MenuListOptionRo
le); | 73 AXObject* object = document()->axObjectCache()->getOrCreate(MenuListOptionRo
le); |
73 ASSERT_WITH_SECURITY_IMPLICATION(object->isMenuListOption()); | 74 ASSERT_WITH_SECURITY_IMPLICATION(object->isMenuListOption()); |
74 | 75 |
75 AXMenuListOption* option = toAXMenuListOption(object); | 76 AXMenuListOption* option = toAXMenuListOption(object); |
76 option->setElement(element); | 77 option->setElement(element); |
77 | 78 |
78 return option; | 79 return option; |
79 } | 80 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); | 138 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); |
138 | 139 |
139 AXObjectCache* cache = axObjectCache(); | 140 AXObjectCache* cache = axObjectCache(); |
140 RefPtr<AXObject> child = m_children[optionIndex].get(); | 141 RefPtr<AXObject> child = m_children[optionIndex].get(); |
141 | 142 |
142 cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIE
lementChanged, true, PostSynchronously); | 143 cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIE
lementChanged, true, PostSynchronously); |
143 cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListIt
emSelected, true, PostSynchronously); | 144 cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListIt
emSelected, true, PostSynchronously); |
144 } | 145 } |
145 | 146 |
146 } // namespace WebCore | 147 } // namespace WebCore |
OLD | NEW |