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

Unified Diff: Source/core/svg/SVGImageElement.cpp

Issue 963733002: [svg2] Make 'width' and 'height' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline some EX tests [Mac Win] Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/svg/SVGPathData.cpp ('k') | Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGImageElement.cpp
diff --git a/Source/core/svg/SVGImageElement.cpp b/Source/core/svg/SVGImageElement.cpp
index 39aa67442aff27613887e07d993e5c84bc3c30b2..56f6d90bbcecf56ecebf74727a2df97b04e2db8b 100644
--- a/Source/core/svg/SVGImageElement.cpp
+++ b/Source/core/svg/SVGImageElement.cpp
@@ -159,13 +159,11 @@ void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName)
if (!renderer)
return;
- if (isLengthAttribute) {
- if (toLayoutSVGImage(renderer)->updateImageViewport())
- markForLayoutAndParentResourceInvalidation(renderer);
- return;
- }
-
- if (attrName == SVGNames::preserveAspectRatioAttr) {
+ if (isLengthAttribute || attrName == SVGNames::preserveAspectRatioAttr) {
+ // FIXME: if isLengthAttribute then we should avoid this
+ // call if the viewport didn't change, however since we don't
+ // have the computed style yet we can't use updateImageViewport.
+ // See http://crbug.com/466200.
markForLayoutAndParentResourceInvalidation(renderer);
return;
}
« no previous file with comments | « Source/core/layout/svg/SVGPathData.cpp ('k') | Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698