diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebCore/svg/SVGAElement.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebCore/svg/SVGAElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGAElement.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Source/WebCore/svg/SVGAElement.cpp b/Source/WebCore/svg/SVGAElement.cpp index 5bfdf5102..148f05dfe 100644 --- a/Source/WebCore/svg/SVGAElement.cpp +++ b/Source/WebCore/svg/SVGAElement.cpp @@ -50,21 +50,22 @@ namespace WebCore { +using namespace HTMLNames; + // Animated property definitions DEFINE_ANIMATED_STRING(SVGAElement, SVGNames::targetAttr, SVGTarget, svgTarget) DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement) - REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) - REGISTER_LOCAL_ANIMATED_PROPERTY(href) - REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) - REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledTransformableElement) - REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) + REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) + REGISTER_LOCAL_ANIMATED_PROPERTY(href) + REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) + REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) END_REGISTER_ANIMATED_PROPERTIES inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document* document) - : SVGStyledTransformableElement(tagName, document) + : SVGGraphicsElement(tagName, document) { ASSERT(hasTagName(SVGNames::aTag)); registerAnimatedPropertiesForSVGAElement(); @@ -91,18 +92,17 @@ bool SVGAElement::isSupportedAttribute(const QualifiedName& attrName) DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); if (supportedAttributes.isEmpty()) { SVGURIReference::addSupportedAttributes(supportedAttributes); - SVGTests::addSupportedAttributes(supportedAttributes); SVGLangSpace::addSupportedAttributes(supportedAttributes); SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); supportedAttributes.add(SVGNames::targetAttr); } - return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName); + return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); } void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (!isSupportedAttribute(name)) { - SVGStyledTransformableElement::parseAttribute(name, value); + SVGGraphicsElement::parseAttribute(name, value); return; } @@ -113,8 +113,6 @@ void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& if (SVGURIReference::parseAttribute(name, value)) return; - if (SVGTests::parseAttribute(name, value)) - return; if (SVGLangSpace::parseAttribute(name, value)) return; if (SVGExternalResourcesRequired::parseAttribute(name, value)) @@ -126,7 +124,7 @@ void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) { if (!isSupportedAttribute(attrName)) { - SVGStyledTransformableElement::svgAttributeChanged(attrName); + SVGGraphicsElement::svgAttributeChanged(attrName); return; } @@ -145,7 +143,7 @@ void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) RenderObject* SVGAElement::createRenderer(RenderArena* arena, RenderStyle*) { - if (parentNode() && parentNode()->isSVGElement() && static_cast<SVGElement*>(parentNode())->isTextContent()) + if (parentNode() && parentNode()->isSVGElement() && toSVGElement(parentNode())->isTextContent()) return new (arena) RenderSVGInline(this); return new (arena) RenderSVGTransformableContainer(this); @@ -188,13 +186,13 @@ void SVGAElement::defaultEventHandler(Event* event) } } - SVGStyledTransformableElement::defaultEventHandler(event); + SVGGraphicsElement::defaultEventHandler(event); } bool SVGAElement::supportsFocus() const { if (rendererIsEditable()) - return SVGStyledTransformableElement::supportsFocus(); + return SVGGraphicsElement::supportsFocus(); return true; } @@ -206,6 +204,11 @@ bool SVGAElement::isFocusable() const return SVGElement::isFocusable(); } +bool SVGAElement::isURLAttribute(const Attribute& attribute) const +{ + return attribute.name().localName() == hrefAttr || SVGGraphicsElement::isURLAttribute(attribute); +} + bool SVGAElement::isMouseFocusable() const { return false; |