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

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: Different approach 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
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // that would stamp out DOM. 158 // that would stamp out DOM.
159 if (isSVGUseElement(clientElement)) 159 if (isSVGUseElement(clientElement))
160 toSVGUseElement(clientElement)->invalidateShadowTree(); 160 toSVGUseElement(clientElement)->invalidateShadowTree();
161 else 161 else
162 clientElement->buildPendingResource(); 162 clientElement->buildPendingResource();
163 extensions.clearHasPendingResourcesIfPossible(clientElement); 163 extensions.clearHasPendingResourcesIfPossible(clientElement);
164 } 164 }
165 } 165 }
166 } 166 }
167 167
168 bool SVGElement::rendererIsNeeded(const RenderStyle& style)
169 {
170 // http://www.w3.org/TR/SVG/extend.html#PrivateData
171 // Prevent anything other than SVG renderers from appearing in our render tr ee
172 // Spec: SVG allows inclusion of elements from foreign namespaces anywhere
173 // with the SVG content. In general, the SVG user agent will include the unk nown
174 // elements in the DOM but will otherwise ignore unknown elements.
175 if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElemen t())
176 return Element::rendererIsNeeded(style);
177
178 return false;
179 }
180
181 SVGElementRareData* SVGElement::ensureSVGRareData() 168 SVGElementRareData* SVGElement::ensureSVGRareData()
182 { 169 {
183 if (hasSVGRareData()) 170 if (hasSVGRareData())
184 return svgRareData(); 171 return svgRareData();
185 172
186 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); 173 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this));
187 return m_SVGRareData.get(); 174 return m_SVGRareData.get();
188 } 175 }
189 176
190 bool SVGElement::isOutermostSVGSVGElement() const 177 bool SVGElement::isOutermostSVGSVGElement() const
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 Element::trace(visitor); 1159 Element::trace(visitor);
1173 } 1160 }
1174 1161
1175 const AtomicString& SVGElement::eventParameterName() 1162 const AtomicString& SVGElement::eventParameterName()
1176 { 1163 {
1177 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1164 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1178 return evtString; 1165 return evtString;
1179 } 1166 }
1180 1167
1181 } 1168 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698