summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/accessibility')
-rw-r--r--WebCore/accessibility/AXObjectCache.h1
-rw-r--r--WebCore/accessibility/AccessibilityRenderObject.cpp9
-rw-r--r--WebCore/accessibility/chromium/AXObjectCacheChromium.cpp29
3 files changed, 34 insertions, 5 deletions
diff --git a/WebCore/accessibility/AXObjectCache.h b/WebCore/accessibility/AXObjectCache.h
index 6da6842..28a5917 100644
--- a/WebCore/accessibility/AXObjectCache.h
+++ b/WebCore/accessibility/AXObjectCache.h
@@ -107,6 +107,7 @@ public:
enum AXNotification {
AXActiveDescendantChanged,
AXCheckedStateChanged,
+ AXChildrenChanged,
AXFocusedUIElementChanged,
AXLayoutComplete,
AXLoadComplete,
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 92c57c6..e292971 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -3239,6 +3239,8 @@ void AccessibilityRenderObject::childrenChanged()
if (!m_renderer)
return;
+ bool sentChildrenChanged = false;
+
// Go up the accessibility parent chain, but only if the element already exists. This method is
// called during render layouts, minimal work should be done.
// If AX elements are created now, they could interrogate the render tree while it's in a funky state.
@@ -3248,6 +3250,13 @@ void AccessibilityRenderObject::childrenChanged()
continue;
AccessibilityRenderObject* axParent = static_cast<AccessibilityRenderObject*>(parent);
+
+ // Send the children changed notification on the first accessibility render object ancestor.
+ if (!sentChildrenChanged) {
+ axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXChildrenChanged, true);
+ sentChildrenChanged = true;
+ }
+
// Only do work if the children haven't been marked dirty. This has the effect of blocking
// future live region change notifications until the AX tree has been accessed again. This
// is a good performance win for all parties.
diff --git a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
index 4118c63..d906a91 100644
--- a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
+++ b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
@@ -56,15 +56,34 @@ void AXObjectCache::attachWrapper(AccessibilityObject*)
void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
{
- if (notification != AXCheckedStateChanged)
- return;
-
if (!obj || !obj->document() || !obj->documentFrameView())
return;
ChromeClientChromium* client = toChromeClientChromium(obj->documentFrameView());
- if (client)
- client->didChangeAccessibilityObjectState(obj);
+ if (client) {
+ switch (notification) {
+ case AXCheckedStateChanged:
+ client->didChangeAccessibilityObjectState(obj);
+ break;
+ case AXChildrenChanged:
+ client->didChangeAccessibilityObjectChildren(obj);
+ break;
+ case AXActiveDescendantChanged:
+ case AXFocusedUIElementChanged:
+ case AXLayoutComplete:
+ case AXLiveRegionChanged:
+ case AXLoadComplete:
+ case AXMenuListValueChanged:
+ case AXRowCollapsed:
+ case AXRowCountChanged:
+ case AXRowExpanded:
+ case AXScrolledToAnchor:
+ case AXSelectedChildrenChanged:
+ case AXSelectedTextChanged:
+ case AXValueChanged:
+ break;
+ }
+ }
}
void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)