Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 238723010: Remove some dead code from AXObjectCache (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/accessibility/AXObjectCache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « Source/core/accessibility/AXObjectCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698