| OLD | NEW |
| 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 Loading... |
| 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) |
| OLD | NEW |