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

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

Issue 813133004: [svg] Reset the initial view properly in SVGImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tweak test to avoid bug 444553 (separate issue) Created 6 years 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
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index 84e6651f2d9c189e353bcc87447d0bc278114e27..1ae88bd0059d27ef4936b6811104596df35ec2de 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -712,9 +712,16 @@ void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element*
if (RenderObject* renderer = svg->renderer())
markForLayoutAndParentResourceInvalidation(renderer);
+
+ return;
}
}
+ // If we previously had a view and didn't get a new one, we need to
+ // layout again.
+ if (renderer && hadUseCurrentView)
+ markForLayoutAndParentResourceInvalidation(renderer);
+
// FIXME: We need to decide which <svg> to focus on, and zoom to it.
// FIXME: We need to actually "highlight" the viewTarget(s).
}

Powered by Google App Engine
This is Rietveld 408576698