| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(),
document(), &id); | 157 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(),
document(), &id); |
| 158 if (!target) { | 158 if (!target) { |
| 159 // Do not register as pending if we are already pending this resource. | 159 // Do not register as pending if we are already pending this resource. |
| 160 if (document().accessSVGExtensions().isElementPendingResource(this, id)) | 160 if (document().accessSVGExtensions().isElementPendingResource(this, id)) |
| 161 return; | 161 return; |
| 162 | 162 |
| 163 if (!id.isEmpty()) { | 163 if (!id.isEmpty()) { |
| 164 document().accessSVGExtensions().addPendingResource(id, this); | 164 document().accessSVGExtensions().addPendingResource(id, this); |
| 165 ASSERT(hasPendingResources()); | 165 ASSERT(hasPendingResources()); |
| 166 } | 166 } |
| 167 } else if (target->hasTagName(SVGNames::pathTag)) { | 167 } else if (isSVGPathElement(*target)) { |
| 168 // Register us with the target in the dependencies map. Any change of hr
efElement | 168 // Register us with the target in the dependencies map. Any change of hr
efElement |
| 169 // that leads to relayout/repainting now informs us, so we can react to
it. | 169 // that leads to relayout/repainting now informs us, so we can react to
it. |
| 170 document().accessSVGExtensions().addElementReferencingTarget(this, toSVG
Element(target)); | 170 document().accessSVGExtensions().addElementReferencingTarget(this, toSVG
Element((target))); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 | 173 |
| 174 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod
e* rootParent) | 174 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod
e* rootParent) |
| 175 { | 175 { |
| 176 SVGTextContentElement::insertedInto(rootParent); | 176 SVGTextContentElement::insertedInto(rootParent); |
| 177 buildPendingResource(); | 177 buildPendingResource(); |
| 178 return InsertionDone; | 178 return InsertionDone; |
| 179 } | 179 } |
| 180 | 180 |
| 181 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) | 181 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) |
| 182 { | 182 { |
| 183 SVGTextContentElement::removedFrom(rootParent); | 183 SVGTextContentElement::removedFrom(rootParent); |
| 184 if (rootParent->inDocument()) | 184 if (rootParent->inDocument()) |
| 185 clearResourceReferences(); | 185 clearResourceReferences(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool SVGTextPathElement::selfHasRelativeLengths() const | 188 bool SVGTextPathElement::selfHasRelativeLengths() const |
| 189 { | 189 { |
| 190 return m_startOffset->currentValue()->isRelative() | 190 return m_startOffset->currentValue()->isRelative() |
| 191 || SVGTextContentElement::selfHasRelativeLengths(); | 191 || SVGTextContentElement::selfHasRelativeLengths(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } | 194 } |
| OLD | NEW |