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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp

Issue 2027683002: Reland of Uses the activedescendant_changed event received from Blink to fire the right focus event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp b/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
index 70be3a8afbd316cf6e741eaf233ec880c4de72b8..cac5dfc40aca55a0cacf3ad9c1077d9e700bb9ae 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
@@ -147,7 +147,7 @@
if (optionIndex >= 0 && optionIndex < static_cast<int>(m_children.size())) {
AXObject* child = m_children[optionIndex].get();
- cache.postNotification(child, AXObjectCacheImpl::AXFocusedUIElementChanged);
+ cache.postNotification(this, AXObjectCacheImpl::AXActiveDescendantChanged);
cache.postNotification(child, AXObjectCacheImpl::AXMenuListItemSelected);
}
@@ -158,8 +158,8 @@
{
AXObjectCacheImpl& cache = axObjectCache();
cache.postNotification(this, AXObjectCacheImpl::AXHide);
- if (activeChild())
- cache.postNotification(activeChild(), AXObjectCacheImpl::AXMenuListItemUnselected);
+ if (activeDescendant())
+ cache.postNotification(activeDescendant(), AXObjectCacheImpl::AXMenuListItemUnselected);
}
void AXMenuListPopup::didShow()
@@ -176,7 +176,7 @@
cache.postNotification(m_parent, AXObjectCacheImpl::AXFocusedUIElementChanged);
}
-AXObject* AXMenuListPopup::activeChild()
+AXObject* AXMenuListPopup::activeDescendant()
{
if (m_activeIndex < 0 || m_activeIndex >= static_cast<int>(children().size()))
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698