Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: Source/core/svg/SVGTSpanElement.cpp

Issue 343443003: Remove SVGElement::rendererIsNeeded (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add remaining rendererIsNeeded changes Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2010 Rob Buis <buis@kde.org>
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 24 matching lines...) Expand all
35 35
36 DEFINE_NODE_FACTORY(SVGTSpanElement) 36 DEFINE_NODE_FACTORY(SVGTSpanElement)
37 37
38 RenderObject* SVGTSpanElement::createRenderer(RenderStyle*) 38 RenderObject* SVGTSpanElement::createRenderer(RenderStyle*)
39 { 39 {
40 return new RenderSVGTSpan(this); 40 return new RenderSVGTSpan(this);
41 } 41 }
42 42
43 bool SVGTSpanElement::rendererIsNeeded(const RenderStyle& style) 43 bool SVGTSpanElement::rendererIsNeeded(const RenderStyle& style)
44 { 44 {
45 if (parentNode() 45 if (Node* parent = parentNode()) {
46 && (isSVGAElement(*parentNode()) 46 if ((isSVGAElement(*parent)
47 #if ENABLE(SVG_FONTS) 47 #if ENABLE(SVG_FONTS)
48 || isSVGAltGlyphElement(*parentNode()) 48 || isSVGAltGlyphElement(*parent)
49 #endif 49 #endif
50 || isSVGTextElement(*parentNode()) 50 || isSVGTextElement(*parent)
51 || isSVGTextPathElement(*parentNode()) 51 || isSVGTextPathElement(*parent)
52 || isSVGTSpanElement(*parentNode()))) 52 || isSVGTSpanElement(*parent)) && isValid())
53 return Element::rendererIsNeeded(style); 53 return Element::rendererIsNeeded(style);
esprehn 2014/06/17 23:09:40 Remove all the extra parens, instead do: return i
54 }
54 55
55 return false; 56 return false;
56 } 57 }
57 58
58 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698