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

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: rebase + add comment Created 5 years, 11 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/frame/FrameView.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index ed76cf3378933d324d7262678c6e0668f328d6a8..b7a0cede99bb43d915b8b90896b1e7701ae070e7 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -713,9 +713,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).
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698