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

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

Issue 1899823002: 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: Fixed Mac compilation issue. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp b/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
index 0d04e157dc1f8063e67b47eab36176414e71c943..833bd75490569161cbfd5c6a9528284630e32864 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
@@ -62,7 +62,7 @@ AccessibilityRole AXListBox::determineAccessibilityRole()
return ListBoxRole;
}
-AXObject* AXListBox::activeDescendant() const
+AXObject* AXListBox::activeDescendant()
{
if (!isHTMLSelectElement(getNode()))
return nullptr;
@@ -91,12 +91,7 @@ void AXListBox::activeIndexChanged()
if (!select->focused())
return;
- if (m_activeIndex >= 0 && m_activeIndex < static_cast<int>(select->length())) {
- HTMLOptionElement* option = select->item(m_activeIndex);
- axObjectCache().postNotification(option, AXObjectCacheImpl::AXFocusedUIElementChanged);
- } else {
- axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged);
- }
+ axObjectCache().postNotification(this, AXObjectCacheImpl::AXActiveDescendantChanged);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698