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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 if (!target) { | 128 if (!target) { |
129 // Do not register as pending if we are already pending this resource. | 129 // Do not register as pending if we are already pending this resource. |
130 if (document().accessSVGExtensions().isElementPendingResource(this, id)) | 130 if (document().accessSVGExtensions().isElementPendingResource(this, id)) |
131 return; | 131 return; |
132 | 132 |
133 if (!id.isEmpty()) { | 133 if (!id.isEmpty()) { |
134 document().accessSVGExtensions().addPendingResource(id, this); | 134 document().accessSVGExtensions().addPendingResource(id, this); |
135 ASSERT(hasPendingResources()); | 135 ASSERT(hasPendingResources()); |
136 } | 136 } |
137 } else if (isSVGPathElement(*target)) { | 137 } else if (isSVGPathElement(*target)) { |
138 // Register us with the target in the dependencies map. Any change of hrefEl
ement | 138 // Register us with the target in the dependencies map. Any change of |
139 // that leads to relayout/repainting now informs us, so we can react to it. | 139 // hrefElement that leads to relayout/repainting now informs us, so we can |
| 140 // react to it. |
140 addReferenceTo(toSVGElement((target))); | 141 addReferenceTo(toSVGElement((target))); |
141 } | 142 } |
142 | 143 |
143 if (LayoutObject* layoutObject = this->layoutObject()) | 144 if (LayoutObject* layoutObject = this->layoutObject()) |
144 markForLayoutAndParentResourceInvalidation(layoutObject); | 145 markForLayoutAndParentResourceInvalidation(layoutObject); |
145 } | 146 } |
146 | 147 |
147 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto( | 148 Node::InsertionNotificationRequest SVGTextPathElement::insertedInto( |
148 ContainerNode* rootParent) { | 149 ContainerNode* rootParent) { |
149 SVGTextContentElement::insertedInto(rootParent); | 150 SVGTextContentElement::insertedInto(rootParent); |
150 buildPendingResource(); | 151 buildPendingResource(); |
151 return InsertionDone; | 152 return InsertionDone; |
152 } | 153 } |
153 | 154 |
154 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) { | 155 void SVGTextPathElement::removedFrom(ContainerNode* rootParent) { |
155 SVGTextContentElement::removedFrom(rootParent); | 156 SVGTextContentElement::removedFrom(rootParent); |
156 if (rootParent->isConnected()) | 157 if (rootParent->isConnected()) |
157 clearResourceReferences(); | 158 clearResourceReferences(); |
158 } | 159 } |
159 | 160 |
160 bool SVGTextPathElement::selfHasRelativeLengths() const { | 161 bool SVGTextPathElement::selfHasRelativeLengths() const { |
161 return m_startOffset->currentValue()->isRelative() || | 162 return m_startOffset->currentValue()->isRelative() || |
162 SVGTextContentElement::selfHasRelativeLengths(); | 163 SVGTextContentElement::selfHasRelativeLengths(); |
163 } | 164 } |
164 | 165 |
165 } // namespace blink | 166 } // namespace blink |
OLD | NEW |