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