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

Unified Diff: Source/core/svg/SVGUseElement.cpp

Issue 1287243003: Don't require a valid reference scope for a <use> shadow tree update (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop referenceScope check from scheduleShadowTreeRecreation. Created 5 years, 4 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
« no previous file with comments | « LayoutTests/svg/custom/use-href-change-local-to-invalid-remote-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGUseElement.cpp
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp
index 288b62ad7af4181459b09a011582f896135846db..c1ee59976bbdc9c28888ab7bc267993284a4922e 100644
--- a/Source/core/svg/SVGUseElement.cpp
+++ b/Source/core/svg/SVGUseElement.cpp
@@ -126,9 +126,9 @@ void SVGUseElement::removedFrom(ContainerNode* rootParent)
TreeScope* SVGUseElement::referencedScope() const
{
- if (!isExternalURIReference(hrefString(), document()))
- return &treeScope();
- return externalDocument();
+ if (isStructurallyExternal())
+ return externalDocument();
+ return &treeScope();
}
Document* SVGUseElement::externalDocument() const
@@ -222,8 +222,7 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGURIReference::isKnownAttribute(attrName)) {
SVGElement::InvalidationGuard invalidationGuard(this);
- bool isExternalReference = isExternalURIReference(hrefString(), document());
- if (isExternalReference) {
+ if (isStructurallyExternal()) {
KURL url = document().completeURL(hrefString());
if (url.hasFragmentIdentifier()) {
FetchRequest request(ResourceRequest(url), localName());
@@ -297,7 +296,7 @@ static bool subtreeContainsDisallowedElement(Node* start)
void SVGUseElement::scheduleShadowTreeRecreation()
{
- if (!referencedScope() || inUseShadowTree())
+ if (inUseShadowTree())
return;
m_needsShadowTreeRecreation = true;
document().scheduleUseShadowTreeUpdate(*this);
@@ -320,10 +319,10 @@ void SVGUseElement::clearResourceReferences()
void SVGUseElement::buildPendingResource()
{
- if (!referencedScope() || inUseShadowTree())
+ if (inUseShadowTree())
return;
clearResourceReferences();
- if (!inDocument())
+ if (!referencedScope() || !inDocument())
return;
AtomicString id;
« no previous file with comments | « LayoutTests/svg/custom/use-href-change-local-to-invalid-remote-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698