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

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

Issue 1127283002: Revert of Fire AX notifications on list box options. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@menu_list_more
Patch Set: Created 5 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
« no previous file with comments | « Source/modules/accessibility/AXListBox.h ('k') | Source/modules/accessibility/AXListBoxOption.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/modules/accessibility/AXListBox.h ('k') | Source/modules/accessibility/AXListBoxOption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698