| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 { | 110 { |
| 111 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren
tNode()))) | 111 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren
tNode()))) |
| 112 return Element::layoutObjectIsNeeded(style); | 112 return Element::layoutObjectIsNeeded(style); |
| 113 | 113 |
| 114 return false; | 114 return false; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void SVGTextPathElement::buildPendingResource() | 117 void SVGTextPathElement::buildPendingResource() |
| 118 { | 118 { |
| 119 clearResourceReferences(); | 119 clearResourceReferences(); |
| 120 if (!inShadowIncludingDocument()) | 120 if (!isConnected()) |
| 121 return; | 121 return; |
| 122 | 122 |
| 123 AtomicString id; | 123 AtomicString id; |
| 124 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(),
treeScope(), &id); | 124 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(),
treeScope(), &id); |
| 125 if (!target) { | 125 if (!target) { |
| 126 // Do not register as pending if we are already pending this resource. | 126 // Do not register as pending if we are already pending this resource. |
| 127 if (document().accessSVGExtensions().isElementPendingResource(this, id)) | 127 if (document().accessSVGExtensions().isElementPendingResource(this, id)) |
| 128 return; | 128 return; |
| 129 | 129 |
| 130 if (!id.isEmpty()) { | 130 if (!id.isEmpty()) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 144 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod
e* rootParent) | 144 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNod
e* rootParent) |
| 145 { | 145 { |
| 146 SVGTextContentElement::insertedInto(rootParent); | 146 SVGTextContentElement::insertedInto(rootParent); |
| 147 buildPendingResource(); | 147 buildPendingResource(); |
| 148 return InsertionDone; | 148 return InsertionDone; |
| 149 } | 149 } |
| 150 | 150 |
| 151 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) | 151 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) |
| 152 { | 152 { |
| 153 SVGTextContentElement::removedFrom(rootParent); | 153 SVGTextContentElement::removedFrom(rootParent); |
| 154 if (rootParent->inShadowIncludingDocument()) | 154 if (rootParent->isConnected()) |
| 155 clearResourceReferences(); | 155 clearResourceReferences(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool SVGTextPathElement::selfHasRelativeLengths() const | 158 bool SVGTextPathElement::selfHasRelativeLengths() const |
| 159 { | 159 { |
| 160 return m_startOffset->currentValue()->isRelative() | 160 return m_startOffset->currentValue()->isRelative() |
| 161 || SVGTextContentElement::selfHasRelativeLengths(); | 161 || SVGTextContentElement::selfHasRelativeLengths(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |