Index: Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
index 0f7ac9be140b042d83b0efc913b87cfd40bffbef..71e0f2c8b89971a8e4012d10b4f924576208c448 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
@@ -32,7 +32,7 @@ |
namespace WebCore { |
-static inline SVGDocumentExtensions* svgExtensionsFromElement(SVGElement* element) |
+static inline SVGDocumentExtensions& svgExtensionsFromElement(SVGElement* element) |
{ |
ASSERT(element); |
return element->document().accessSVGExtensions(); |
@@ -51,7 +51,7 @@ RenderSVGResourceContainer::RenderSVGResourceContainer(SVGElement* node) |
RenderSVGResourceContainer::~RenderSVGResourceContainer() |
{ |
if (m_registered) |
- svgExtensionsFromElement(element())->removeResource(m_id); |
+ svgExtensionsFromElement(element()).removeResource(m_id); |
} |
void RenderSVGResourceContainer::layout() |
@@ -92,8 +92,8 @@ void RenderSVGResourceContainer::idChanged() |
removeAllClientsFromCache(); |
// Remove old id, that is guaranteed to be present in cache. |
- SVGDocumentExtensions* extensions = svgExtensionsFromElement(element()); |
- extensions->removeResource(m_id); |
+ SVGDocumentExtensions& extensions = svgExtensionsFromElement(element()); |
+ extensions.removeResource(m_id); |
m_id = element()->getIdAttribute(); |
registerResource(); |
@@ -210,22 +210,22 @@ void RenderSVGResourceContainer::invalidateCacheAndMarkForLayout(SubtreeLayoutSc |
void RenderSVGResourceContainer::registerResource() |
{ |
- SVGDocumentExtensions* extensions = svgExtensionsFromElement(element()); |
- if (!extensions->hasPendingResource(m_id)) { |
- extensions->addResource(m_id, this); |
+ SVGDocumentExtensions& extensions = svgExtensionsFromElement(element()); |
+ if (!extensions.hasPendingResource(m_id)) { |
+ extensions.addResource(m_id, this); |
return; |
} |
- OwnPtr<SVGDocumentExtensions::SVGPendingElements> clients(extensions->removePendingResource(m_id)); |
+ OwnPtr<SVGDocumentExtensions::SVGPendingElements> clients(extensions.removePendingResource(m_id)); |
// Cache us with the new id. |
- extensions->addResource(m_id, this); |
+ extensions.addResource(m_id, this); |
// Update cached resources of pending clients. |
const SVGDocumentExtensions::SVGPendingElements::const_iterator end = clients->end(); |
for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients->begin(); it != end; ++it) { |
ASSERT((*it)->hasPendingResources()); |
- extensions->clearHasPendingResourcesIfPossible(*it); |
+ extensions.clearHasPendingResourcesIfPossible(*it); |
RenderObject* renderer = (*it)->renderer(); |
if (!renderer) |
continue; |