commit | 0246bba0cd7b7d6616e0aeac4a3f38464e9af232 | [log] [tgz] |
---|---|---|
author | danakj <danakj@chromium.org> | Wed Jan 23 23:12:27 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 23 23:12:27 2019 |
tree | ba5159aea36810115810b4d6db7f8c866b903a0d | |
parent | ccf6be4686093ade39c87b4afc36cf95cceabca0 [diff] |
Move page scale factor out of RenderWidget::SynchronizeVisualProperties. The SynchronizeVisualProperties() method is called from the IPC handler to apply some of the IPC message. The code for page scale factor is moved out to the IPC handler to act on it directly. It is also called by a number of methods for tests, which apply various properties to the RenderWidget. Page scale is not ever changed by these test methods, so they do not depend on it being inside SynchronizeVisualProperties(). It is also also called from the screen metrics emulator, but since the emulator does not change the page scale factor, it also does not depend on this code being in SynchronizeVisualProperties(). The notification of the page scale factor change to each RenderFrameProxy is dramatically reordered with respect to the other properties of RenderWidget changing. This is okay because the notification is only to pass the value over IPC up to the browser and down to the child RenderWidget, so it does not depend on the ordering. This reduces the test-only method dependency footprint on the VisualProperties structure. Left a TODO about changing the routing of this page scale property to go blink->RenderView->RenderViewHost->{All RenderWidgets} instead of the current blink->RenderView->RenderWidget-> {All RenderFrameProxy->RenderWidgetHost->RenderWidgets} Other page-level properties could benefit from this path as well but are much trickier since they a) do not go through RenderFrameProxy today and instead seem to propagate through the browser code, which is good, except b) are treated identically in child RenderWidgets as in the main frame, whereas the page scale factor has clear behaviour differences for child RenderWidgets. So this could be useful for exploring and establishing this pattern. R=ajwong@chromium.org TBR=avi Change-Id: I4af9b114e729c26e8356e69ecb9569337d653cb3 Bug: 912193 Reviewed-on: https://chromium-review.googlesource.com/c/1427466 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by: Albert J. Wong <ajwong@chromium.org> Cr-Commit-Position: refs/heads/master@{#625401}
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 .