mirror of
https://github.com/servo/servo
synced 2026-05-08 16:12:15 +02:00
Continuing the implementation of `VisualViewport`, the resizing of `PinchZoom` should be notified to `ScriptThread` to update the `VisualViewport` interface and to fire the appropriate JS event. Top level `Window`/`Pipeline` would have a `VisualViewport` interface that mirrors the `PinchZoom` viewport, while nested `Window` would have a default value that represent layout viewport of the relevant iframe. The `VisualViewport` of an iframe is updated after each reflow that calculate the rectangle of the iframe. The updates of DOM's `VisualViewport` occurs immediately (instead of waiting for the event loop like the viewport) but integrates with the event loop for the JS events. This behavior would helps with the fact that `VisualViewport` needs to be updated both when it is scrolled or resized. Testing: Existing WPTs and new unit test. Part of: https://github.com/servo/servo/issues/41341 --------- Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>