| Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| index 28f432cf033ac6bb146abe053c886419c1e9224c..2461000850a500f13d4c0f412dea0dc62972e419 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| @@ -49,6 +49,7 @@
|
| #include "core/svg/SVGGraphicsElement.h"
|
| #include "core/svg/SVGSVGElement.h"
|
| #include "core/svg/SVGTitleElement.h"
|
| +#include "core/svg/SVGTreeScopeResources.h"
|
| #include "core/svg/SVGUseElement.h"
|
| #include "core/svg/properties/SVGProperty.h"
|
| #include "wtf/TemporaryChange.h"
|
| @@ -109,20 +110,19 @@ void SVGElement::willRecalcStyle(StyleRecalcChange change)
|
|
|
| void SVGElement::buildPendingResourcesIfNeeded()
|
| {
|
| - Document& document = this->document();
|
| if (!needsPendingResourceHandling() || !inShadowIncludingDocument() || inUseShadowTree())
|
| return;
|
|
|
| - SVGDocumentExtensions& extensions = document.accessSVGExtensions();
|
| + SVGTreeScopeResources& treeScopeResources = this->treeScope().accessSVGTreeScopedResources();
|
| AtomicString resourceId = getIdAttribute();
|
| - if (!extensions.hasPendingResource(resourceId))
|
| + if (!treeScopeResources.hasPendingResource(resourceId))
|
| return;
|
|
|
| // Mark pending resources as pending for removal.
|
| - extensions.markPendingResourcesForRemoval(resourceId);
|
| + treeScopeResources.markPendingResourcesForRemoval(resourceId);
|
|
|
| // Rebuild pending resources for each client of a pending resource that is being removed.
|
| - while (Element* clientElement = extensions.removeElementFromPendingResourcesForRemoval(resourceId)) {
|
| + while (Element* clientElement = treeScopeResources.removeElementFromPendingResourcesForRemoval(resourceId)) {
|
| ASSERT(clientElement->hasPendingResources());
|
| if (clientElement->hasPendingResources()) {
|
| // FIXME: Ideally we'd always resolve pending resources async instead of inside
|
| @@ -132,7 +132,7 @@ void SVGElement::buildPendingResourcesIfNeeded()
|
| toSVGUseElement(clientElement)->invalidateShadowTree();
|
| else
|
| clientElement->buildPendingResource();
|
| - extensions.clearHasPendingResourcesIfPossible(clientElement);
|
| + treeScopeResources.clearHasPendingResourcesIfPossible(clientElement);
|
| }
|
| }
|
| }
|
|
|