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 75 matching lines...) Loading... |
86 if (!isConnected()) | 86 if (!isConnected()) |
87 return; | 87 return; |
88 | 88 |
89 AtomicString id; | 89 AtomicString id; |
90 Element* target = SVGURIReference::targetElementFromIRIString( | 90 Element* target = SVGURIReference::targetElementFromIRIString( |
91 hrefString(), treeScope(), &id); | 91 hrefString(), treeScope(), &id); |
92 if (!target) { | 92 if (!target) { |
93 if (id.isEmpty()) { | 93 if (id.isEmpty()) { |
94 fetchImageResource(); | 94 fetchImageResource(); |
95 } else { | 95 } else { |
96 treeScope().ensureSVGTreeScopedResources().addPendingResource(id, this); | 96 treeScope().ensureSVGTreeScopedResources().addPendingResource(id, *this); |
97 DCHECK(hasPendingResources()); | 97 DCHECK(hasPendingResources()); |
98 } | 98 } |
99 } else if (target->isSVGElement()) { | 99 } else if (target->isSVGElement()) { |
100 // Register us with the target in the dependencies map. Any change of | 100 // Register us with the target in the dependencies map. Any change of |
101 // hrefElement that leads to relayout/repainting now informs us, so we can | 101 // hrefElement that leads to relayout/repainting now informs us, so we can |
102 // react to it. | 102 // react to it. |
103 addReferenceTo(toSVGElement(target)); | 103 addReferenceTo(toSVGElement(target)); |
104 } | 104 } |
105 | 105 |
106 invalidate(); | 106 invalidate(); |
(...skipping 47 matching lines...) Loading... |
154 m_cachedImage->errorOccurred() ? nullptr : m_cachedImage->getImage(); | 154 m_cachedImage->errorOccurred() ? nullptr : m_cachedImage->getImage(); |
155 return FEImage::createWithImage(filter, image, | 155 return FEImage::createWithImage(filter, image, |
156 m_preserveAspectRatio->currentValue()); | 156 m_preserveAspectRatio->currentValue()); |
157 } | 157 } |
158 | 158 |
159 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), | 159 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), |
160 m_preserveAspectRatio->currentValue()); | 160 m_preserveAspectRatio->currentValue()); |
161 } | 161 } |
162 | 162 |
163 } // namespace blink | 163 } // namespace blink |
OLD | NEW |