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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 AccessibilityMenuListOption* AccessibilityMenuListPopup::menuListOptionAccessibi
lityObject(HTMLElement* element) const | 67 AccessibilityMenuListOption* AccessibilityMenuListPopup::menuListOptionAccessibi
lityObject(HTMLElement* element) const |
68 { | 68 { |
69 if (!element || !element->hasTagName(optionTag) || !element->attached()) | 69 if (!element || !element->hasTagName(optionTag) || !element->attached()) |
70 return 0; | 70 return 0; |
71 | 71 |
72 AccessibilityObject* object = document()->axObjectCache()->getOrCreate(MenuL
istOptionRole); | 72 AccessibilityObject* object = document()->axObjectCache()->getOrCreate(MenuL
istOptionRole); |
73 ASSERT_WITH_SECURITY_IMPLICATION(object->isMenuListOption()); | 73 ASSERT_WITH_SECURITY_IMPLICATION(object->isMenuListOption()); |
74 | 74 |
75 AccessibilityMenuListOption* option = static_cast<AccessibilityMenuListOptio
n*>(object); | 75 AccessibilityMenuListOption* option = toAccessibilityMenuListOption(object); |
76 option->setElement(element); | 76 option->setElement(element); |
77 | 77 |
78 return option; | 78 return option; |
79 } | 79 } |
80 | 80 |
81 bool AccessibilityMenuListPopup::press() const | 81 bool AccessibilityMenuListPopup::press() const |
82 { | 82 { |
83 if (!m_parent) | 83 if (!m_parent) |
84 return false; | 84 return false; |
85 | 85 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); | 131 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); |
132 | 132 |
133 AXObjectCache* cache = axObjectCache(); | 133 AXObjectCache* cache = axObjectCache(); |
134 RefPtr<AccessibilityObject> child = m_children[optionIndex].get(); | 134 RefPtr<AccessibilityObject> child = m_children[optionIndex].get(); |
135 | 135 |
136 cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIE
lementChanged, true, PostSynchronously); | 136 cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIE
lementChanged, true, PostSynchronously); |
137 cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListIt
emSelected, true, PostSynchronously); | 137 cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListIt
emSelected, true, PostSynchronously); |
138 } | 138 } |
139 | 139 |
140 } // namespace WebCore | 140 } // namespace WebCore |
OLD | NEW |