commit | 6876fb4fffcf526da756a794c91b60d58ef60c07 | [log] [tgz] |
---|---|---|
author | danakj <[email protected]> | Wed Sep 18 18:10:35 2019 |
committer | Commit Bot <[email protected]> | Wed Sep 18 18:10:35 2019 |
tree | bfd1a73f2d8c437e146d024894d669fc3facc9fa | |
parent | b216c421502476f5f8b3df3fe6b6f65338d015c2 [diff] |
Move page zoom level responsibility into RenderViewImpl. Page zoom level is a page/view concept, but the code to manage it is currently in RenderFrameImpl, though only run when it is the root frame. This doesn't dramatically change ownership of responsibility but moves the code up into RenderViewImpl. RenderWidget still goes through RenderFrameImpl (though more explicitly) to set the zoom level on the RenderView. And RenderWidget takes responsibility for closing the page popup instead of having multiple "set page zoom" methods on RenderViewImpl. This uncovered some spooky action-at-a-distance and makes it more explicit and documented, though no less unfortunate. A local root LocalFrame does not initialize with the correct page zoom value because it has no parent to read it from. We (accidentally?) worked around that by setting the RenderView's page zoom to its current value when navigating a (new) LocalFrame, which would call into blink's WebView and walk through the entire frame tree setting the value on everything, eventually also on the new LocalFrame. Now on navigation, for a local root, we call RenderWidget's UpdateWebViewWithDeviceScaleFactor() which does the same thing by re-setting the WebView's page zoom factor. This was done when making a new main frame in multiple places (RenderView and RenderFrame both called it in the same CreateFrame() callstack). Now it is consolidated to a single place on navigation for the main frame and child frames giving them more consistent behaviour, and going explicitly through this method that should go away if things were well designed, rather than re-setting the RenderView to its own value. Remove calls to UpdateWebViewWithDeviceScaleFactor() scattered throughout RenderViewImpl and RenderFrameImpl. What we need is for 1) The Page to be updated with PreferCompositingToLCDText when the device scale factor changes. 2) The WebView to be updated when the device scale factor changes. 3) The LocalFrame of a local root needs its page zoom set by poking the WebViewImpl to walk through all frames and set it. [email protected] Bug: 419087 Change-Id: I97c0e287be8f96a4ac632d63b981c190169dc1a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1799386 Reviewed-by: Avi Drissman <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Erik Chen <[email protected]> Commit-Queue: danakj <[email protected]> Cr-Commit-Position: refs/heads/master@{#697687}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .