0
Files
src/content/renderer
Stefan Zager da8a353ba2 Refactor zoom propagation
This recent patch made zoom level a property on WebFrameWidget rather
than WebView:

https://chromium-review.googlesource.com/c/chromium/src/+/5571113

However, it left the propagation routes for zoom information in a bit of
a crazy state. This CL is a pure refactor with no behavioral change,
intended only to make the propagation mechanism more consistent and
sane.

All of the inputs to the zoom factor calculation arrive via IPC to a
frame widget. Zoom level is handled directly by WebFrameWidget; all
other factors are delegated to WebView, which propagates them down to
all WebFrameWidgets contained by the WebView. The WebFrameWidget in turn
is responsible for propagating zoom factor to the root LocalFrame of the
widget, and the root frame is responsible for propagating it to
descendant non-root frames.

This also activates the path for propagating zoom level from embedder to
process-isolated iframe via VisualProperties::zoom_level. Currently,
that value is ignored by RenderWidgetHostImpl::GetVisualProperties in
favor of the WebContents-level value. After this change, the value set
by the embedder will be used instead. Currently, the two values are
always identical, so this is a pure plumbing change with no behavior
difference. A follow-up CL will allow the value set by the embedder to
deviate from the WebContents-level value based on CSS zoom.

Bug: chromium:329482480
Change-Id: I18991c9db9f1d1be8ffad7677d6a551ab70495f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5611483
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313827}
2024-06-12 04:42:25 +00:00
..
2024-06-12 04:42:25 +00:00