Chromium Code Reviews| Index: Source/core/svg/SVGTSpanElement.cpp |
| diff --git a/Source/core/svg/SVGTSpanElement.cpp b/Source/core/svg/SVGTSpanElement.cpp |
| index 080ca5a66f7cc85ef4e8de51ea9f38189342e24b..66518a511bdd6aafa6284f0c8f74d47d38b1a147 100644 |
| --- a/Source/core/svg/SVGTSpanElement.cpp |
| +++ b/Source/core/svg/SVGTSpanElement.cpp |
| @@ -42,15 +42,16 @@ RenderObject* SVGTSpanElement::createRenderer(RenderStyle*) |
| bool SVGTSpanElement::rendererIsNeeded(const RenderStyle& style) |
| { |
| - if (parentNode() |
| - && (isSVGAElement(*parentNode()) |
| + if (Node* parent = parentNode()) { |
| + if ((isSVGAElement(*parent) |
| #if ENABLE(SVG_FONTS) |
| - || isSVGAltGlyphElement(*parentNode()) |
| + || isSVGAltGlyphElement(*parent) |
| #endif |
| - || isSVGTextElement(*parentNode()) |
| - || isSVGTextPathElement(*parentNode()) |
| - || isSVGTSpanElement(*parentNode()))) |
| + || isSVGTextElement(*parent) |
| + || isSVGTextPathElement(*parent) |
| + || isSVGTSpanElement(*parent)) && isValid()) |
| return Element::rendererIsNeeded(style); |
|
esprehn
2014/06/17 23:09:40
Remove all the extra parens, instead do:
return i
|
| + } |
| return false; |
| } |