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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 void SVGTextPathElement::buildPendingResource() | 117 void SVGTextPathElement::buildPendingResource() |
118 { | 118 { |
119 clearResourceReferences(); | 119 clearResourceReferences(); |
120 if (!inShadowIncludingDocument()) | 120 if (!inShadowIncludingDocument()) |
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 (treeScope().accessSVGTreeScopedResources().isElementPendingResource(
this, id)) |
128 return; | 128 return; |
129 | 129 |
130 if (!id.isEmpty()) { | 130 if (!id.isEmpty()) { |
131 document().accessSVGExtensions().addPendingResource(id, this); | 131 treeScope().accessSVGTreeScopedResources().addPendingResource(id, th
is); |
132 ASSERT(hasPendingResources()); | 132 ASSERT(hasPendingResources()); |
133 } | 133 } |
134 } else if (isSVGPathElement(*target)) { | 134 } else if (isSVGPathElement(*target)) { |
135 // Register us with the target in the dependencies map. Any change of hr
efElement | 135 // Register us with the target in the dependencies map. Any change of hr
efElement |
136 // that leads to relayout/repainting now informs us, so we can react to
it. | 136 // that leads to relayout/repainting now informs us, so we can react to
it. |
137 addReferenceTo(toSVGElement((target))); | 137 addReferenceTo(toSVGElement((target))); |
138 } | 138 } |
139 | 139 |
140 if (LayoutObject* layoutObject = this->layoutObject()) | 140 if (LayoutObject* layoutObject = this->layoutObject()) |
141 markForLayoutAndParentResourceInvalidation(layoutObject); | 141 markForLayoutAndParentResourceInvalidation(layoutObject); |
(...skipping 13 matching lines...) Expand all Loading... |
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 |