<rdar://problem/
4527201> REGRESSION: AXTextMarkerRangeForUnorderedTextMarkers returns out of order range
Test cases added: None. Manual AX testing is way too awkward, and automated testing
is not possible. See following bug...
<rdar://problem/
4256882> Need automated testing support for accessibility APIs
* bridge/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::visiblePositionForTextMarker):
Validate the marker by comparing the node and offset to those of the resulting VisiblePosition.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15927
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-08-17 David Harrison <harrison@apple.com>
+
+ Reviewed by Maciej.
+
+ <rdar://problem/4527201> REGRESSION: AXTextMarkerRangeForUnorderedTextMarkers returns out of order range
+
+ Test cases added: None. Manual AX testing is way too awkward, and automated testing
+ is not possible. See following bug...
+ <rdar://problem/4256882> Need automated testing support for accessibility APIs
+
+ * bridge/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::visiblePositionForTextMarker):
+ Validate the marker by comparing the node and offset to those of the resulting VisiblePosition.
+
2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Anders.
if (!m_idsInUse.contains(textMarkerData.axID))
return VisiblePosition();
- // return the position from the data we stored earlier
- return VisiblePosition(textMarkerData.node, textMarkerData.offset, textMarkerData.affinity);
+ // generate a VisiblePosition from the data we stored earlier
+ VisiblePosition visiblePos = VisiblePosition(textMarkerData.node, textMarkerData.offset, textMarkerData.affinity);
+
+ // make sure the node and offset still match (catches stale markers). affinity is not critical for this.
+ Position deepPos = visiblePos.deepEquivalent();
+ if (deepPos.node() != textMarkerData.node || deepPos.offset() != textMarkerData.offset)
+ return VisiblePosition();
+
+ return visiblePos;
}
void AXObjectCache::childrenChanged(RenderObject* renderer)