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

Unified Diff: components/ui/zoom/zoom_controller.cc

Issue 884063004: Reset manual zoom mode on navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « chrome/browser/ui/zoom/zoom_controller_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ui/zoom/zoom_controller.cc
diff --git a/components/ui/zoom/zoom_controller.cc b/components/ui/zoom/zoom_controller.cc
index e5a1bc5ffa054cf750e268112953d7a0456f7970..1a68fe4434d5196f7683b80442a9403b98f9719f 100644
--- a/components/ui/zoom/zoom_controller.cc
+++ b/components/ui/zoom/zoom_controller.cc
@@ -236,13 +236,14 @@ void ZoomController::SetZoomMode(ZoomMode new_mode) {
}
void ZoomController::ResetZoomModeOnNavigationIfNeeded(const GURL& url) {
- if (zoom_mode_ != ZOOM_MODE_ISOLATED)
+ if (zoom_mode_ != ZOOM_MODE_ISOLATED && zoom_mode_ != ZOOM_MODE_MANUAL)
return;
int render_process_id = web_contents()->GetRenderProcessHost()->GetID();
int render_view_id = web_contents()->GetRenderViewHost()->GetRoutingID();
content::HostZoomMap* zoom_map =
content::HostZoomMap::GetForWebContents(web_contents());
+ zoom_level_ = zoom_map->GetDefaultZoomLevel();
double old_zoom_level = zoom_map->GetZoomLevel(web_contents());
double new_zoom_level = zoom_map->GetZoomLevelForHostAndScheme(
url.scheme(), net::GetHostOrSpecFromURL(url));
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698