| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 Node* parentNode = m_parent->getNode(); | 108 Node* parentNode = m_parent->getNode(); |
| 109 if (!isHTMLSelectElement(parentNode)) | 109 if (!isHTMLSelectElement(parentNode)) |
| 110 return; | 110 return; |
| 111 | 111 |
| 112 HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); | 112 HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); |
| 113 m_haveChildren = true; | 113 m_haveChildren = true; |
| 114 | 114 |
| 115 if (m_activeIndex == -1) | 115 if (m_activeIndex == -1) |
| 116 m_activeIndex = getSelectedIndex(); | 116 m_activeIndex = getSelectedIndex(); |
| 117 | 117 |
| 118 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement>>& listItems = htmlSel
ectElement->listItems(); | 118 const HeapVector<Member<HTMLElement>>& listItems = htmlSelectElement->listIt
ems(); |
| 119 unsigned length = listItems.size(); | 119 unsigned length = listItems.size(); |
| 120 for (unsigned i = 0; i < length; i++) { | 120 for (unsigned i = 0; i < length; i++) { |
| 121 AXMenuListOption* option = menuListOptionAXObject(listItems[i]); | 121 AXMenuListOption* option = menuListOptionAXObject(listItems[i]); |
| 122 if (option) { | 122 if (option) { |
| 123 option->setParent(this); | 123 option->setParent(this); |
| 124 m_children.append(option); | 124 m_children.append(option); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 AXObject* AXMenuListPopup::activeChild() | 179 AXObject* AXMenuListPopup::activeChild() |
| 180 { | 180 { |
| 181 if (m_activeIndex < 0 || m_activeIndex >= static_cast<int>(children().size()
)) | 181 if (m_activeIndex < 0 || m_activeIndex >= static_cast<int>(children().size()
)) |
| 182 return nullptr; | 182 return nullptr; |
| 183 | 183 |
| 184 return m_children[m_activeIndex].get(); | 184 return m_children[m_activeIndex].get(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |