| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef SVGImageElement_h | 21 #ifndef SVGImageElement_h |
| 22 #define SVGImageElement_h | 22 #define SVGImageElement_h |
| 23 | 23 |
| 24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
| 25 #include "core/html/canvas/CanvasImageElementSource.h" |
| 25 #include "core/svg/SVGAnimatedLength.h" | 26 #include "core/svg/SVGAnimatedLength.h" |
| 26 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" | 27 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" |
| 27 #include "core/svg/SVGGraphicsElement.h" | 28 #include "core/svg/SVGGraphicsElement.h" |
| 28 #include "core/svg/SVGImageLoader.h" | 29 #include "core/svg/SVGImageLoader.h" |
| 29 #include "core/svg/SVGURIReference.h" | 30 #include "core/svg/SVGURIReference.h" |
| 30 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 | 34 |
| 34 class SVGImageElement final : public SVGGraphicsElement, | 35 class CORE_EXPORT SVGImageElement final : public SVGGraphicsElement, |
| 35 public SVGURIReference { | 36 public CanvasImageElementSource, |
| 37 public SVGURIReference { |
| 36 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
| 37 USING_GARBAGE_COLLECTED_MIXIN(SVGImageElement); | 39 USING_GARBAGE_COLLECTED_MIXIN(SVGImageElement); |
| 38 | 40 |
| 39 public: | 41 public: |
| 40 DECLARE_NODE_FACTORY(SVGImageElement); | 42 DECLARE_NODE_FACTORY(SVGImageElement); |
| 41 DECLARE_VIRTUAL_TRACE(); | 43 DECLARE_VIRTUAL_TRACE(); |
| 42 | 44 |
| 43 bool currentFrameHasSingleSecurityOrigin() const; | 45 bool currentFrameHasSingleSecurityOrigin() const; |
| 44 | 46 |
| 45 SVGAnimatedLength* x() const { return m_x.get(); } | 47 SVGAnimatedLength* x() const { return m_x.get(); } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 70 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 72 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 71 | 73 |
| 72 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 74 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 73 | 75 |
| 74 const AtomicString imageSourceURL() const override; | 76 const AtomicString imageSourceURL() const override; |
| 75 | 77 |
| 76 bool haveLoadedRequiredResources() override; | 78 bool haveLoadedRequiredResources() override; |
| 77 | 79 |
| 78 bool selfHasRelativeLengths() const override; | 80 bool selfHasRelativeLengths() const override; |
| 79 void didMoveToNewDocument(Document& oldDocument) override; | 81 void didMoveToNewDocument(Document& oldDocument) override; |
| 80 SVGImageLoader& imageLoader() const { return *m_imageLoader; } | 82 SVGImageLoader& imageLoader() const override { return *m_imageLoader; } |
| 83 FloatSize sourceDefaultObjectSize() override; |
| 81 | 84 |
| 82 Member<SVGAnimatedLength> m_x; | 85 Member<SVGAnimatedLength> m_x; |
| 83 Member<SVGAnimatedLength> m_y; | 86 Member<SVGAnimatedLength> m_y; |
| 84 Member<SVGAnimatedLength> m_width; | 87 Member<SVGAnimatedLength> m_width; |
| 85 Member<SVGAnimatedLength> m_height; | 88 Member<SVGAnimatedLength> m_height; |
| 86 Member<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | 89 Member<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; |
| 87 | 90 |
| 88 Member<SVGImageLoader> m_imageLoader; | 91 Member<SVGImageLoader> m_imageLoader; |
| 89 bool m_needsLoaderURIUpdate : 1; | 92 bool m_needsLoaderURIUpdate : 1; |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 } // namespace blink | 95 } // namespace blink |
| 93 | 96 |
| 94 #endif // SVGImageElement_h | 97 #endif // SVGImageElement_h |
| OLD | NEW |