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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 8262011: Use rewritten url of a tab to find the zoom level from zoom map. Zoom map is (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents.cc
===================================================================
--- content/browser/tab_contents/tab_contents.cc (revision 105463)
+++ content/browser/tab_contents/tab_contents.cc (working copy)
@@ -820,7 +820,12 @@
zoom_level = zoom_map->GetTemporaryZoomLevel(
GetRenderProcessHost()->id(), render_view_host()->routing_id());
} else {
- zoom_level = zoom_map->GetZoomLevel(net::GetHostOrSpecFromURL(GetURL()));
+ GURL url;
+ NavigationEntry* active_entry = controller().GetActiveEntry();
+ // Since zoom map is updated using rewritten URL, use rewritten URL
+ // to get the zoom level.
+ url = active_entry ? active_entry->url() : GURL::EmptyGURL();
+ zoom_level = zoom_map->GetZoomLevel(net::GetHostOrSpecFromURL(url));
}
return zoom_level;
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698