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

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

Issue 1061063004: Revert of Don't keep recreating AXMenuListPopup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@suppress_extra_events
Patch Set: Created 5 years, 8 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (list->accessibilityIsIgnored()) { 86 if (list->accessibilityIsIgnored()) {
87 cache->remove(list->axObjectID()); 87 cache->remove(list->axObjectID());
88 return; 88 return;
89 } 89 }
90 90
91 m_children.append(list); 91 m_children.append(list);
92 92
93 list->addChildren(); 93 list->addChildren();
94 } 94 }
95 95
96 void AXMenuList::childrenChanged()
97 {
98 if (m_children.isEmpty())
99 return;
100
101 ASSERT(m_children.size() == 1);
102 m_children[0]->childrenChanged();
103 }
104
96 bool AXMenuList::isCollapsed() const 105 bool AXMenuList::isCollapsed() const
97 { 106 {
98 return !toLayoutMenuList(m_layoutObject)->popupIsVisible(); 107 return !toLayoutMenuList(m_layoutObject)->popupIsVisible();
99 } 108 }
100 109
101 AccessibilityExpanded AXMenuList::isExpanded() const 110 AccessibilityExpanded AXMenuList::isExpanded() const
102 { 111 {
103 if (isCollapsed()) 112 if (isCollapsed())
104 return ExpandedCollapsed; 113 return ExpandedCollapsed;
105 114
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return; 154 return;
146 155
147 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); 156 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get());
148 popup->didHide(); 157 popup->didHide();
149 158
150 if (node() && node()->focused()) 159 if (node() && node()->focused())
151 axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIEl ementChanged); 160 axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIEl ementChanged);
152 } 161 }
153 162
154 } // namespace blink 163 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXMenuList.h ('k') | Source/modules/accessibility/AXMenuListOption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698