Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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()->isSVGEleme nt()) || !isValid()) |
|
esprehn
2014/06/17 23:09:40
Put these in separate if statements.
if (parentOr
| |
| 179 return Element::rendererIsNeeded(style); | 179 return false; |
| 180 | 180 |
| 181 return false; | 181 return Element::rendererIsNeeded(style); |
| 182 } | 182 } |
| 183 | 183 |
| 184 SVGElementRareData* SVGElement::ensureSVGRareData() | 184 SVGElementRareData* SVGElement::ensureSVGRareData() |
| 185 { | 185 { |
| 186 if (hasSVGRareData()) | 186 if (hasSVGRareData()) |
| 187 return svgRareData(); | 187 return svgRareData(); |
| 188 | 188 |
| 189 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); | 189 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); |
| 190 return m_SVGRareData.get(); | 190 return m_SVGRareData.get(); |
| 191 } | 191 } |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1176 Element::trace(visitor); | 1176 Element::trace(visitor); |
| 1177 } | 1177 } |
| 1178 | 1178 |
| 1179 const AtomicString& SVGElement::eventParameterName() | 1179 const AtomicString& SVGElement::eventParameterName() |
| 1180 { | 1180 { |
| 1181 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); | 1181 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); |
| 1182 return evtString; | 1182 return evtString; |
| 1183 } | 1183 } |
| 1184 | 1184 |
| 1185 } | 1185 } |
| OLD | NEW |