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

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

Issue 2107153002: SVG object with same idrefs get conflicted even they are under different shadow root Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename the method in TreeScope class 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void SVGTextPathElement::buildPendingResource() 117 void SVGTextPathElement::buildPendingResource()
118 { 118 {
119 clearResourceReferences(); 119 clearResourceReferences();
120 if (!inShadowIncludingDocument()) 120 if (!inShadowIncludingDocument())
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 (treeScope().accessSVGTreeScopedResources().isElementPendingResource( this, id))
128 return; 128 return;
129 129
130 if (!id.isEmpty()) { 130 if (!id.isEmpty()) {
131 document().accessSVGExtensions().addPendingResource(id, this); 131 treeScope().accessSVGTreeScopedResources().addPendingResource(id, th is);
132 ASSERT(hasPendingResources()); 132 ASSERT(hasPendingResources());
133 } 133 }
134 } else if (isSVGPathElement(*target)) { 134 } else if (isSVGPathElement(*target)) {
135 // Register us with the target in the dependencies map. Any change of hr efElement 135 // Register us with the target in the dependencies map. Any change of hr efElement
136 // that leads to relayout/repainting now informs us, so we can react to it. 136 // that leads to relayout/repainting now informs us, so we can react to it.
137 addReferenceTo(toSVGElement((target))); 137 addReferenceTo(toSVGElement((target)));
138 } 138 }
139 139
140 if (LayoutObject* layoutObject = this->layoutObject()) 140 if (LayoutObject* layoutObject = this->layoutObject())
141 markForLayoutAndParentResourceInvalidation(layoutObject); 141 markForLayoutAndParentResourceInvalidation(layoutObject);
(...skipping 13 matching lines...) Expand all
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/SVGMPathElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698