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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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
Index: Source/core/accessibility/AXObjectCache.cpp
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 69b2ad6a79408defd117fb2ad3c9f7789013fb6a..6bd2698bd5e2515ac833157300fbbdaaa00d1c44 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -131,7 +131,7 @@ AccessibilityObject* AXObjectCache::focusedImageMapUIElement(HTMLAreaElement* ar
if (!imageElement)
return 0;
- AccessibilityObject* axRenderImage = areaElement->document()->axObjectCache()->getOrCreate(imageElement);
+ AccessibilityObject* axRenderImage = areaElement->document().axObjectCache()->getOrCreate(imageElement);
if (!axRenderImage)
return 0;
@@ -163,7 +163,7 @@ AccessibilityObject* AXObjectCache::focusedUIElementForPage(const Page* page)
if (isHTMLAreaElement(focusedNode))
return focusedImageMapUIElement(toHTMLAreaElement(focusedNode));
- AccessibilityObject* obj = focusedNode->document()->axObjectCache()->getOrCreate(focusedNode);
+ AccessibilityObject* obj = focusedNode->document().axObjectCache()->getOrCreate(focusedNode);
if (!obj)
return 0;
@@ -664,7 +664,7 @@ void AXObjectCache::postNotification(RenderObject* renderer, AXNotification noti
if (!renderer)
return;
- postNotification(object.get(), renderer->document(), notification, postToElement, postType);
+ postNotification(object.get(), &renderer->document(), notification, postToElement, postType);
}
void AXObjectCache::postNotification(Node* node, AXNotification notification, bool postToElement, PostType postType)
@@ -685,7 +685,7 @@ void AXObjectCache::postNotification(Node* node, AXNotification notification, bo
if (!node)
return;
- postNotification(object.get(), node->document(), notification, postToElement, postType);
+ postNotification(object.get(), &node->document(), notification, postToElement, postType);
}
void AXObjectCache::postNotification(AccessibilityObject* object, Document* document, AXNotification notification, bool postToElement, PostType postType)
@@ -832,7 +832,7 @@ VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(TextMarkerData&
if (!renderer)
return VisiblePosition();
- AXObjectCache* cache = renderer->document()->axObjectCache();
+ AXObjectCache* cache = renderer->document().axObjectCache();
if (!cache->isIDinUse(textMarkerData.axID))
return VisiblePosition();
@@ -861,7 +861,7 @@ void AXObjectCache::textMarkerDataForVisiblePosition(TextMarkerData& textMarkerD
return;
// find or create an accessibility object for this node
- AXObjectCache* cache = domNode->document()->axObjectCache();
+ AXObjectCache* cache = domNode->document().axObjectCache();
RefPtr<AccessibilityObject> obj = cache->getOrCreate(domNode);
textMarkerData.axID = obj.get()->axObjectID();
@@ -949,7 +949,7 @@ void AXObjectCache::handleFocusedUIElementChanged(Node*, Node* newFocusedNode)
if (!newFocusedNode)
return;
- Page* page = newFocusedNode->document()->page();
+ Page* page = newFocusedNode->document().page();
if (!page)
return;
« no previous file with comments | « Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp ('k') | Source/core/accessibility/AccessibilityARIAGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698