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 18 matching lines...) Expand all Loading... |
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 | 37 // Animated property definitions |
38 | 38 |
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEImageElement) | |
40 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
41 END_REGISTER_ANIMATED_PROPERTIES | |
42 | 39 |
43 inline SVGFEImageElement::SVGFEImageElement(Document& document) | 40 inline SVGFEImageElement::SVGFEImageElement(Document& document) |
44 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document) | 41 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document) |
45 , SVGURIReference(this) | 42 , SVGURIReference(this) |
46 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) | 43 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
47 { | 44 { |
48 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
49 addToPropertyMap(m_preserveAspectRatio); | 46 addToPropertyMap(m_preserveAspectRatio); |
50 } | 47 } |
51 | 48 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 188 } |
192 | 189 |
193 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) | 190 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) |
194 { | 191 { |
195 if (m_cachedImage) | 192 if (m_cachedImage) |
196 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), m_preserveAspectRatio->currentValue()); | 193 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), m_preserveAspectRatio->currentValue()); |
197 return FEImage::createWithIRIReference(filter, document(), hrefString(), m_p
reserveAspectRatio->currentValue()); | 194 return FEImage::createWithIRIReference(filter, document(), hrefString(), m_p
reserveAspectRatio->currentValue()); |
198 } | 195 } |
199 | 196 |
200 } | 197 } |
OLD | NEW |