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

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

Issue 343443003: Remove SVGElement::rendererIsNeeded (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove accidently squashed patch 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, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 } 169 }
170 170
171 bool SVGElement::rendererIsNeeded(const RenderStyle& style) 171 bool SVGElement::rendererIsNeeded(const RenderStyle& style)
172 { 172 {
173 // http://www.w3.org/TR/SVG/extend.html#PrivateData 173 // http://www.w3.org/TR/SVG/extend.html#PrivateData
174 // Prevent anything other than SVG renderers from appearing in our render tr ee 174 // Prevent anything other than SVG renderers from appearing in our render tr ee
175 // Spec: SVG allows inclusion of elements from foreign namespaces anywhere 175 // Spec: SVG allows inclusion of elements from foreign namespaces anywhere
176 // with the SVG content. In general, the SVG user agent will include the unk nown 176 // with the SVG content. In general, the SVG user agent will include the unk nown
177 // elements in the DOM but will otherwise ignore unknown elements. 177 // elements in the DOM but will otherwise ignore unknown elements.
178 if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElemen t()) 178 if (parentOrShadowHostElement() && !parentOrShadowHostElement()->isSVGElemen t())
pdr. 2014/06/19 21:33:48 Won't this create renderers for elements without a
179 return Element::rendererIsNeeded(style); 179 return false;
180 180
181 return false; 181 if (!isValid())
182 return false;
183
184 return Element::rendererIsNeeded(style);
182 } 185 }
183 186
184 SVGElementRareData* SVGElement::ensureSVGRareData() 187 SVGElementRareData* SVGElement::ensureSVGRareData()
185 { 188 {
186 if (hasSVGRareData()) 189 if (hasSVGRareData())
187 return svgRareData(); 190 return svgRareData();
188 191
189 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); 192 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this));
190 return m_SVGRareData.get(); 193 return m_SVGRareData.get();
191 } 194 }
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 Element::trace(visitor); 1179 Element::trace(visitor);
1177 } 1180 }
1178 1181
1179 const AtomicString& SVGElement::eventParameterName() 1182 const AtomicString& SVGElement::eventParameterName()
1180 { 1183 {
1181 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1184 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1182 return evtString; 1185 return evtString;
1183 } 1186 }
1184 1187
1185 } 1188 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698