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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 { | 93 { |
94 if (!m_parent) | 94 if (!m_parent) |
95 return; | 95 return; |
96 | 96 |
97 Node* selectNode = m_parent->node(); | 97 Node* selectNode = m_parent->node(); |
98 if (!selectNode) | 98 if (!selectNode) |
99 return; | 99 return; |
100 | 100 |
101 m_haveChildren = true; | 101 m_haveChildren = true; |
102 | 102 |
103 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems = toHTML
SelectElement(selectNode)->listItems(); | 103 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement>>& listItems = toHTMLS
electElement(selectNode)->listItems(); |
104 unsigned length = listItems.size(); | 104 unsigned length = listItems.size(); |
105 for (unsigned i = 0; i < length; i++) { | 105 for (unsigned i = 0; i < length; i++) { |
106 AXMenuListOption* option = menuListOptionAXObject(listItems[i]); | 106 AXMenuListOption* option = menuListOptionAXObject(listItems[i]); |
107 if (option) { | 107 if (option) { |
108 option->setParent(this); | 108 option->setParent(this); |
109 m_children.append(option); | 109 m_children.append(option); |
110 } | 110 } |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
(...skipping 27 matching lines...) Expand all Loading... |
141 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); | 141 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); |
142 | 142 |
143 AXObjectCacheImpl* cache = axObjectCache(); | 143 AXObjectCacheImpl* cache = axObjectCache(); |
144 RefPtr<AXObject> child = m_children[optionIndex].get(); | 144 RefPtr<AXObject> child = m_children[optionIndex].get(); |
145 | 145 |
146 cache->postNotification(child.get(), document(), AXObjectCacheImpl::AXFocuse
dUIElementChanged, true); | 146 cache->postNotification(child.get(), document(), AXObjectCacheImpl::AXFocuse
dUIElementChanged, true); |
147 cache->postNotification(child.get(), document(), AXObjectCacheImpl::AXMenuLi
stItemSelected, true); | 147 cache->postNotification(child.get(), document(), AXObjectCacheImpl::AXMenuLi
stItemSelected, true); |
148 } | 148 } |
149 | 149 |
150 } // namespace blink | 150 } // namespace blink |
OLD | NEW |