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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 SVGMPathElement::~SVGMPathElement() 44 SVGMPathElement::~SVGMPathElement()
45 { 45 {
46 #if !ENABLE(OILPAN) 46 #if !ENABLE(OILPAN)
47 clearResourceReferences(); 47 clearResourceReferences();
48 #endif 48 #endif
49 } 49 }
50 50
51 void SVGMPathElement::buildPendingResource() 51 void SVGMPathElement::buildPendingResource()
52 { 52 {
53 clearResourceReferences(); 53 clearResourceReferences();
54 if (!inDocument()) 54 if (!inShadowIncludingDocument())
55 return; 55 return;
56 56
57 AtomicString id; 57 AtomicString id;
58 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); 58 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id);
59 if (!target) { 59 if (!target) {
60 // Do not register as pending if we are already pending this resource. 60 // Do not register as pending if we are already pending this resource.
61 if (document().accessSVGExtensions().isElementPendingResource(this, id)) 61 if (document().accessSVGExtensions().isElementPendingResource(this, id))
62 return; 62 return;
63 63
64 if (!id.isEmpty()) { 64 if (!id.isEmpty()) {
(...skipping 10 matching lines...) Expand all
75 } 75 }
76 76
77 void SVGMPathElement::clearResourceReferences() 77 void SVGMPathElement::clearResourceReferences()
78 { 78 {
79 removeAllOutgoingReferences(); 79 removeAllOutgoingReferences();
80 } 80 }
81 81
82 Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode* rootParent) 82 Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode* rootParent)
83 { 83 {
84 SVGElement::insertedInto(rootParent); 84 SVGElement::insertedInto(rootParent);
85 if (rootParent->inDocument()) 85 if (rootParent->inShadowIncludingDocument())
86 buildPendingResource(); 86 buildPendingResource();
87 return InsertionDone; 87 return InsertionDone;
88 } 88 }
89 89
90 void SVGMPathElement::removedFrom(ContainerNode* rootParent) 90 void SVGMPathElement::removedFrom(ContainerNode* rootParent)
91 { 91 {
92 SVGElement::removedFrom(rootParent); 92 SVGElement::removedFrom(rootParent);
93 notifyParentOfPathChange(rootParent); 93 notifyParentOfPathChange(rootParent);
94 if (rootParent->inDocument()) 94 if (rootParent->inShadowIncludingDocument())
95 clearResourceReferences(); 95 clearResourceReferences();
96 } 96 }
97 97
98 void SVGMPathElement::svgAttributeChanged(const QualifiedName& attrName) 98 void SVGMPathElement::svgAttributeChanged(const QualifiedName& attrName)
99 { 99 {
100 if (SVGURIReference::isKnownAttribute(attrName)) { 100 if (SVGURIReference::isKnownAttribute(attrName)) {
101 SVGElement::InvalidationGuard invalidationGuard(this); 101 SVGElement::InvalidationGuard invalidationGuard(this);
102 buildPendingResource(); 102 buildPendingResource();
103 return; 103 return;
104 } 104 }
(...skipping 12 matching lines...) Expand all
117 notifyParentOfPathChange(parentNode()); 117 notifyParentOfPathChange(parentNode());
118 } 118 }
119 119
120 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) 120 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent)
121 { 121 {
122 if (isSVGAnimateMotionElement(parent)) 122 if (isSVGAnimateMotionElement(parent))
123 toSVGAnimateMotionElement(parent)->updateAnimationPath(); 123 toSVGAnimateMotionElement(parent)->updateAnimationPath();
124 } 124 }
125 125
126 } // namespace blink 126 } // 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