summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility/mac/AXObjectCacheMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/accessibility/mac/AXObjectCacheMac.mm')
-rw-r--r--WebCore/accessibility/mac/AXObjectCacheMac.mm38
1 files changed, 35 insertions, 3 deletions
diff --git a/WebCore/accessibility/mac/AXObjectCacheMac.mm b/WebCore/accessibility/mac/AXObjectCacheMac.mm
index be7968b..2f18cf3 100644
--- a/WebCore/accessibility/mac/AXObjectCacheMac.mm
+++ b/WebCore/accessibility/mac/AXObjectCacheMac.mm
@@ -51,19 +51,51 @@ void AXObjectCache::attachWrapper(AccessibilityObject* obj)
obj->setWrapper([[AccessibilityObjectWrapper alloc] initWithAccessibilityObject:obj]);
}
-void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, const String& message)
+void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
{
if (!obj)
return;
- NSAccessibilityPostNotification(obj->wrapper(), message);
+ // Some notifications are unique to Safari and do not have NSAccessibility equivalents.
+ String macNotification;
+ switch (notification) {
+ case AXCheckedStateChanged:
+ macNotification = "AXCheckedStateChanged";
+ break;
+ case AXFocusedUIElementChanged:
+ macNotification = NSAccessibilityFocusedUIElementChangedNotification;
+ break;
+ case AXLayoutComplete:
+ macNotification = "AXLayoutComplete";
+ break;
+ case AXLoadComplete:
+ macNotification = "AXLoadComplete";
+ break;
+ case AXSelectedChildrenChanged:
+ macNotification = NSAccessibilitySelectedChildrenChangedNotification;
+ break;
+ case AXSelectedTextChanged:
+ macNotification = NSAccessibilitySelectedTextChangedNotification;
+ break;
+ case AXValueChanged:
+ macNotification = NSAccessibilityValueChangedNotification;
+ break;
+ default:
+ return;
+ }
+
+ NSAccessibilityPostNotification(obj->wrapper(), macNotification);
}
-void AXObjectCache::handleFocusedUIElementChanged()
+void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)
{
[[WebCoreViewFactory sharedFactory] accessibilityHandleFocusChanged];
}
+void AXObjectCache::handleScrolledToAnchor(const Node*)
+{
+}
+
}
#endif // HAVE(ACCESSIBILITY)