| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousErr
or); | 152 imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousErr
or); |
| 153 else | 153 else |
| 154 m_needsLoaderURIUpdate = true; | 154 m_needsLoaderURIUpdate = true; |
| 155 return; | 155 return; |
| 156 } | 156 } |
| 157 | 157 |
| 158 LayoutObject* renderer = this->layoutObject(); | 158 LayoutObject* renderer = this->layoutObject(); |
| 159 if (!renderer) | 159 if (!renderer) |
| 160 return; | 160 return; |
| 161 | 161 |
| 162 if (isLengthAttribute) { | 162 if (isLengthAttribute || attrName == SVGNames::preserveAspectRatioAttr) { |
| 163 if (toLayoutSVGImage(renderer)->updateImageViewport()) | 163 // FIXME: if isLengthAttribute then we should avoid this |
| 164 markForLayoutAndParentResourceInvalidation(renderer); | 164 // call if the viewport didn't change, however since we don't |
| 165 return; | 165 // have the computed style yet we can't use updateImageViewport. |
| 166 } | |
| 167 | |
| 168 if (attrName == SVGNames::preserveAspectRatioAttr) { | |
| 169 markForLayoutAndParentResourceInvalidation(renderer); | 166 markForLayoutAndParentResourceInvalidation(renderer); |
| 170 return; | 167 return; |
| 171 } | 168 } |
| 172 | 169 |
| 173 ASSERT_NOT_REACHED(); | 170 ASSERT_NOT_REACHED(); |
| 174 } | 171 } |
| 175 | 172 |
| 176 bool SVGImageElement::selfHasRelativeLengths() const | 173 bool SVGImageElement::selfHasRelativeLengths() const |
| 177 { | 174 { |
| 178 return m_x->currentValue()->isRelative() | 175 return m_x->currentValue()->isRelative() |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 return AtomicString(hrefString()); | 226 return AtomicString(hrefString()); |
| 230 } | 227 } |
| 231 | 228 |
| 232 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) | 229 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) |
| 233 { | 230 { |
| 234 imageLoader().elementDidMoveToNewDocument(); | 231 imageLoader().elementDidMoveToNewDocument(); |
| 235 SVGGraphicsElement::didMoveToNewDocument(oldDocument); | 232 SVGGraphicsElement::didMoveToNewDocument(oldDocument); |
| 236 } | 233 } |
| 237 | 234 |
| 238 } // namespace blink | 235 } // namespace blink |
| OLD | NEW |