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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 if (m_cachedImage) | 89 if (m_cachedImage) |
90 m_cachedImage->addClient(this); | 90 m_cachedImage->addClient(this); |
91 } | 91 } |
92 | 92 |
93 void SVGFEImageElement::buildPendingResource() | 93 void SVGFEImageElement::buildPendingResource() |
94 { | 94 { |
95 clearResourceReferences(); | 95 clearResourceReferences(); |
96 if (!inDocument()) | 96 if (!inDocument()) |
97 return; | 97 return; |
98 | 98 |
99 String id; | 99 AtomicString id; |
100 Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentVal
ue(), document(), &id); | 100 Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentVal
ue(), document(), &id); |
101 if (!target) { | 101 if (!target) { |
102 if (id.isEmpty()) | 102 if (id.isEmpty()) |
103 fetchImageResource(); | 103 fetchImageResource(); |
104 else { | 104 else { |
105 document().accessSVGExtensions()->addPendingResource(id, this); | 105 document().accessSVGExtensions()->addPendingResource(id, this); |
106 ASSERT(hasPendingResources()); | 106 ASSERT(hasPendingResources()); |
107 } | 107 } |
108 } else if (target->isSVGElement()) { | 108 } else if (target->isSVGElement()) { |
109 // Register us with the target in the dependencies map. Any change of hr
efElement | 109 // Register us with the target in the dependencies map. Any change of hr
efElement |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 202 } |
203 | 203 |
204 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) | 204 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) |
205 { | 205 { |
206 if (m_cachedImage) | 206 if (m_cachedImage) |
207 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), preserveAspectRatioCurrentValue()); | 207 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), preserveAspectRatioCurrentValue()); |
208 return FEImage::createWithIRIReference(filter, document(), hrefCurrentValue(
), preserveAspectRatioCurrentValue()); | 208 return FEImage::createWithIRIReference(filter, document(), hrefCurrentValue(
), preserveAspectRatioCurrentValue()); |
209 } | 209 } |
210 | 210 |
211 } | 211 } |
OLD | NEW |