| Index: Source/core/html/HTMLOptionElement.cpp
|
| diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
|
| index f14dd4b81dbb1294fd148c9a5c31737391f81659..97a8e40d73dc7ed852dd906916e95f2aabf6f8ea 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/NodeComputedStyle.h"
|
| #include "core/dom/NodeTraversal.h"
|
| @@ -264,8 +265,19 @@ 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 there is a layoutObject (most common), fire accessibility notifications
|
| + // only when it's a listbox (and not a menu list). If there's no layoutObject,
|
| + // fire them anyway just to be safe (to make sure the AX tree is in sync).
|
| + if (!select->layoutObject() || select->layoutObject()->isListBox()) {
|
| + cache->listboxOptionStateChanged(this);
|
| + cache->listboxSelectedChildrenChanged(select);
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
| void HTMLOptionElement::childrenChanged(const ChildrenChange& change)
|
|
|