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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTextPathElement.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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> 3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 { 110 {
111 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren tNode()))) 111 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren tNode())))
112 return Element::layoutObjectIsNeeded(style); 112 return Element::layoutObjectIsNeeded(style);
113 113
114 return false; 114 return false;
115 } 115 }
116 116
117 void SVGTextPathElement::buildPendingResource() 117 void SVGTextPathElement::buildPendingResource()
118 { 118 {
119 clearResourceReferences(); 119 clearResourceReferences();
120 if (!inShadowIncludingDocument()) 120 if (!isConnected())
121 return; 121 return;
122 122
123 AtomicString id; 123 AtomicString id;
124 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); 124 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id);
125 if (!target) { 125 if (!target) {
126 // Do not register as pending if we are already pending this resource. 126 // Do not register as pending if we are already pending this resource.
127 if (document().accessSVGExtensions().isElementPendingResource(this, id)) 127 if (document().accessSVGExtensions().isElementPendingResource(this, id))
128 return; 128 return;
129 129
130 if (!id.isEmpty()) { 130 if (!id.isEmpty()) {
(...skipping 13 matching lines...) Expand all
144 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod e* rootParent) 144 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod e* rootParent)
145 { 145 {
146 SVGTextContentElement::insertedInto(rootParent); 146 SVGTextContentElement::insertedInto(rootParent);
147 buildPendingResource(); 147 buildPendingResource();
148 return InsertionDone; 148 return InsertionDone;
149 } 149 }
150 150
151 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) 151 void SVGTextPathElement::removedFrom(ContainerNode* rootParent)
152 { 152 {
153 SVGTextContentElement::removedFrom(rootParent); 153 SVGTextContentElement::removedFrom(rootParent);
154 if (rootParent->inShadowIncludingDocument()) 154 if (rootParent->isConnected())
155 clearResourceReferences(); 155 clearResourceReferences();
156 } 156 }
157 157
158 bool SVGTextPathElement::selfHasRelativeLengths() const 158 bool SVGTextPathElement::selfHasRelativeLengths() const
159 { 159 {
160 return m_startOffset->currentValue()->isRelative() 160 return m_startOffset->currentValue()->isRelative()
161 || SVGTextContentElement::selfHasRelativeLengths(); 161 || SVGTextContentElement::selfHasRelativeLengths();
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGSVGElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTitleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698