Chromium Code Reviews| 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(*paren tNode())) && isValid()) |
|
esprehn
2014/06/17 23:09:41
Use separate if statements and early returns.
if
| |
| 139 return Element::rendererIsNeeded(style); | 139 return Element::rendererIsNeeded(style); |
| 140 | 140 |
| 141 return false; | 141 return false; |
| 142 } | 142 } |
| 143 | 143 |
| 144 void SVGTextPathElement::buildPendingResource() | 144 void SVGTextPathElement::buildPendingResource() |
| 145 { | 145 { |
| 146 clearResourceReferences(); | 146 clearResourceReferences(); |
| 147 if (!inDocument()) | 147 if (!inDocument()) |
| 148 return; | 148 return; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 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 |