| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 { | 201 { |
| 202 SVGGraphicsElement::insertedInto(rootParent); | 202 SVGGraphicsElement::insertedInto(rootParent); |
| 203 if (!rootParent->inDocument()) | 203 if (!rootParent->inDocument()) |
| 204 return InsertionDone; | 204 return InsertionDone; |
| 205 | 205 |
| 206 // We can only resolve base URIs properly after tree insertion - hence, URI
mutations while | 206 // We can only resolve base URIs properly after tree insertion - hence, URI
mutations while |
| 207 // detached are deferred until this point. | 207 // detached are deferred until this point. |
| 208 if (m_needsLoaderURIUpdate) { | 208 if (m_needsLoaderURIUpdate) { |
| 209 m_imageLoader.updateFromElementIgnoringPreviousError(); | 209 m_imageLoader.updateFromElementIgnoringPreviousError(); |
| 210 m_needsLoaderURIUpdate = false; | 210 m_needsLoaderURIUpdate = false; |
| 211 } else { |
| 212 // A previous loader update may have failed to actually fetch the image
if the document |
| 213 // was inactive. In that case, force a re-update (but don't clear previo
us errors). |
| 214 if (!m_imageLoader.image()) |
| 215 m_imageLoader.updateFromElement(); |
| 211 } | 216 } |
| 212 | 217 |
| 213 return InsertionDone; | 218 return InsertionDone; |
| 214 } | 219 } |
| 215 | 220 |
| 216 const AtomicString SVGImageElement::imageSourceURL() const | 221 const AtomicString SVGImageElement::imageSourceURL() const |
| 217 { | 222 { |
| 218 return AtomicString(hrefString()); | 223 return AtomicString(hrefString()); |
| 219 } | 224 } |
| 220 | 225 |
| 221 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) | 226 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) |
| 222 { | 227 { |
| 223 m_imageLoader.elementDidMoveToNewDocument(); | 228 m_imageLoader.elementDidMoveToNewDocument(); |
| 224 SVGGraphicsElement::didMoveToNewDocument(oldDocument); | 229 SVGGraphicsElement::didMoveToNewDocument(oldDocument); |
| 225 } | 230 } |
| 226 | 231 |
| 227 } | 232 } |
| OLD | NEW |