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

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

Issue 2025923002: 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/AXListBox.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp b/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
index 76929b23c305c37bc643321250fe1d15bf51d531..746e12feef98d5777d6ddb7d14afc369a268c1ae 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXListBox.cpp
@@ -61,7 +61,7 @@
return ListBoxRole;
}
-AXObject* AXListBox::activeDescendant() const
+AXObject* AXListBox::activeDescendant()
{
if (!isHTMLSelectElement(getNode()))
return nullptr;
@@ -90,12 +90,7 @@
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