| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // create AXObjects for <option> elements while they're in the middle of rem
oval. | 138 // create AXObjects for <option> elements while they're in the middle of rem
oval. |
| 139 if (!m_haveChildren) | 139 if (!m_haveChildren) |
| 140 addChildren(); | 140 addChildren(); |
| 141 | 141 |
| 142 ASSERT_ARG(optionIndex, optionIndex >= 0); | 142 ASSERT_ARG(optionIndex, optionIndex >= 0); |
| 143 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); | 143 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); |
| 144 | 144 |
| 145 AXObjectCacheImpl* cache = axObjectCache(); | 145 AXObjectCacheImpl* cache = axObjectCache(); |
| 146 if (m_activeIndex >= 0 && m_activeIndex < static_cast<int>(m_children.size()
)) { | 146 if (m_activeIndex >= 0 && m_activeIndex < static_cast<int>(m_children.size()
)) { |
| 147 RefPtr<AXObject> previousChild = m_children[m_activeIndex].get(); | 147 RefPtr<AXObject> previousChild = m_children[m_activeIndex].get(); |
| 148 cache->postNotification(previousChild.get(), AXObjectCacheImpl::AXMenuLi
stItemUnselected, true); | 148 cache->postNotification(previousChild.get(), AXObjectCacheImpl::AXMenuLi
stItemUnselected); |
| 149 } | 149 } |
| 150 | 150 |
| 151 RefPtr<AXObject> child = m_children[optionIndex].get(); | 151 RefPtr<AXObject> child = m_children[optionIndex].get(); |
| 152 cache->postNotification(child.get(), AXObjectCacheImpl::AXFocusedUIElementCh
anged, true); | 152 cache->postNotification(child.get(), AXObjectCacheImpl::AXFocusedUIElementCh
anged); |
| 153 cache->postNotification(child.get(), AXObjectCacheImpl::AXMenuListItemSelect
ed, true); | 153 cache->postNotification(child.get(), AXObjectCacheImpl::AXMenuListItemSelect
ed); |
| 154 m_activeIndex = optionIndex; | 154 m_activeIndex = optionIndex; |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace blink | 157 } // namespace blink |
| OLD | NEW |