| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // There's no reason to clear our AXMenuListPopup child. If we get a | 71 // There's no reason to clear our AXMenuListPopup child. If we get a |
| 72 // call to clearChildren, it's because the options might have changed, | 72 // call to clearChildren, it's because the options might have changed, |
| 73 // so call it on our popup. | 73 // so call it on our popup. |
| 74 ASSERT(m_children.size() == 1); | 74 ASSERT(m_children.size() == 1); |
| 75 m_children[0]->clearChildren(); | 75 m_children[0]->clearChildren(); |
| 76 m_childrenDirty = false; | 76 m_childrenDirty = false; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void AXMenuList::addChildren() | 79 void AXMenuList::addChildren() |
| 80 { | 80 { |
| 81 ASSERT(!isDetached()); |
| 81 m_haveChildren = true; | 82 m_haveChildren = true; |
| 82 | 83 |
| 83 AXObjectCacheImpl& cache = axObjectCache(); | 84 AXObjectCacheImpl& cache = axObjectCache(); |
| 84 | 85 |
| 85 AXObject* list = cache.getOrCreate(MenuListPopupRole); | 86 AXObject* list = cache.getOrCreate(MenuListPopupRole); |
| 86 if (!list) | 87 if (!list) |
| 87 return; | 88 return; |
| 88 | 89 |
| 89 toAXMockObject(list)->setParent(this); | 90 toAXMockObject(list)->setParent(this); |
| 90 if (list->accessibilityIsIgnored()) { | 91 if (list->accessibilityIsIgnored()) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 return; | 155 return; |
| 155 | 156 |
| 156 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); | 157 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); |
| 157 popup->didHide(); | 158 popup->didHide(); |
| 158 | 159 |
| 159 if (node() && node()->focused()) | 160 if (node() && node()->focused()) |
| 160 axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIEle
mentChanged); | 161 axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIEle
mentChanged); |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |