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

Unified Diff: Source/modules/accessibility/AXObjectCacheImpl.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/AXObjectCacheImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXObjectCacheImpl.cpp
diff --git a/Source/modules/accessibility/AXObjectCacheImpl.cpp b/Source/modules/accessibility/AXObjectCacheImpl.cpp
index a70a16ea3b0420532e71bb8a1c3df47f56d8772b..247178f6970e17caf1fdd28e88f3335e0d7d28a7 100644
--- a/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -39,8 +39,6 @@
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLabelElement.h"
-#include "core/html/HTMLOptionElement.h"
-#include "core/html/HTMLSelectElement.h"
#include "core/layout/LayoutListBox.h"
#include "core/layout/LayoutMenuList.h"
#include "core/layout/LayoutProgress.h"
@@ -749,23 +747,21 @@
postNotification(node, AXObjectCacheImpl::AXCheckedStateChanged);
}
-void AXObjectCacheImpl::listboxOptionStateChanged(HTMLOptionElement* option)
-{
- postNotification(option, AXCheckedStateChanged);
-}
-
-void AXObjectCacheImpl::listboxSelectedChildrenChanged(HTMLSelectElement* select)
-{
- postNotification(select, AXSelectedChildrenChanged);
-}
-
-void AXObjectCacheImpl::listboxActiveIndexChanged(HTMLSelectElement* select)
-{
- AXObject* obj = get(select);
- if (!obj || !obj->isAXListBox())
- return;
-
- static_cast<AXListBox*>(obj)->activeIndexChanged();
+void AXObjectCacheImpl::selectedChildrenChanged(Node* node)
+{
+ selectedChildrenChanged(get(node));
+}
+
+void AXObjectCacheImpl::selectedChildrenChanged(LayoutObject* layoutObject)
+{
+ selectedChildrenChanged(get(layoutObject));
+}
+
+void AXObjectCacheImpl::selectedChildrenChanged(AXObject* obj)
+{
+ while (obj && obj->roleValue() != ListBoxRole)
+ obj = obj->parentObject();
+ postNotification(obj, AXSelectedChildrenChanged);
}
void AXObjectCacheImpl::handleScrollbarUpdate(FrameView* view)
@@ -798,19 +794,6 @@
{
if (AXObject* obj = getOrCreate(node))
obj->handleAriaExpandedChanged();
-}
-
-void AXObjectCacheImpl::handleAriaSelectedChanged(Node* node)
-{
- AXObject* obj = get(node);
- if (!obj)
- return;
-
- postNotification(obj, AXCheckedStateChanged);
-
- AXObject* listbox = obj->parentObjectUnignored();
- if (listbox->roleValue() == ListBoxRole)
- postNotification(listbox, AXSelectedChildrenChanged);
}
void AXObjectCacheImpl::handleActiveDescendantChanged(Node* node)
@@ -849,7 +832,7 @@
else if (attrName == aria_checkedAttr)
checkedStateChanged(element);
else if (attrName == aria_selectedAttr)
- handleAriaSelectedChanged(element);
+ selectedChildrenChanged(element);
else if (attrName == aria_expandedAttr)
handleAriaExpandedChange(element);
else if (attrName == aria_hiddenAttr)
« no previous file with comments | « Source/modules/accessibility/AXObjectCacheImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698