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

Unified Diff: Source/core/svg/SVGFEImageElement.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/svg/SVGFEConvolveMatrixElement.cpp ('k') | Source/core/svg/SVGFitToViewBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGFEImageElement.cpp
diff --git a/Source/core/svg/SVGFEImageElement.cpp b/Source/core/svg/SVGFEImageElement.cpp
index c1d0e37630bb6153d70ae749197c7529e97fb1e2..652dad3dc0a28ec7294a87ae3fdd3d2bd377b301 100644
--- a/Source/core/svg/SVGFEImageElement.cpp
+++ b/Source/core/svg/SVGFEImageElement.cpp
@@ -73,14 +73,13 @@ void SVGFEImageElement::clearResourceReferences()
m_cachedImage = 0;
}
- ASSERT(document());
- document()->accessSVGExtensions()->removeAllTargetReferencesForElement(this);
+ document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
}
void SVGFEImageElement::fetchImageResource()
{
FetchRequest request(ResourceRequest(ownerDocument()->completeURL(hrefCurrentValue())), localName());
- m_cachedImage = document()->fetcher()->fetchImage(request);
+ m_cachedImage = document().fetcher()->fetchImage(request);
if (m_cachedImage)
m_cachedImage->addClient(this);
@@ -93,18 +92,18 @@ void SVGFEImageElement::buildPendingResource()
return;
String id;
- Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentValue(), document(), &id);
+ Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentValue(), &document(), &id);
if (!target) {
if (id.isEmpty())
fetchImageResource();
else {
- document()->accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions()->addPendingResource(id, this);
ASSERT(hasPendingResources());
}
} else if (target->isSVGElement()) {
// Register us with the target in the dependencies map. Any change of hrefElement
// that leads to relayout/repainting now informs us, so we can react to it.
- document()->accessSVGExtensions()->addElementReferencingTarget(this, toSVGElement(target));
+ document().accessSVGExtensions()->addElementReferencingTarget(this, toSVGElement(target));
}
invalidate();
@@ -201,14 +200,14 @@ PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
{
if (m_cachedImage)
return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(renderer()), preserveAspectRatioCurrentValue());
- return FEImage::createWithIRIReference(filter, document(), hrefCurrentValue(), preserveAspectRatioCurrentValue());
+ return FEImage::createWithIRIReference(filter, &document(), hrefCurrentValue(), preserveAspectRatioCurrentValue());
}
void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
{
SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls);
- addSubresourceURL(urls, document()->completeURL(hrefCurrentValue()));
+ addSubresourceURL(urls, document().completeURL(hrefCurrentValue()));
}
}
« no previous file with comments | « Source/core/svg/SVGFEConvolveMatrixElement.cpp ('k') | Source/core/svg/SVGFitToViewBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698