| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 String SVGElement::title() const | 230 String SVGElement::title() const |
| 231 { | 231 { |
| 232 // According to spec, we should not return titles when hovering over root <s
vg> elements (those | 232 // According to spec, we should not return titles when hovering over root <s
vg> elements (those |
| 233 // <title> elements are the title of the document, not a tooltip) so we inst
antly return. | 233 // <title> elements are the title of the document, not a tooltip) so we inst
antly return. |
| 234 if (isOutermostSVGSVGElement()) | 234 if (isOutermostSVGSVGElement()) |
| 235 return String(); | 235 return String(); |
| 236 | 236 |
| 237 // Walk up the tree, to find out whether we're inside a <use> shadow tree, t
o find the right title. | 237 // Walk up the tree, to find out whether we're inside a <use> shadow tree, t
o find the right title. |
| 238 if (isInShadowTree()) { | 238 if (isInShadowTree()) { |
| 239 Element* shadowHostElement = toShadowRoot(treeScope().rootNode())->host(
); | 239 Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host
(); |
| 240 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so
any shadow root we do | 240 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so
any shadow root we do |
| 241 // have should be a use. The assert and following test is here to catch
future shadow DOM changes | 241 // have should be a use. The assert and following test is here to catch
future shadow DOM changes |
| 242 // that do enable SVG in a shadow tree. | 242 // that do enable SVG in a shadow tree. |
| 243 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::use
Tag)); | 243 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::use
Tag)); |
| 244 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)
) { | 244 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)
) { |
| 245 SVGUseElement* useElement = toSVGUseElement(shadowHostElement); | 245 SVGUseElement* useElement = toSVGUseElement(shadowHostElement); |
| 246 | 246 |
| 247 // If the <use> title is not empty we found the title to use. | 247 // If the <use> title is not empty we found the title to use. |
| 248 String useTitle(useElement->title()); | 248 String useTitle(useElement->title()); |
| 249 if (!useTitle.isEmpty()) | 249 if (!useTitle.isEmpty()) |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 if (name == classAttr) | 1137 if (name == classAttr) |
| 1138 return true; | 1138 return true; |
| 1139 | 1139 |
| 1140 return animatableAttributes.contains(name); | 1140 return animatableAttributes.contains(name); |
| 1141 } | 1141 } |
| 1142 #endif | 1142 #endif |
| 1143 | 1143 |
| 1144 } | 1144 } |
| OLD | NEW |