| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 SVGTextPathElement::~SVGTextPathElement() | 67 SVGTextPathElement::~SVGTextPathElement() |
| 68 { | 68 { |
| 69 #if !ENABLE(OILPAN) | 69 #if !ENABLE(OILPAN) |
| 70 clearResourceReferences(); | 70 clearResourceReferences(); |
| 71 #endif | 71 #endif |
| 72 } | 72 } |
| 73 | 73 |
| 74 void SVGTextPathElement::clearResourceReferences() | 74 void SVGTextPathElement::clearResourceReferences() |
| 75 { | 75 { |
| 76 document().accessSVGExtensions().removeAllTargetReferencesForElement(this); | 76 removeAllOutgoingReferences(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName) | 79 bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName) |
| 80 { | 80 { |
| 81 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 81 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 82 if (supportedAttributes.isEmpty()) { | 82 if (supportedAttributes.isEmpty()) { |
| 83 SVGURIReference::addSupportedAttributes(supportedAttributes); | 83 SVGURIReference::addSupportedAttributes(supportedAttributes); |
| 84 supportedAttributes.add(SVGNames::startOffsetAttr); | 84 supportedAttributes.add(SVGNames::startOffsetAttr); |
| 85 supportedAttributes.add(SVGNames::methodAttr); | 85 supportedAttributes.add(SVGNames::methodAttr); |
| 86 supportedAttributes.add(SVGNames::spacingAttr); | 86 supportedAttributes.add(SVGNames::spacingAttr); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if (document().accessSVGExtensions().isElementPendingResource(this, id)) | 154 if (document().accessSVGExtensions().isElementPendingResource(this, id)) |
| 155 return; | 155 return; |
| 156 | 156 |
| 157 if (!id.isEmpty()) { | 157 if (!id.isEmpty()) { |
| 158 document().accessSVGExtensions().addPendingResource(id, this); | 158 document().accessSVGExtensions().addPendingResource(id, this); |
| 159 ASSERT(hasPendingResources()); | 159 ASSERT(hasPendingResources()); |
| 160 } | 160 } |
| 161 } else if (isSVGPathElement(*target)) { | 161 } else if (isSVGPathElement(*target)) { |
| 162 // Register us with the target in the dependencies map. Any change of hr
efElement | 162 // Register us with the target in the dependencies map. Any change of hr
efElement |
| 163 // that leads to relayout/repainting now informs us, so we can react to
it. | 163 // that leads to relayout/repainting now informs us, so we can react to
it. |
| 164 document().accessSVGExtensions().addElementReferencingTarget(this, toSVG
Element((target))); | 164 addReferenceTo(toSVGElement((target))); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod
e* rootParent) | 168 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod
e* rootParent) |
| 169 { | 169 { |
| 170 SVGTextContentElement::insertedInto(rootParent); | 170 SVGTextContentElement::insertedInto(rootParent); |
| 171 buildPendingResource(); | 171 buildPendingResource(); |
| 172 return InsertionDone; | 172 return InsertionDone; |
| 173 } | 173 } |
| 174 | 174 |
| 175 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) | 175 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) |
| 176 { | 176 { |
| 177 SVGTextContentElement::removedFrom(rootParent); | 177 SVGTextContentElement::removedFrom(rootParent); |
| 178 if (rootParent->inDocument()) | 178 if (rootParent->inDocument()) |
| 179 clearResourceReferences(); | 179 clearResourceReferences(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 bool SVGTextPathElement::selfHasRelativeLengths() const | 182 bool SVGTextPathElement::selfHasRelativeLengths() const |
| 183 { | 183 { |
| 184 return m_startOffset->currentValue()->isRelative() | 184 return m_startOffset->currentValue()->isRelative() |
| 185 || SVGTextContentElement::selfHasRelativeLengths(); | 185 || SVGTextContentElement::selfHasRelativeLengths(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } | 188 } |
| OLD | NEW |