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())); |
} |
} |