OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 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 22 matching lines...) Expand all Loading... |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 class SVGImageElement FINAL : public SVGGraphicsElement, | 35 class SVGImageElement FINAL : public SVGGraphicsElement, |
36 public SVGExternalResourcesRequired, | 36 public SVGExternalResourcesRequired, |
37 public SVGURIReference { | 37 public SVGURIReference { |
38 public: | 38 public: |
39 static PassRefPtr<SVGImageElement> create(Document&); | 39 static PassRefPtr<SVGImageElement> create(Document&); |
40 | 40 |
41 bool currentFrameHasSingleSecurityOrigin() const; | 41 bool currentFrameHasSingleSecurityOrigin() const; |
42 | 42 |
| 43 SVGAnimatedLength* x() const { return m_x.get(); } |
| 44 SVGAnimatedLength* y() const { return m_y.get(); } |
| 45 SVGAnimatedLength* width() const { return m_width.get(); } |
| 46 SVGAnimatedLength* height() const { return m_height.get(); } |
| 47 |
43 private: | 48 private: |
44 explicit SVGImageElement(Document&); | 49 explicit SVGImageElement(Document&); |
45 | 50 |
46 virtual bool isValid() const { return SVGTests::isValid(); } | 51 virtual bool isValid() const { return SVGTests::isValid(); } |
47 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } | 52 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } |
48 | 53 |
49 bool isSupportedAttribute(const QualifiedName&); | 54 bool isSupportedAttribute(const QualifiedName&); |
50 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 55 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
51 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 56 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
52 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 57 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
53 virtual void svgAttributeChanged(const QualifiedName&); | 58 virtual void svgAttributeChanged(const QualifiedName&); |
54 | 59 |
55 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 60 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
56 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 61 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
57 | 62 |
58 virtual RenderObject* createRenderer(RenderStyle*); | 63 virtual RenderObject* createRenderer(RenderStyle*); |
59 | 64 |
60 virtual const AtomicString imageSourceURL() const OVERRIDE; | 65 virtual const AtomicString imageSourceURL() const OVERRIDE; |
61 | 66 |
62 virtual bool haveLoadedRequiredResources(); | 67 virtual bool haveLoadedRequiredResources(); |
63 | 68 |
64 virtual bool selfHasRelativeLengths() const; | 69 virtual bool selfHasRelativeLengths() const; |
65 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 70 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
66 | 71 |
| 72 RefPtr<SVGAnimatedLength> m_x; |
| 73 RefPtr<SVGAnimatedLength> m_y; |
| 74 RefPtr<SVGAnimatedLength> m_width; |
| 75 RefPtr<SVGAnimatedLength> m_height; |
67 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement) | 76 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement) |
68 DECLARE_ANIMATED_LENGTH(X, x) | |
69 DECLARE_ANIMATED_LENGTH(Y, y) | |
70 DECLARE_ANIMATED_LENGTH(Width, width) | |
71 DECLARE_ANIMATED_LENGTH(Height, height) | |
72 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 77 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
73 DECLARE_ANIMATED_STRING(Href, href) | 78 DECLARE_ANIMATED_STRING(Href, href) |
74 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | 79 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) |
75 END_DECLARE_ANIMATED_PROPERTIES | 80 END_DECLARE_ANIMATED_PROPERTIES |
76 | 81 |
77 SVGImageLoader m_imageLoader; | 82 SVGImageLoader m_imageLoader; |
78 }; | 83 }; |
79 | 84 |
80 DEFINE_NODE_TYPE_CASTS(SVGImageElement, hasTagName(SVGNames::imageTag)); | 85 DEFINE_NODE_TYPE_CASTS(SVGImageElement, hasTagName(SVGNames::imageTag)); |
81 | 86 |
82 } // namespace WebCore | 87 } // namespace WebCore |
83 | 88 |
84 #endif | 89 #endif |
OLD | NEW |