Index: Source/modules/accessibility/AXListBox.cpp |
diff --git a/Source/modules/accessibility/AXListBox.cpp b/Source/modules/accessibility/AXListBox.cpp |
index 615f58677ab7af62afa945ad3dcc3a46e579e5fa..6048272a83bc53aceeec4e67dd1bf0bf8ee040a9 100644 |
--- a/Source/modules/accessibility/AXListBox.cpp |
+++ b/Source/modules/accessibility/AXListBox.cpp |
@@ -29,8 +29,6 @@ |
#include "config.h" |
#include "modules/accessibility/AXListBox.h" |
-#include "core/html/HTMLOptionElement.h" |
-#include "core/html/HTMLSelectElement.h" |
#include "core/layout/LayoutListBox.h" |
#include "modules/accessibility/AXListBoxOption.h" |
#include "modules/accessibility/AXObjectCacheImpl.h" |
@@ -41,9 +39,7 @@ |
AXListBox::AXListBox(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache) |
: AXLayoutObject(layoutObject, axObjectCache) |
- , m_activeIndex(-1) |
{ |
- activeIndexChanged(); |
} |
AXListBox::~AXListBox() |
@@ -63,41 +59,4 @@ |
return ListBoxRole; |
} |
-AXObject* AXListBox::activeDescendant() const |
-{ |
- if (!isHTMLSelectElement(node())) |
- return nullptr; |
- |
- HTMLSelectElement* select = toHTMLSelectElement(node()); |
- int activeIndex = select->activeSelectionEndListIndex(); |
- if (activeIndex >= 0 && activeIndex < static_cast<int>(select->length())) { |
- HTMLOptionElement* option = select->item(m_activeIndex); |
- return axObjectCache()->get(option); |
- } |
- |
- return nullptr; |
-} |
- |
-void AXListBox::activeIndexChanged() |
-{ |
- if (!isHTMLSelectElement(node())) |
- return; |
- |
- HTMLSelectElement* select = toHTMLSelectElement(node()); |
- int activeIndex = select->activeSelectionEndListIndex(); |
- if (activeIndex == m_activeIndex) |
- return; |
- |
- m_activeIndex = activeIndex; |
- 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); |
- } |
-} |
- |
} // namespace blink |