OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> | 4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "core/dom/Document.h" | 27 #include "core/dom/Document.h" |
28 #include "core/fetch/FetchRequest.h" | 28 #include "core/fetch/FetchRequest.h" |
29 #include "core/fetch/ResourceFetcher.h" | 29 #include "core/fetch/ResourceFetcher.h" |
30 #include "core/rendering/svg/RenderSVGResource.h" | 30 #include "core/rendering/svg/RenderSVGResource.h" |
31 #include "core/svg/SVGElementInstance.h" | 31 #include "core/svg/SVGElementInstance.h" |
32 #include "core/svg/SVGPreserveAspectRatio.h" | 32 #include "core/svg/SVGPreserveAspectRatio.h" |
33 #include "platform/graphics/Image.h" | 33 #include "platform/graphics/Image.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 // Animated property definitions | |
38 | |
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEImageElement) | |
40 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
41 END_REGISTER_ANIMATED_PROPERTIES | |
42 | |
43 inline SVGFEImageElement::SVGFEImageElement(Document& document) | 37 inline SVGFEImageElement::SVGFEImageElement(Document& document) |
44 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document) | 38 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document) |
45 , SVGURIReference(this) | 39 , SVGURIReference(this) |
46 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) | 40 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
47 { | 41 { |
48 ScriptWrappable::init(this); | 42 ScriptWrappable::init(this); |
49 addToPropertyMap(m_preserveAspectRatio); | 43 addToPropertyMap(m_preserveAspectRatio); |
50 } | 44 } |
51 | 45 |
52 PassRefPtr<SVGFEImageElement> SVGFEImageElement::create(Document& document) | 46 PassRefPtr<SVGFEImageElement> SVGFEImageElement::create(Document& document) |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 185 } |
192 | 186 |
193 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) | 187 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) |
194 { | 188 { |
195 if (m_cachedImage) | 189 if (m_cachedImage) |
196 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), m_preserveAspectRatio->currentValue()); | 190 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), m_preserveAspectRatio->currentValue()); |
197 return FEImage::createWithIRIReference(filter, document(), hrefString(), m_p
reserveAspectRatio->currentValue()); | 191 return FEImage::createWithIRIReference(filter, document(), hrefString(), m_p
reserveAspectRatio->currentValue()); |
198 } | 192 } |
199 | 193 |
200 } | 194 } |
OLD | NEW |