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

Side by Side Diff: Source/WebCore/svg/SVGTextPathElement.cpp

Issue 8203008: Merge 96707 - Crash in SVGTRefElement::updateReferencedText. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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 | « Source/WebCore/svg/SVGTRefElement.cpp ('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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return false; 138 return false;
139 } 139 }
140 140
141 void SVGTextPathElement::insertedIntoDocument() 141 void SVGTextPathElement::insertedIntoDocument()
142 { 142 {
143 SVGTextContentElement::insertedIntoDocument(); 143 SVGTextContentElement::insertedIntoDocument();
144 144
145 String id; 145 String id;
146 Element* targetElement = SVGURIReference::targetElementFromIRIString(href(), document(), &id); 146 Element* targetElement = SVGURIReference::targetElementFromIRIString(href(), document(), &id);
147 if (!targetElement) { 147 if (!targetElement) {
148 if (hasPendingResources() || id.isEmpty())
149 return;
150
151 ASSERT(!hasPendingResources());
148 document()->accessSVGExtensions()->addPendingResource(id, this); 152 document()->accessSVGExtensions()->addPendingResource(id, this);
153 ASSERT(hasPendingResources());
149 return; 154 return;
150 } 155 }
151 } 156 }
152 157
153 bool SVGTextPathElement::selfHasRelativeLengths() const 158 bool SVGTextPathElement::selfHasRelativeLengths() const
154 { 159 {
155 return startOffset().isRelative() 160 return startOffset().isRelative()
156 || SVGTextContentElement::selfHasRelativeLengths(); 161 || SVGTextContentElement::selfHasRelativeLengths();
157 } 162 }
158 163
159 } 164 }
160 165
161 #endif // ENABLE(SVG) 166 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/svg/SVGTRefElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698