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, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 return String(); | 83 return String(); |
84 | 84 |
85 // Walk up the tree, to find out whether we're inside a <use> shadow tree, t
o find the right title. | 85 // Walk up the tree, to find out whether we're inside a <use> shadow tree, t
o find the right title. |
86 if (isInShadowTree()) { | 86 if (isInShadowTree()) { |
87 Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host
(); | 87 Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host
(); |
88 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so
any shadow root we do | 88 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so
any shadow root we do |
89 // have should be a use. The assert and following test is here to catch
future shadow DOM changes | 89 // have should be a use. The assert and following test is here to catch
future shadow DOM changes |
90 // that do enable SVG in a shadow tree. | 90 // that do enable SVG in a shadow tree. |
91 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::use
Tag)); | 91 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::use
Tag)); |
92 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)
) { | 92 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)
) { |
93 SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowHostEl
ement); | 93 SVGUseElement* useElement = toSVGUseElement(shadowHostElement); |
94 | 94 |
95 // If the <use> title is not empty we found the title to use. | 95 // If the <use> title is not empty we found the title to use. |
96 String useTitle(useElement->title()); | 96 String useTitle(useElement->title()); |
97 if (!useTitle.isEmpty()) | 97 if (!useTitle.isEmpty()) |
98 return useTitle; | 98 return useTitle; |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 // If we aren't an instance in a <use> or the <use> title was not found, the
n find the first | 102 // If we aren't an instance in a <use> or the <use> title was not found, the
n find the first |
103 // <title> child of this element. | 103 // <title> child of this element. |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 Element* eventTarget = const_cast<SVGStyledElement *>(this); | 476 Element* eventTarget = const_cast<SVGStyledElement *>(this); |
477 return eventTarget->hasEventListeners(eventNames().focusinEvent) || eventTar
get->hasEventListeners(eventNames().focusoutEvent); | 477 return eventTarget->hasEventListeners(eventNames().focusinEvent) || eventTar
get->hasEventListeners(eventNames().focusoutEvent); |
478 } | 478 } |
479 | 479 |
480 bool SVGStyledElement::isKeyboardFocusable(KeyboardEvent*) const | 480 bool SVGStyledElement::isKeyboardFocusable(KeyboardEvent*) const |
481 { | 481 { |
482 return isMouseFocusable(); | 482 return isMouseFocusable(); |
483 } | 483 } |
484 | 484 |
485 } | 485 } |
OLD | NEW |