Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: Source/modules/accessibility/AXMenuList.cpp

Issue 1004803004: Add handling to respect role attribute in AXObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
46 {
47 AccessibilityRole ariaRole = ariaRoleAttribute();
48 if (ariaRole != UnknownRole)
49 return ariaRole;
50 return PopUpButtonRole;
51 }
52
45 bool AXMenuList::press() const 53 bool AXMenuList::press() const
46 { 54 {
47 LayoutMenuList* menuList = toLayoutMenuList(m_layoutObject); 55 LayoutMenuList* menuList = toLayoutMenuList(m_layoutObject);
48 if (menuList->popupIsVisible()) 56 if (menuList->popupIsVisible())
49 menuList->hidePopup(); 57 menuList->hidePopup();
50 else 58 else
51 menuList->showPopup(); 59 menuList->showPopup();
52 return true; 60 return true;
53 } 61 }
54 62
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (childObjects[0]->isMenuListPopup()) { 124 if (childObjects[0]->isMenuListPopup()) {
117 if (AXMenuListPopup* popup = toAXMenuListPopup(childObjects[0].get() )) 125 if (AXMenuListPopup* popup = toAXMenuListPopup(childObjects[0].get() ))
118 popup->didUpdateActiveOption(optionIndex); 126 popup->didUpdateActiveOption(optionIndex);
119 } 127 }
120 } 128 }
121 129
122 cache->postNotification(this, document.get(), AXObjectCacheImpl::AXMenuListV alueChanged, true); 130 cache->postNotification(this, document.get(), AXObjectCacheImpl::AXMenuListV alueChanged, true);
123 } 131 }
124 132
125 } // namespace blink 133 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXMenuList.h ('k') | Source/modules/accessibility/AXObjectCacheImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698