Fix raster-scale regression in child widgets
This CL fixes a regression introduced in https://crrev.com/f888178b082f. In that CL, we enabled the "external" page scale factor propagation from the top level frame, that previously occurred only for OOPIFs, to also propagate to nested widgets like GuestViews and Portals. When an UpdateVisualProperties call is made on a child frame, we now update the external scale factor on these widgets. For the top level frame, we added a step to reset the external page scale factor; a top-level frame should never have an external scale (since it's top level, it has no parent which could scale it). However, the CL above made a mistake by also resetting the "from mainframe" page_scale_factor and is_pinch_gesture_active for the top- level frame. This is a mistake because these values are not exclusive to child frames like the external PSF. These values are used to decide to whether to propagate the PSF to child frames after a visual update; by resetting it to 1, when the PSF really was reset to 1, we'd avoid propagating that fact to the child frames, leaving them rastered at the previous scale. This CL removes the reset of these members to fix the issue. We also add comments and rename them to make their operation clearer. Bug: 1115900 Change-Id: I055abbe37cb3432ff85ef597ce89248023cd9be7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363810Reviewed-by:Dave Tapuska <dtapuska@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#800186}
Showing
Please register or sign in to comment