| 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 19 matching lines...) Expand all Loading... |
| 30 #include "modules/accessibility/AXMenuListPopup.h" | 30 #include "modules/accessibility/AXMenuListPopup.h" |
| 31 #include "modules/accessibility/AXObjectCacheImpl.h" | 31 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 AXMenuList::AXMenuList(LayoutMenuList* layoutObject, AXObjectCacheImpl* axObject
Cache) | 35 AXMenuList::AXMenuList(LayoutMenuList* layoutObject, AXObjectCacheImpl* axObject
Cache) |
| 36 : AXLayoutObject(layoutObject, axObjectCache) | 36 : AXLayoutObject(layoutObject, axObjectCache) |
| 37 { | 37 { |
| 38 } | 38 } |
| 39 | 39 |
| 40 PassRefPtr<AXMenuList> AXMenuList::create(LayoutMenuList* layoutObject, AXObject
CacheImpl* axObjectCache) | 40 PassRefPtrWillBeRawPtr<AXMenuList> AXMenuList::create(LayoutMenuList* layoutObje
ct, AXObjectCacheImpl* axObjectCache) |
| 41 { | 41 { |
| 42 return adoptRef(new AXMenuList(layoutObject, axObjectCache)); | 42 return adoptRefWillBeNoop(new AXMenuList(layoutObject, axObjectCache)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 AccessibilityRole AXMenuList::determineAccessibilityRole() | 45 AccessibilityRole AXMenuList::determineAccessibilityRole() |
| 46 { | 46 { |
| 47 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole) | 47 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole) |
| 48 return m_ariaRole; | 48 return m_ariaRole; |
| 49 | 49 |
| 50 return PopUpButtonRole; | 50 return PopUpButtonRole; |
| 51 } | 51 } |
| 52 | 52 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 80 m_haveChildren = true; | 80 m_haveChildren = true; |
| 81 | 81 |
| 82 AXObjectCacheImpl* cache = axObjectCache(); | 82 AXObjectCacheImpl* cache = axObjectCache(); |
| 83 | 83 |
| 84 AXObject* list = cache->getOrCreate(MenuListPopupRole); | 84 AXObject* list = cache->getOrCreate(MenuListPopupRole); |
| 85 if (!list) | 85 if (!list) |
| 86 return; | 86 return; |
| 87 | 87 |
| 88 toAXMockObject(list)->setParent(this); | 88 toAXMockObject(list)->setParent(this); |
| 89 if (list->accessibilityIsIgnored()) { | 89 if (list->accessibilityIsIgnored()) { |
| 90 #if ENABLE(OILPAN) |
| 91 cache->remove(list); |
| 92 #else |
| 90 cache->remove(list->axObjectID()); | 93 cache->remove(list->axObjectID()); |
| 94 #endif |
| 91 return; | 95 return; |
| 92 } | 96 } |
| 93 | 97 |
| 94 m_children.append(list); | 98 m_children.append(list); |
| 95 | 99 |
| 96 list->addChildren(); | 100 list->addChildren(); |
| 97 } | 101 } |
| 98 | 102 |
| 99 bool AXMenuList::isCollapsed() const | 103 bool AXMenuList::isCollapsed() const |
| 100 { | 104 { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return; | 157 return; |
| 154 | 158 |
| 155 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); | 159 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); |
| 156 popup->didHide(); | 160 popup->didHide(); |
| 157 | 161 |
| 158 if (node() && node()->focused()) | 162 if (node() && node()->focused()) |
| 159 axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIEl
ementChanged); | 163 axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIEl
ementChanged); |
| 160 } | 164 } |
| 161 | 165 |
| 162 } // namespace blink | 166 } // namespace blink |
| OLD | NEW |