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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 | 123 |
124 bool SVGElement::isOutermostSVGSVGElement() const | 124 bool SVGElement::isOutermostSVGSVGElement() const |
125 { | 125 { |
126 if (!hasTagName(SVGNames::svgTag)) | 126 if (!hasTagName(SVGNames::svgTag)) |
127 return false; | 127 return false; |
128 | 128 |
129 // If we're living in a shadow tree, we're a <svg> element that got created
as replacement | 129 // If we're living in a shadow tree, we're a <svg> element that got created
as replacement |
130 // for a <symbol> element or a cloned <svg> element in the referenced tree.
In that case | 130 // for a <symbol> element or a cloned <svg> element in the referenced tree.
In that case |
131 // we're always an inner <svg> element. | 131 // we're always an inner <svg> element. |
132 if (isInShadowTree()) | 132 if (isInShadowTree() && parentOrHostElement() && parentOrHostElement()->isSV
GElement()) |
133 return false; | 133 return false; |
134 | 134 |
135 // Element may not be in the document, pretend we're outermost for viewport(
), getCTM(), etc. | 135 // Element may not be in the document, pretend we're outermost for viewport(
), getCTM(), etc. |
136 if (!parentNode()) | 136 if (!parentNode()) |
137 return true; | 137 return true; |
138 | 138 |
139 // We act like an outermost SVG element, if we're a direct child of a <forei
gnObject> element. | 139 // We act like an outermost SVG element, if we're a direct child of a <forei
gnObject> element. |
140 if (parentNode()->hasTagName(SVGNames::foreignObjectTag)) | 140 if (parentNode()->hasTagName(SVGNames::foreignObjectTag)) |
141 return true; | 141 return true; |
142 | 142 |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 animatableAttributes.add(SVGNames::yChannelSelectorAttr); | 637 animatableAttributes.add(SVGNames::yChannelSelectorAttr); |
638 animatableAttributes.add(SVGNames::zAttr); | 638 animatableAttributes.add(SVGNames::zAttr); |
639 } | 639 } |
640 return animatableAttributes.contains(name); | 640 return animatableAttributes.contains(name); |
641 } | 641 } |
642 #endif | 642 #endif |
643 | 643 |
644 } | 644 } |
645 | 645 |
646 #endif // ENABLE(SVG) | 646 #endif // ENABLE(SVG) |
OLD | NEW |