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 746e12feef98d5777d6ddb7d14afc369a268c1ae..76929b23c305c37bc643321250fe1d15bf51d531 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() |
+AXObject* AXListBox::activeDescendant() const |
{ |
if (!isHTMLSelectElement(getNode())) |
return nullptr; |
@@ -90,7 +90,12 @@ |
if (!select->focused()) |
return; |
- axObjectCache().postNotification(this, AXObjectCacheImpl::AXActiveDescendantChanged); |
+ 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); |
+ } |
} |
} // namespace blink |