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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGMPathElement.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 30 matching lines...) Expand all
41 41
42 DEFINE_NODE_FACTORY(SVGMPathElement) 42 DEFINE_NODE_FACTORY(SVGMPathElement)
43 43
44 SVGMPathElement::~SVGMPathElement() 44 SVGMPathElement::~SVGMPathElement()
45 { 45 {
46 } 46 }
47 47
48 void SVGMPathElement::buildPendingResource() 48 void SVGMPathElement::buildPendingResource()
49 { 49 {
50 clearResourceReferences(); 50 clearResourceReferences();
51 if (!inShadowIncludingDocument()) 51 if (!isConnected())
52 return; 52 return;
53 53
54 AtomicString id; 54 AtomicString id;
55 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); 55 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id);
56 if (!target) { 56 if (!target) {
57 // Do not register as pending if we are already pending this resource. 57 // Do not register as pending if we are already pending this resource.
58 if (document().accessSVGExtensions().isElementPendingResource(this, id)) 58 if (document().accessSVGExtensions().isElementPendingResource(this, id))
59 return; 59 return;
60 60
61 if (!id.isEmpty()) { 61 if (!id.isEmpty()) {
(...skipping 10 matching lines...) Expand all
72 } 72 }
73 73
74 void SVGMPathElement::clearResourceReferences() 74 void SVGMPathElement::clearResourceReferences()
75 { 75 {
76 removeAllOutgoingReferences(); 76 removeAllOutgoingReferences();
77 } 77 }
78 78
79 Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode* rootParent) 79 Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode* rootParent)
80 { 80 {
81 SVGElement::insertedInto(rootParent); 81 SVGElement::insertedInto(rootParent);
82 if (rootParent->inShadowIncludingDocument()) 82 if (rootParent->isConnected())
83 buildPendingResource(); 83 buildPendingResource();
84 return InsertionDone; 84 return InsertionDone;
85 } 85 }
86 86
87 void SVGMPathElement::removedFrom(ContainerNode* rootParent) 87 void SVGMPathElement::removedFrom(ContainerNode* rootParent)
88 { 88 {
89 SVGElement::removedFrom(rootParent); 89 SVGElement::removedFrom(rootParent);
90 notifyParentOfPathChange(rootParent); 90 notifyParentOfPathChange(rootParent);
91 if (rootParent->inShadowIncludingDocument()) 91 if (rootParent->isConnected())
92 clearResourceReferences(); 92 clearResourceReferences();
93 } 93 }
94 94
95 void SVGMPathElement::svgAttributeChanged(const QualifiedName& attrName) 95 void SVGMPathElement::svgAttributeChanged(const QualifiedName& attrName)
96 { 96 {
97 if (SVGURIReference::isKnownAttribute(attrName)) { 97 if (SVGURIReference::isKnownAttribute(attrName)) {
98 SVGElement::InvalidationGuard invalidationGuard(this); 98 SVGElement::InvalidationGuard invalidationGuard(this);
99 buildPendingResource(); 99 buildPendingResource();
100 return; 100 return;
101 } 101 }
(...skipping 12 matching lines...) Expand all
114 notifyParentOfPathChange(parentNode()); 114 notifyParentOfPathChange(parentNode());
115 } 115 }
116 116
117 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) 117 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent)
118 { 118 {
119 if (isSVGAnimateMotionElement(parent)) 119 if (isSVGAnimateMotionElement(parent))
120 toSVGAnimateMotionElement(parent)->updateAnimationPath(); 120 toSVGAnimateMotionElement(parent)->updateAnimationPath();
121 } 121 }
122 122
123 } // namespace blink 123 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp ('k') | third_party/WebKit/Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698