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 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); | 128 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); |
129 } | 129 } |
130 | 130 |
131 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) | 131 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) |
132 { | 132 { |
133 return new RenderSVGTextPath(this); | 133 return new RenderSVGTextPath(this); |
134 } | 134 } |
135 | 135 |
136 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) | 136 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) |
137 { | 137 { |
138 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren tNode()))) | 138 if (!parentNode() || !(isSVGAElement(*parentNode()) || isSVGTextElement(*par entNode()))) |
esprehn
2014/06/20 07:58:26
It shouldn't be possible to get in here without a
| |
139 return Element::rendererIsNeeded(style); | 139 return false; |
140 | 140 |
141 return false; | 141 if (!isValid()) |
142 return false; | |
143 return Element::rendererIsNeeded(style); | |
142 } | 144 } |
143 | 145 |
144 void SVGTextPathElement::buildPendingResource() | 146 void SVGTextPathElement::buildPendingResource() |
145 { | 147 { |
146 clearResourceReferences(); | 148 clearResourceReferences(); |
147 if (!inDocument()) | 149 if (!inDocument()) |
148 return; | 150 return; |
149 | 151 |
150 AtomicString id; | 152 AtomicString id; |
151 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); | 153 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); |
(...skipping 27 matching lines...) Expand all Loading... | |
179 clearResourceReferences(); | 181 clearResourceReferences(); |
180 } | 182 } |
181 | 183 |
182 bool SVGTextPathElement::selfHasRelativeLengths() const | 184 bool SVGTextPathElement::selfHasRelativeLengths() const |
183 { | 185 { |
184 return m_startOffset->currentValue()->isRelative() | 186 return m_startOffset->currentValue()->isRelative() |
185 || SVGTextContentElement::selfHasRelativeLengths(); | 187 || SVGTextContentElement::selfHasRelativeLengths(); |
186 } | 188 } |
187 | 189 |
188 } | 190 } |
OLD | NEW |