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

Unified Diff: Source/core/html/HTMLOptionElement.cpp

Issue 1034493005: Fire AX notifications on list box options. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@menu_list_more
Patch Set: Rebase Created 5 years, 9 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: Source/core/html/HTMLOptionElement.cpp
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
index e571fc594e9b3e54e6d1a9718648ef63188a2381..cd12ffb4c57c29fd44de4109ee5fe609e97caa14 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -29,6 +29,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/HTMLNames.h"
+#include "core/dom/AXObjectCache.h"
#include "core/dom/Document.h"
#include "core/dom/NodeLayoutStyle.h"
#include "core/dom/NodeTraversal.h"
@@ -264,8 +265,16 @@ void HTMLOptionElement::setSelectedState(bool selected)
m_isSelected = selected;
pseudoStateChanged(CSSSelector::PseudoChecked);
- if (HTMLSelectElement* select = ownerSelectElement())
+ if (HTMLSelectElement* select = ownerSelectElement()) {
select->invalidateSelectedItems();
+
+ if (AXObjectCache* cache = document().existingAXObjectCache()) {
+ if (!select->layoutObject() || select->layoutObject()->isListBox()) {
je_julie(Not used) 2015/03/31 03:51:04 ((there is no layoutObject) or (layoutObject is Li
dmazzoni 2015/03/31 06:57:37 I want to fire these notifications under two circu
+ cache->listboxOptionStateChanged(this);
+ cache->listboxSelectedChildrenChanged(select);
+ }
+ }
+ }
}
void HTMLOptionElement::childrenChanged(const ChildrenChange& change)

Powered by Google App Engine
This is Rietveld 408576698