Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly track page scale changes due to navigation in the browser
In the browser process, we only consider page scale changes that the renderer notifies the browser of. This leads to the following issue: 1) The user performs a pinch zoom, changing the page scale factor of a page. The browser is notified of this. 2) A navigation to a new page happens. The browser still thinks the WebContents is scaled. 3) A history navigation back to the original scaled page happens. Since the browser never realized that the WebContents was on an unscaled page, the browser discards the update from the renderer. The HostZoomMap now lacks the page scale information for the first page, and the browser will ignore attempts to reset the scale (e.g. using Ctrl-0). We now store page scale change notifications from the renderer in content::PageImpl instead of manually tracking this in HostZoomMap and per-WebContents state. Note that the renderer persists page scale via history entry state, which is a separate mechanism from this one where we want to know the current page scale. Bug: 1264958 Change-Id: I27260afba518954e87b2aff1027e3f06515435ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3258065 Commit-Queue: Kevin McNee <mcnee@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Reviewed-by: Martin Šrámek <msramek@chromium.org> Reviewed-by: W. James MacLean <wjmaclean@chromium.org> Cr-Commit-Position: refs/heads/main@{#940002}
- Loading branch information
Showing
17 changed files
with
154 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.