| 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 25 matching lines...) Expand all Loading... |
| 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(); } | 41 SVGAnimatedLength* x() const { return m_x.get(); } |
| 42 SVGAnimatedLength* y() const { return m_y.get(); } | 42 SVGAnimatedLength* y() const { return m_y.get(); } |
| 43 SVGAnimatedLength* width() const { return m_width.get(); } | 43 SVGAnimatedLength* width() const { return m_width.get(); } |
| 44 SVGAnimatedLength* height() const { return m_height.get(); } | 44 SVGAnimatedLength* height() const { return m_height.get(); } |
| 45 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAsp
ectRatio.get(); } | 45 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAsp
ectRatio.get(); } |
| 46 SVGAnimatedString* href() { return m_href.get(); } |
| 47 const SVGAnimatedString* href() const { return m_href.get(); } |
| 46 | 48 |
| 47 private: | 49 private: |
| 48 explicit SVGImageElement(Document&); | 50 explicit SVGImageElement(Document&); |
| 49 | 51 |
| 50 virtual bool isStructurallyExternal() const OVERRIDE { return !hrefCurrentVa
lue().isNull(); } | 52 virtual bool isStructurallyExternal() const OVERRIDE { return !href()->curre
ntValue()->value().isNull(); } |
| 51 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } | 53 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } |
| 52 | 54 |
| 53 bool isSupportedAttribute(const QualifiedName&); | 55 bool isSupportedAttribute(const QualifiedName&); |
| 54 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 56 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 55 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 57 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
| 56 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 58 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
| 57 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 59 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
| 58 | 60 |
| 59 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 61 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
| 60 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 62 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
| 61 | 63 |
| 62 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 64 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
| 63 | 65 |
| 64 virtual const AtomicString imageSourceURL() const OVERRIDE; | 66 virtual const AtomicString imageSourceURL() const OVERRIDE; |
| 65 | 67 |
| 66 virtual bool haveLoadedRequiredResources() OVERRIDE; | 68 virtual bool haveLoadedRequiredResources() OVERRIDE; |
| 67 | 69 |
| 68 virtual bool selfHasRelativeLengths() const OVERRIDE; | 70 virtual bool selfHasRelativeLengths() const OVERRIDE; |
| 69 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 71 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
| 70 | 72 |
| 71 RefPtr<SVGAnimatedLength> m_x; | 73 RefPtr<SVGAnimatedLength> m_x; |
| 72 RefPtr<SVGAnimatedLength> m_y; | 74 RefPtr<SVGAnimatedLength> m_y; |
| 73 RefPtr<SVGAnimatedLength> m_width; | 75 RefPtr<SVGAnimatedLength> m_width; |
| 74 RefPtr<SVGAnimatedLength> m_height; | 76 RefPtr<SVGAnimatedLength> m_height; |
| 75 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | 77 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; |
| 78 RefPtr<SVGAnimatedString> m_href; |
| 76 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement) | 79 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGImageElement) |
| 77 DECLARE_ANIMATED_STRING(Href, href) | |
| 78 END_DECLARE_ANIMATED_PROPERTIES | 80 END_DECLARE_ANIMATED_PROPERTIES |
| 79 | 81 |
| 80 SVGImageLoader m_imageLoader; | 82 SVGImageLoader m_imageLoader; |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 DEFINE_NODE_TYPE_CASTS(SVGImageElement, hasTagName(SVGNames::imageTag)); | 85 DEFINE_NODE_TYPE_CASTS(SVGImageElement, hasTagName(SVGNames::imageTag)); |
| 84 | 86 |
| 85 } // namespace WebCore | 87 } // namespace WebCore |
| 86 | 88 |
| 87 #endif | 89 #endif |
| OLD | NEW |