| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // viewport didn't change, however since we don't have the computed | 131 // viewport didn't change, however since we don't have the computed |
| 132 // style yet we can't use updateBoundingBox/updateImageContainerSize. | 132 // style yet we can't use updateBoundingBox/updateImageContainerSize. |
| 133 // See http://crbug.com/466200. | 133 // See http://crbug.com/466200. |
| 134 markForLayoutAndParentResourceInvalidation(object); | 134 markForLayoutAndParentResourceInvalidation(object); |
| 135 return; | 135 return; |
| 136 } | 136 } |
| 137 | 137 |
| 138 if (SVGURIReference::isKnownAttribute(attrName)) { | 138 if (SVGURIReference::isKnownAttribute(attrName)) { |
| 139 SVGElement::InvalidationGuard invalidationGuard(this); | 139 SVGElement::InvalidationGuard invalidationGuard(this); |
| 140 if (inDocument()) | 140 if (inDocument()) |
| 141 imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousErr
or); | 141 imageLoader().updateFromElement(0, ImageLoader::UpdateIgnorePrevious
Error); |
| 142 else | 142 else |
| 143 m_needsLoaderURIUpdate = true; | 143 m_needsLoaderURIUpdate = true; |
| 144 return; | 144 return; |
| 145 } | 145 } |
| 146 | 146 |
| 147 SVGGraphicsElement::svgAttributeChanged(attrName); | 147 SVGGraphicsElement::svgAttributeChanged(attrName); |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool SVGImageElement::selfHasRelativeLengths() const | 150 bool SVGImageElement::selfHasRelativeLengths() const |
| 151 { | 151 { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 179 | 179 |
| 180 Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode*
rootParent) | 180 Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode*
rootParent) |
| 181 { | 181 { |
| 182 SVGGraphicsElement::insertedInto(rootParent); | 182 SVGGraphicsElement::insertedInto(rootParent); |
| 183 if (!rootParent->inDocument()) | 183 if (!rootParent->inDocument()) |
| 184 return InsertionDone; | 184 return InsertionDone; |
| 185 | 185 |
| 186 // We can only resolve base URIs properly after tree insertion - hence, URI
mutations while | 186 // We can only resolve base URIs properly after tree insertion - hence, URI
mutations while |
| 187 // detached are deferred until this point. | 187 // detached are deferred until this point. |
| 188 if (m_needsLoaderURIUpdate) { | 188 if (m_needsLoaderURIUpdate) { |
| 189 imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousError); | 189 imageLoader().updateFromElement(0, ImageLoader::UpdateIgnorePreviousErro
r); |
| 190 m_needsLoaderURIUpdate = false; | 190 m_needsLoaderURIUpdate = false; |
| 191 } else { | 191 } else { |
| 192 // A previous loader update may have failed to actually fetch the image
if the document | 192 // A previous loader update may have failed to actually fetch the image
if the document |
| 193 // was inactive. In that case, force a re-update (but don't clear previo
us errors). | 193 // was inactive. In that case, force a re-update (but don't clear previo
us errors). |
| 194 if (!imageLoader().image()) | 194 if (!imageLoader().image()) |
| 195 imageLoader().updateFromElement(); | 195 imageLoader().updateFromElement(0); |
| 196 } | 196 } |
| 197 | 197 |
| 198 return InsertionDone; | 198 return InsertionDone; |
| 199 } | 199 } |
| 200 | 200 |
| 201 const AtomicString SVGImageElement::imageSourceURL() const | 201 const AtomicString SVGImageElement::imageSourceURL() const |
| 202 { | 202 { |
| 203 return AtomicString(hrefString()); | 203 return AtomicString(hrefString()); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) | 206 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) |
| 207 { | 207 { |
| 208 imageLoader().elementDidMoveToNewDocument(); | 208 imageLoader().elementDidMoveToNewDocument(); |
| 209 SVGGraphicsElement::didMoveToNewDocument(oldDocument); | 209 SVGGraphicsElement::didMoveToNewDocument(oldDocument); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace blink | 212 } // namespace blink |
| OLD | NEW |