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

Unified Diff: third_party/WebKit/Source/core/svg/SVGElement.cpp

Issue 2107153002: SVG object with same idrefs get conflicted even they are under different shadow root Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename the method in TreeScope class Created 4 years, 5 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
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);
}
}
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp ('k') | third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698