void SimpleEditCommand::notifyAccessibilityForTextChange(Node* node, AXTextEditType type, const String& text, const VisiblePosition& position) { if (!AXObjectCache::accessibilityEnabled()) return; AXObjectCache* cache = document().existingAXObjectCache(); if (!cache) return; cache->postTextStateChangeNotification(node, type, text, position); }
void EditCommand::postTextStateChangeNotification(AXTextEditType type, const String& text, const VisiblePosition& position) { if (!AXObjectCache::accessibilityEnabled()) return; if (!text.length()) return; AXObjectCache* cache = document().existingAXObjectCache(); if (!cache) return; Node* node = highestEditableRoot(position.deepEquivalent(), HasEditableAXRole); cache->postTextStateChangeNotification(node, type, text, position); }