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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 void SVGElement::setCorrespondingElement(SVGElement* correspondingElement) | 572 void SVGElement::setCorrespondingElement(SVGElement* correspondingElement) |
573 { | 573 { |
574 ensureSVGRareData()->setCorrespondingElement(correspondingElement); | 574 ensureSVGRareData()->setCorrespondingElement(correspondingElement); |
575 } | 575 } |
576 | 576 |
577 bool SVGElement::inUseShadowTree() const | 577 bool SVGElement::inUseShadowTree() const |
578 { | 578 { |
579 return correspondingUseElement(); | 579 return correspondingUseElement(); |
580 } | 580 } |
581 | 581 |
582 bool SVGElement::supportsSpatialNavigationFocus() const | |
583 { | |
584 // This function checks whether the element satisfies the extended criteria | |
585 // for the element to be focusable, introduced by spatial navigation feature
, | |
586 // i.e. checks if click or keyboard event handler is specified. | |
587 // This is the way to make it possible to navigate to (focus) elements | |
588 // which web designer meant for being active (made them respond to click eve
nts). | |
589 | |
590 if (!document().settings() || !document().settings()->spatialNavigationEnabl
ed()) | |
591 return false; | |
592 return hasEventListeners(EventTypeNames::click) | |
593 || hasEventListeners(EventTypeNames::keydown) | |
594 || hasEventListeners(EventTypeNames::keypress) | |
595 || hasEventListeners(EventTypeNames::keyup) | |
596 || hasEventListeners(EventTypeNames::focus) | |
597 || hasEventListeners(EventTypeNames::blur) | |
598 || hasEventListeners(EventTypeNames::focusin) | |
599 || hasEventListeners(EventTypeNames::focusout); | |
600 } | |
601 | |
602 void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& v
alue) | 582 void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& v
alue) |
603 { | 583 { |
604 if (name == HTMLNames::classAttr) { | 584 if (name == HTMLNames::classAttr) { |
605 // SVG animation has currently requires special storage of values so we
set | 585 // SVG animation has currently requires special storage of values so we
set |
606 // the className here. svgAttributeChanged actually causes the resulting | 586 // the className here. svgAttributeChanged actually causes the resulting |
607 // style updates (instead of Element::parseAttribute). We don't | 587 // style updates (instead of Element::parseAttribute). We don't |
608 // tell Element about the change to avoid parsing the class list twice | 588 // tell Element about the change to avoid parsing the class list twice |
609 SVGParsingError parseError = NoError; | 589 SVGParsingError parseError = NoError; |
610 m_className->setBaseValueAsString(value, parseError); | 590 m_className->setBaseValueAsString(value, parseError); |
611 reportAttributeParsingError(parseError, name, value); | 591 reportAttributeParsingError(parseError, name, value); |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 Element::trace(visitor); | 1164 Element::trace(visitor); |
1185 } | 1165 } |
1186 | 1166 |
1187 const AtomicString& SVGElement::eventParameterName() | 1167 const AtomicString& SVGElement::eventParameterName() |
1188 { | 1168 { |
1189 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); | 1169 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); |
1190 return evtString; | 1170 return evtString; |
1191 } | 1171 } |
1192 | 1172 |
1193 } | 1173 } |
OLD | NEW |