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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTextPathElement.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 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 { 113 {
114 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren tNode()))) 114 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren tNode())))
115 return Element::layoutObjectIsNeeded(style); 115 return Element::layoutObjectIsNeeded(style);
116 116
117 return false; 117 return false;
118 } 118 }
119 119
120 void SVGTextPathElement::buildPendingResource() 120 void SVGTextPathElement::buildPendingResource()
121 { 121 {
122 clearResourceReferences(); 122 clearResourceReferences();
123 if (!inDocument()) 123 if (!inShadowIncludingDocument())
124 return; 124 return;
125 125
126 AtomicString id; 126 AtomicString id;
127 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); 127 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id);
128 if (!target) { 128 if (!target) {
129 // Do not register as pending if we are already pending this resource. 129 // Do not register as pending if we are already pending this resource.
130 if (document().accessSVGExtensions().isElementPendingResource(this, id)) 130 if (document().accessSVGExtensions().isElementPendingResource(this, id))
131 return; 131 return;
132 132
133 if (!id.isEmpty()) { 133 if (!id.isEmpty()) {
(...skipping 13 matching lines...) Expand all
147 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod e* rootParent) 147 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod e* rootParent)
148 { 148 {
149 SVGTextContentElement::insertedInto(rootParent); 149 SVGTextContentElement::insertedInto(rootParent);
150 buildPendingResource(); 150 buildPendingResource();
151 return InsertionDone; 151 return InsertionDone;
152 } 152 }
153 153
154 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) 154 void SVGTextPathElement::removedFrom(ContainerNode* rootParent)
155 { 155 {
156 SVGTextContentElement::removedFrom(rootParent); 156 SVGTextContentElement::removedFrom(rootParent);
157 if (rootParent->inDocument()) 157 if (rootParent->inShadowIncludingDocument())
158 clearResourceReferences(); 158 clearResourceReferences();
159 } 159 }
160 160
161 bool SVGTextPathElement::selfHasRelativeLengths() const 161 bool SVGTextPathElement::selfHasRelativeLengths() const
162 { 162 {
163 return m_startOffset->currentValue()->isRelative() 163 return m_startOffset->currentValue()->isRelative()
164 || SVGTextContentElement::selfHasRelativeLengths(); 164 || SVGTextContentElement::selfHasRelativeLengths();
165 } 165 }
166 166
167 } // namespace blink 167 } // 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