| Index: components/zoom/zoom_controller.cc
|
| diff --git a/components/zoom/zoom_controller.cc b/components/zoom/zoom_controller.cc
|
| index a28a01dcef71663f17c63d79aeb66ae9d0ecd8bc..f0c56f18d9e09c1daed7270d368a78af0b1d49fc 100644
|
| --- a/components/zoom/zoom_controller.cc
|
| +++ b/components/zoom/zoom_controller.cc
|
| @@ -9,6 +9,7 @@
|
| #include "content/public/browser/host_zoom_map.h"
|
| #include "content/public/browser/navigation_details.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -284,14 +285,16 @@ void ZoomController::ResetZoomModeOnNavigationIfNeeded(const GURL& url) {
|
| zoom_mode_ = ZOOM_MODE_DEFAULT;
|
| }
|
|
|
| -void ZoomController::DidNavigateMainFrame(
|
| - const content::LoadCommittedDetails& details,
|
| - const content::FrameNavigateParams& params) {
|
| - if (details.entry && details.entry->GetPageType() == content::PAGE_TYPE_ERROR)
|
| +void ZoomController::DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
|
| + return;
|
| +
|
| + if (navigation_handle->IsErrorPage())
|
| content::HostZoomMap::SendErrorPageZoomLevelRefresh(web_contents());
|
|
|
| - if (!details.is_in_page)
|
| - ResetZoomModeOnNavigationIfNeeded(params.url);
|
| + if (!navigation_handle->IsSamePage())
|
| + ResetZoomModeOnNavigationIfNeeded(navigation_handle->GetURL());
|
|
|
| // If the main frame's content has changed, the new page may have a different
|
| // zoom level from the old one.
|
|
|