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

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

Issue 1812493002: If add 'id' on pending SVG resource references does not work for non-resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/text/removing-id-on-path-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 if (!id.isEmpty()) { 133 if (!id.isEmpty()) {
134 document().accessSVGExtensions().addPendingResource(id, this); 134 document().accessSVGExtensions().addPendingResource(id, this);
135 ASSERT(hasPendingResources()); 135 ASSERT(hasPendingResources());
136 } 136 }
137 } else if (isSVGPathElement(*target)) { 137 } else if (isSVGPathElement(*target)) {
138 // Register us with the target in the dependencies map. Any change of hr efElement 138 // Register us with the target in the dependencies map. Any change of hr efElement
139 // that leads to relayout/repainting now informs us, so we can react to it. 139 // that leads to relayout/repainting now informs us, so we can react to it.
140 addReferenceTo(toSVGElement((target))); 140 addReferenceTo(toSVGElement((target)));
141 } 141 }
142
143 if (LayoutObject* layoutObject = this->layoutObject())
144 markForLayoutAndParentResourceInvalidation(layoutObject);
142 } 145 }
143 146
144 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod e* rootParent) 147 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod e* rootParent)
145 { 148 {
146 SVGTextContentElement::insertedInto(rootParent); 149 SVGTextContentElement::insertedInto(rootParent);
147 buildPendingResource(); 150 buildPendingResource();
148 return InsertionDone; 151 return InsertionDone;
149 } 152 }
150 153
151 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) 154 void SVGTextPathElement::removedFrom(ContainerNode* rootParent)
152 { 155 {
153 SVGTextContentElement::removedFrom(rootParent); 156 SVGTextContentElement::removedFrom(rootParent);
154 if (rootParent->inDocument()) 157 if (rootParent->inDocument())
155 clearResourceReferences(); 158 clearResourceReferences();
156 } 159 }
157 160
158 bool SVGTextPathElement::selfHasRelativeLengths() const 161 bool SVGTextPathElement::selfHasRelativeLengths() const
159 { 162 {
160 return m_startOffset->currentValue()->isRelative() 163 return m_startOffset->currentValue()->isRelative()
161 || SVGTextContentElement::selfHasRelativeLengths(); 164 || SVGTextContentElement::selfHasRelativeLengths();
162 } 165 }
163 166
164 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/text/removing-id-on-path-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698