Use rewritten url of a tab to find the zoom level from zoom map. Zoom map is
maintained using rewritten URLs. Using GetURL() to find the zoom level will fail in case of rewritten URLs as GetURL() returns virtual_url which will be different from the rewritten URL. Contributed by wrm364@motorola.com BUG=94408 Review URL: http://codereview.chromium.org/8262011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105474 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
1
AUTHORS
1
AUTHORS
@ -134,3 +134,4 @@ Vamshikrishna Yellenki <vamshi@motorola.com>
|
||||
Robert Nagy <robert@openbsd.org>
|
||||
Nayan Kumar K <qtc746@motorola.com>
|
||||
ShankarGanesh K <blr.bmlab@gmail.com>
|
||||
Goutham Jagannatha <wrm364@motorola.com>
|
||||
|
@ -820,7 +820,12 @@ double TabContents::GetZoomLevel() const {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user