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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) | 60 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) |
61 DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, Ex
ternalResourcesRequired, externalResourcesRequired) | 61 DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, Ex
ternalResourcesRequired, externalResourcesRequired) |
62 | 62 |
63 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement) | 63 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement) |
64 REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) | 64 REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) |
65 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 65 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
66 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 66 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
67 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 67 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
68 END_REGISTER_ANIMATED_PROPERTIES | 68 END_REGISTER_ANIMATED_PROPERTIES |
69 | 69 |
70 inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document* document
) | 70 inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document& document
) |
71 : SVGGraphicsElement(tagName, document) | 71 : SVGGraphicsElement(tagName, document) |
72 { | 72 { |
73 ASSERT(hasTagName(SVGNames::aTag)); | 73 ASSERT(hasTagName(SVGNames::aTag)); |
74 ScriptWrappable::init(this); | 74 ScriptWrappable::init(this); |
75 registerAnimatedPropertiesForSVGAElement(); | 75 registerAnimatedPropertiesForSVGAElement(); |
76 } | 76 } |
77 | 77 |
78 PassRefPtr<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Docume
nt* document) | 78 PassRefPtr<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Docume
nt& document) |
79 { | 79 { |
80 return adoptRef(new SVGAElement(tagName, document)); | 80 return adoptRef(new SVGAElement(tagName, document)); |
81 } | 81 } |
82 | 82 |
83 String SVGAElement::title() const | 83 String SVGAElement::title() const |
84 { | 84 { |
85 // If the xlink:title is set (non-empty string), use it. | 85 // If the xlink:title is set (non-empty string), use it. |
86 const AtomicString& title = fastGetAttribute(XLinkNames::titleAttr); | 86 const AtomicString& title = fastGetAttribute(XLinkNames::titleAttr); |
87 if (!title.isEmpty()) | 87 if (!title.isEmpty()) |
88 return title; | 88 return title; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // The 'a' element may contain any element that its parent may contain, exce
pt itself. | 233 // The 'a' element may contain any element that its parent may contain, exce
pt itself. |
234 if (childContext.node()->hasTagName(SVGNames::aTag)) | 234 if (childContext.node()->hasTagName(SVGNames::aTag)) |
235 return false; | 235 return false; |
236 if (parentNode() && parentNode()->isSVGElement()) | 236 if (parentNode() && parentNode()->isSVGElement()) |
237 return parentNode()->childShouldCreateRenderer(childContext); | 237 return parentNode()->childShouldCreateRenderer(childContext); |
238 | 238 |
239 return SVGElement::childShouldCreateRenderer(childContext); | 239 return SVGElement::childShouldCreateRenderer(childContext); |
240 } | 240 } |
241 | 241 |
242 } // namespace WebCore | 242 } // namespace WebCore |
OLD | NEW |