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 15 matching lines...) Expand all Loading... |
26 #include "XLinkNames.h" | 26 #include "XLinkNames.h" |
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/SVGPreserveAspectRatio.h" | 31 #include "core/svg/SVGPreserveAspectRatio.h" |
32 #include "platform/graphics/Image.h" | 32 #include "platform/graphics/Image.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 SVGFEImageElement::SVGFEImageElement(Document& document) | 36 inline SVGFEImageElement::SVGFEImageElement(Document& document) |
37 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document) | 37 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document) |
38 , SVGURIReference(this) | 38 , SVGURIReference(this) |
39 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) | 39 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
40 { | 40 { |
41 ScriptWrappable::init(this); | 41 ScriptWrappable::init(this); |
42 addToPropertyMap(m_preserveAspectRatio); | 42 addToPropertyMap(m_preserveAspectRatio); |
43 } | 43 } |
44 | 44 |
| 45 DEFINE_NODE_FACTORY(SVGFEImageElement) |
| 46 |
45 SVGFEImageElement::~SVGFEImageElement() | 47 SVGFEImageElement::~SVGFEImageElement() |
46 { | 48 { |
47 #if ENABLE(OILPAN) | 49 #if ENABLE(OILPAN) |
48 if (m_cachedImage) { | 50 if (m_cachedImage) { |
49 m_cachedImage->removeClient(this); | 51 m_cachedImage->removeClient(this); |
50 m_cachedImage = 0; | 52 m_cachedImage = 0; |
51 } | 53 } |
52 #else | 54 #else |
53 clearResourceReferences(); | 55 clearResourceReferences(); |
54 #endif | 56 #endif |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 188 } |
187 | 189 |
188 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) | 190 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) |
189 { | 191 { |
190 if (m_cachedImage) | 192 if (m_cachedImage) |
191 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), m_preserveAspectRatio->currentValue()); | 193 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), m_preserveAspectRatio->currentValue()); |
192 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), m_
preserveAspectRatio->currentValue()); | 194 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), m_
preserveAspectRatio->currentValue()); |
193 } | 195 } |
194 | 196 |
195 } | 197 } |
OLD | NEW |