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 24 matching lines...) Expand all Loading... |
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 PassRefPtr<AXMenuList> AXMenuList::create(LayoutMenuList* layoutObject, AXObject
CacheImpl* axObjectCache) |
41 { | 41 { |
42 return adoptRef(new AXMenuList(layoutObject, axObjectCache)); | 42 return adoptRef(new AXMenuList(layoutObject, axObjectCache)); |
43 } | 43 } |
44 | 44 |
45 AccessibilityRole AXMenuList::roleValue() const | 45 AccessibilityRole AXMenuList::determineAccessibilityRole() |
46 { | 46 { |
47 AccessibilityRole ariaRole = ariaRoleAttribute(); | 47 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole) |
48 if (ariaRole != UnknownRole) | 48 return m_ariaRole; |
49 return ariaRole; | 49 |
50 return PopUpButtonRole; | 50 return PopUpButtonRole; |
51 } | 51 } |
52 | 52 |
53 bool AXMenuList::press() const | 53 bool AXMenuList::press() const |
54 { | 54 { |
55 LayoutMenuList* menuList = toLayoutMenuList(m_layoutObject); | 55 LayoutMenuList* menuList = toLayoutMenuList(m_layoutObject); |
56 if (menuList->popupIsVisible()) | 56 if (menuList->popupIsVisible()) |
57 menuList->hidePopup(); | 57 menuList->hidePopup(); |
58 else | 58 else |
59 menuList->showPopup(); | 59 menuList->showPopup(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return; | 145 return; |
146 | 146 |
147 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); | 147 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); |
148 popup->didHide(); | 148 popup->didHide(); |
149 | 149 |
150 if (node() && node()->focused()) | 150 if (node() && node()->focused()) |
151 axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIEl
ementChanged); | 151 axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIEl
ementChanged); |
152 } | 152 } |
153 | 153 |
154 } // namespace blink | 154 } // namespace blink |
OLD | NEW |