| Index: Source/core/accessibility/AXObjectCache.cpp
|
| diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
|
| index 1435f528ffb487160fab0afa0b988158eebcf333..b7aed36c6937dbd725a0ac18210ca237c2be0f64 100644
|
| --- a/Source/core/accessibility/AXObjectCache.cpp
|
| +++ b/Source/core/accessibility/AXObjectCache.cpp
|
| @@ -913,61 +913,6 @@ void AXObjectCache::stopCachingComputedObjectAttributes()
|
| // FIXME: no longer needed (see above).
|
| }
|
|
|
| -VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(TextMarkerData& textMarkerData)
|
| -{
|
| - if (!isNodeInUse(textMarkerData.node))
|
| - return VisiblePosition();
|
| -
|
| - // FIXME: Accessability should make it clear these are DOM-compliant offsets or store Position objects.
|
| - VisiblePosition visiblePos = VisiblePosition(createLegacyEditingPosition(textMarkerData.node, textMarkerData.offset), textMarkerData.affinity);
|
| - Position deepPos = visiblePos.deepEquivalent();
|
| - if (deepPos.isNull())
|
| - return VisiblePosition();
|
| -
|
| - RenderObject* renderer = deepPos.deprecatedNode()->renderer();
|
| - if (!renderer)
|
| - return VisiblePosition();
|
| -
|
| - AXObjectCache* cache = renderer->document().axObjectCache();
|
| - if (!cache->isIDinUse(textMarkerData.axID))
|
| - return VisiblePosition();
|
| -
|
| - if (deepPos.deprecatedNode() != textMarkerData.node || deepPos.deprecatedEditingOffset() != textMarkerData.offset)
|
| - return VisiblePosition();
|
| -
|
| - return visiblePos;
|
| -}
|
| -
|
| -void AXObjectCache::textMarkerDataForVisiblePosition(TextMarkerData& textMarkerData, const VisiblePosition& visiblePos)
|
| -{
|
| - // This memory must be bzero'd so instances of TextMarkerData can be tested for byte-equivalence.
|
| - // This also allows callers to check for failure by looking at textMarkerData upon return.
|
| - memset(&textMarkerData, 0, sizeof(TextMarkerData));
|
| -
|
| - if (visiblePos.isNull())
|
| - return;
|
| -
|
| - Position deepPos = visiblePos.deepEquivalent();
|
| - Node* domNode = deepPos.deprecatedNode();
|
| - ASSERT(domNode);
|
| - if (!domNode)
|
| - return;
|
| -
|
| - if (isHTMLInputElement(*domNode) && toHTMLInputElement(*domNode).isPasswordField())
|
| - return;
|
| -
|
| - // find or create an accessibility object for this node
|
| - AXObjectCache* cache = domNode->document().axObjectCache();
|
| - RefPtr<AXObject> obj = cache->getOrCreate(domNode);
|
| -
|
| - textMarkerData.axID = obj.get()->axObjectID();
|
| - textMarkerData.node = domNode;
|
| - textMarkerData.offset = deepPos.deprecatedEditingOffset();
|
| - textMarkerData.affinity = visiblePos.affinity();
|
| -
|
| - cache->setNodeInUse(domNode);
|
| -}
|
| -
|
| const Element* AXObjectCache::rootAXEditableElement(const Node* node)
|
| {
|
| const Element* result = node->rootEditableElement();
|
|
|