Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: Source/core/svg/SVGImageElement.cpp

Issue 1219493005: Cleanups to viewport-handling and image invalidation in LayoutSVGImage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 invalidateSVGPresentationAttributeStyle(); 120 invalidateSVGPresentationAttributeStyle();
121 setNeedsStyleRecalc(LocalStyleChange, 121 setNeedsStyleRecalc(LocalStyleChange,
122 StyleChangeReasonForTracing::fromAttribute(attrName)); 122 StyleChangeReasonForTracing::fromAttribute(attrName));
123 updateRelativeLengthsInformation(); 123 updateRelativeLengthsInformation();
124 } 124 }
125 125
126 LayoutObject* object = this->layoutObject(); 126 LayoutObject* object = this->layoutObject();
127 if (!object) 127 if (!object)
128 return; 128 return;
129 129
130 // FIXME: if isLengthAttribute then we should avoid this 130 // FIXME: if isLengthAttribute then we should avoid this call if the
131 // call if the viewport didn't change, however since we don't 131 // viewport didn't change, however since we don't have the computed
132 // have the computed style yet we can't use updateImageViewport. 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(ImageLoader::UpdateIgnorePreviousErr or);
142 else 142 else
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« Source/core/layout/svg/LayoutSVGImage.cpp ('K') | « Source/core/layout/svg/LayoutSVGImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698