OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2010 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) | 59 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) |
60 DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, Ex
ternalResourcesRequired, externalResourcesRequired) | 60 DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, Ex
ternalResourcesRequired, externalResourcesRequired) |
61 | 61 |
62 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement) | 62 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement) |
63 REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) | 63 REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) |
64 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 64 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
65 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 65 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
66 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 66 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
67 END_REGISTER_ANIMATED_PROPERTIES | 67 END_REGISTER_ANIMATED_PROPERTIES |
68 | 68 |
69 inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document& document
) | 69 inline SVGAElement::SVGAElement(Document& document) |
70 : SVGGraphicsElement(tagName, document) | 70 : SVGGraphicsElement(SVGNames::aTag, document) |
71 { | 71 { |
72 ASSERT(hasTagName(SVGNames::aTag)); | |
73 ScriptWrappable::init(this); | 72 ScriptWrappable::init(this); |
74 registerAnimatedPropertiesForSVGAElement(); | 73 registerAnimatedPropertiesForSVGAElement(); |
75 } | 74 } |
76 | 75 |
77 PassRefPtr<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Docume
nt& document) | 76 PassRefPtr<SVGAElement> SVGAElement::create(Document& document) |
78 { | 77 { |
79 return adoptRef(new SVGAElement(tagName, document)); | 78 return adoptRef(new SVGAElement(document)); |
80 } | 79 } |
81 | 80 |
82 String SVGAElement::title() const | 81 String SVGAElement::title() const |
83 { | 82 { |
84 // If the xlink:title is set (non-empty string), use it. | 83 // If the xlink:title is set (non-empty string), use it. |
85 const AtomicString& title = fastGetAttribute(XLinkNames::titleAttr); | 84 const AtomicString& title = fastGetAttribute(XLinkNames::titleAttr); |
86 if (!title.isEmpty()) | 85 if (!title.isEmpty()) |
87 return title; | 86 return title; |
88 | 87 |
89 // Otherwise, use the title of this element. | 88 // Otherwise, use the title of this element. |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // The 'a' element may contain any element that its parent may contain, exce
pt itself. | 231 // The 'a' element may contain any element that its parent may contain, exce
pt itself. |
233 if (child.hasTagName(SVGNames::aTag)) | 232 if (child.hasTagName(SVGNames::aTag)) |
234 return false; | 233 return false; |
235 if (parentNode() && parentNode()->isSVGElement()) | 234 if (parentNode() && parentNode()->isSVGElement()) |
236 return parentNode()->childShouldCreateRenderer(child); | 235 return parentNode()->childShouldCreateRenderer(child); |
237 | 236 |
238 return SVGElement::childShouldCreateRenderer(child); | 237 return SVGElement::childShouldCreateRenderer(child); |
239 } | 238 } |
240 | 239 |
241 } // namespace WebCore | 240 } // namespace WebCore |
OLD | NEW |