summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility/AXObjectCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/accessibility/AXObjectCache.cpp')
-rw-r--r--WebCore/accessibility/AXObjectCache.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/WebCore/accessibility/AXObjectCache.cpp b/WebCore/accessibility/AXObjectCache.cpp
index 907bb15..30cce3a 100644
--- a/WebCore/accessibility/AXObjectCache.cpp
+++ b/WebCore/accessibility/AXObjectCache.cpp
@@ -465,6 +465,16 @@ void AXObjectCache::selectedChildrenChanged(RenderObject* renderer)
// to find the container which should send out the notification.
postNotification(renderer, AXSelectedChildrenChanged, false);
}
+
+void AXObjectCache::nodeTextChangeNotification(RenderObject* renderer, AXTextChange textChange, unsigned offset, unsigned count)
+{
+ if (!renderer)
+ return;
+
+ // Delegate on the right platform
+ AccessibilityObject* obj = getOrCreate(renderer);
+ nodeTextChangePlatformNotification(obj, textChange, offset, count);
+}
#endif
#if HAVE(ACCESSIBILITY)
@@ -495,9 +505,12 @@ void AXObjectCache::handleAriaRoleChanged(RenderObject* renderer)
static_cast<AccessibilityRenderObject*>(obj)->updateAccessibilityRole();
}
#endif
-
+
VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(TextMarkerData& textMarkerData)
{
+ if (!isNodeInUse(textMarkerData.node))
+ return VisiblePosition();
+
VisiblePosition visiblePos = VisiblePosition(textMarkerData.node, textMarkerData.offset, textMarkerData.affinity);
Position deepPos = visiblePos.deepEquivalent();
if (deepPos.isNull())
@@ -549,7 +562,9 @@ void AXObjectCache::textMarkerDataForVisiblePosition(TextMarkerData& textMarkerD
textMarkerData.axID = obj.get()->axObjectID();
textMarkerData.node = domNode;
textMarkerData.offset = deepPos.deprecatedEditingOffset();
- textMarkerData.affinity = visiblePos.affinity();
+ textMarkerData.affinity = visiblePos.affinity();
+
+ cache->setNodeInUse(domNode);
}
} // namespace WebCore