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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 m_cachedImage->addClient(this); | 85 m_cachedImage->addClient(this); |
86 } | 86 } |
87 | 87 |
88 void SVGFEImageElement::buildPendingResource() | 88 void SVGFEImageElement::buildPendingResource() |
89 { | 89 { |
90 clearResourceReferences(); | 90 clearResourceReferences(); |
91 if (!inDocument()) | 91 if (!inDocument()) |
92 return; | 92 return; |
93 | 93 |
94 String id; | 94 String id; |
95 Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentVal
ue(), &document(), &id); | 95 Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentVal
ue(), document(), &id); |
96 if (!target) { | 96 if (!target) { |
97 if (id.isEmpty()) | 97 if (id.isEmpty()) |
98 fetchImageResource(); | 98 fetchImageResource(); |
99 else { | 99 else { |
100 document().accessSVGExtensions()->addPendingResource(id, this); | 100 document().accessSVGExtensions()->addPendingResource(id, this); |
101 ASSERT(hasPendingResources()); | 101 ASSERT(hasPendingResources()); |
102 } | 102 } |
103 } else if (target->isSVGElement()) { | 103 } else if (target->isSVGElement()) { |
104 // Register us with the target in the dependencies map. Any change of hr
efElement | 104 // Register us with the target in the dependencies map. Any change of hr
efElement |
105 // that leads to relayout/repainting now informs us, so we can react to
it. | 105 // that leads to relayout/repainting now informs us, so we can react to
it. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return; | 193 return; |
194 | 194 |
195 if (RenderObject* renderer = this->renderer()) | 195 if (RenderObject* renderer = this->renderer()) |
196 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); | 196 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); |
197 } | 197 } |
198 | 198 |
199 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) | 199 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil
ter) |
200 { | 200 { |
201 if (m_cachedImage) | 201 if (m_cachedImage) |
202 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), preserveAspectRatioCurrentValue()); | 202 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(
renderer()), preserveAspectRatioCurrentValue()); |
203 return FEImage::createWithIRIReference(filter, &document(), hrefCurrentValue
(), preserveAspectRatioCurrentValue()); | 203 return FEImage::createWithIRIReference(filter, document(), hrefCurrentValue(
), preserveAspectRatioCurrentValue()); |
204 } | 204 } |
205 | 205 |
206 void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) con
st | 206 void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) con
st |
207 { | 207 { |
208 SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls); | 208 SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls); |
209 | 209 |
210 addSubresourceURL(urls, document().completeURL(hrefCurrentValue())); | 210 addSubresourceURL(urls, document().completeURL(hrefCurrentValue())); |
211 } | 211 } |
212 | 212 |
213 } | 213 } |
OLD | NEW |