SVGDocumentExtensions::resourcesCache() should return a reference.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Feb 2014 01:05:01 +0000 (01:05 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Feb 2014 01:05:01 +0000 (01:05 +0000)
commit786bb9b330b1b0df84842c29708700fee5dbf8cd
treec98fefd5b3136a00035e5d9c0d285a906566d6a4
parent87e3a33c59c6c3287fd1282ebb57935c17186b42
SVGDocumentExtensions::resourcesCache() should return a reference.
<https://webkit.org/b/128087>

The SVGResourcesCache is always present when the Document is using
SVG extensions, so make this return a reference and propagate that
knowledge to the call site.

This gets rid of an assertion and some rickety looking ->'s.
Also converted a loop to use C++11 range for syntax.

Reviewed by Sam Weinig.

* rendering/svg/SVGResourcesCache.cpp:
(WebCore::resourcesCacheFromRenderer):
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
(WebCore::SVGResourcesCache::clientStyleChanged):
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
(WebCore::SVGResourcesCache::clientDestroyed):
(WebCore::SVGResourcesCache::resourceDestroyed):
* svg/SVGDocumentExtensions.h:
(WebCore::SVGDocumentExtensions::resourcesCache):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/SVGResourcesCache.cpp
Source/WebCore/svg/SVGDocumentExtensions.h