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

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

Issue 1014573010: Get rid of postToElement argument for accessibility notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@postnotification_1
Patch Set: Rebaseline test 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // create AXObjects for <option> elements while they're in the middle of rem oval. 138 // create AXObjects for <option> elements while they're in the middle of rem oval.
139 if (!m_haveChildren) 139 if (!m_haveChildren)
140 addChildren(); 140 addChildren();
141 141
142 ASSERT_ARG(optionIndex, optionIndex >= 0); 142 ASSERT_ARG(optionIndex, optionIndex >= 0);
143 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); 143 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size()));
144 144
145 AXObjectCacheImpl* cache = axObjectCache(); 145 AXObjectCacheImpl* cache = axObjectCache();
146 if (m_activeIndex >= 0 && m_activeIndex < static_cast<int>(m_children.size() )) { 146 if (m_activeIndex >= 0 && m_activeIndex < static_cast<int>(m_children.size() )) {
147 RefPtr<AXObject> previousChild = m_children[m_activeIndex].get(); 147 RefPtr<AXObject> previousChild = m_children[m_activeIndex].get();
148 cache->postNotification(previousChild.get(), AXObjectCacheImpl::AXMenuLi stItemUnselected, true); 148 cache->postNotification(previousChild.get(), AXObjectCacheImpl::AXMenuLi stItemUnselected);
149 } 149 }
150 150
151 RefPtr<AXObject> child = m_children[optionIndex].get(); 151 RefPtr<AXObject> child = m_children[optionIndex].get();
152 cache->postNotification(child.get(), AXObjectCacheImpl::AXFocusedUIElementCh anged, true); 152 cache->postNotification(child.get(), AXObjectCacheImpl::AXFocusedUIElementCh anged);
153 cache->postNotification(child.get(), AXObjectCacheImpl::AXMenuListItemSelect ed, true); 153 cache->postNotification(child.get(), AXObjectCacheImpl::AXMenuListItemSelect ed);
154 m_activeIndex = optionIndex; 154 m_activeIndex = optionIndex;
155 } 155 }
156 156
157 } // namespace blink 157 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXMenuList.cpp ('k') | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698