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 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; | 66 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; |
62 | 67 |
63 virtual bool haveLoadedRequiredResources(); | 68 virtual bool haveLoadedRequiredResources(); |
64 | 69 |
65 virtual bool selfHasRelativeLengths() const; | 70 virtual bool selfHasRelativeLengths() const; |
66 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 71 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
67 | 72 |
| 73 RefPtr<SVGAnimatedLength> m_x; |
| 74 RefPtr<SVGAnimatedLength> m_y; |
| 75 RefPtr<SVGAnimatedLength> m_width; |
| 76 RefPtr<SVGAnimatedLength> m_height; |
68 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement) | 77 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement) |
69 DECLARE_ANIMATED_LENGTH(X, x) | |
70 DECLARE_ANIMATED_LENGTH(Y, y) | |
71 DECLARE_ANIMATED_LENGTH(Width, width) | |
72 DECLARE_ANIMATED_LENGTH(Height, height) | |
73 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 78 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
74 DECLARE_ANIMATED_STRING(Href, href) | 79 DECLARE_ANIMATED_STRING(Href, href) |
75 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | 80 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) |
76 END_DECLARE_ANIMATED_PROPERTIES | 81 END_DECLARE_ANIMATED_PROPERTIES |
77 | 82 |
78 SVGImageLoader m_imageLoader; | 83 SVGImageLoader m_imageLoader; |
79 }; | 84 }; |
80 | 85 |
81 DEFINE_NODE_TYPE_CASTS(SVGImageElement, hasTagName(SVGNames::imageTag)); | 86 DEFINE_NODE_TYPE_CASTS(SVGImageElement, hasTagName(SVGNames::imageTag)); |
82 | 87 |
83 } // namespace WebCore | 88 } // namespace WebCore |
84 | 89 |
85 #endif | 90 #endif |
OLD | NEW |