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

Unified Diff: Source/core/rendering/svg/SVGResourcesCache.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
« no previous file with comments | « Source/core/rendering/svg/SVGResources.cpp ('k') | Source/core/rendering/svg/SVGRootInlineBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGResourcesCache.cpp
diff --git a/Source/core/rendering/svg/SVGResourcesCache.cpp b/Source/core/rendering/svg/SVGResourcesCache.cpp
index 9f89a4153209abefd1e77b7c5bd4c5ff5f453dfb..8e88ce68cad0a2bbbb71307fefe9bc81f4242e8a 100644
--- a/Source/core/rendering/svg/SVGResourcesCache.cpp
+++ b/Source/core/rendering/svg/SVGResourcesCache.cpp
@@ -84,10 +84,9 @@ void SVGResourcesCache::removeResourcesFromRenderObject(RenderObject* object)
static inline SVGResourcesCache* resourcesCacheFromRenderObject(const RenderObject* renderer)
{
- Document* document = renderer->document();
- ASSERT(document);
+ Document& document = renderer->document();
- SVGDocumentExtensions* extensions = document->accessSVGExtensions();
+ SVGDocumentExtensions* extensions = document.accessSVGExtensions();
ASSERT(extensions);
SVGResourcesCache* cache = extensions->resourcesCache();
@@ -199,7 +198,7 @@ void SVGResourcesCache::resourceDestroyed(RenderSVGResourceContainer* resource)
// Mark users of destroyed resources as pending resolution based on the id of the old resource.
Element* resourceElement = toElement(resource->node());
Element* clientElement = toElement(it->key->node());
- SVGDocumentExtensions* extensions = clientElement->document()->accessSVGExtensions();
+ SVGDocumentExtensions* extensions = clientElement->document().accessSVGExtensions();
extensions->addPendingResource(resourceElement->fastGetAttribute(HTMLNames::idAttr), clientElement);
}
« no previous file with comments | « Source/core/rendering/svg/SVGResources.cpp ('k') | Source/core/rendering/svg/SVGRootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698