In a UA with separate visual and layout viewports, we don't have any standardised way to control the layout and visual viewports separately.
#934 asks for a limited form of this in the specific context of WPT and scaling.
Even the "scroll" events we have currently, the spec doesn't actually define whether they control the layout or visual viewport: https://w3c.github.io/webdriver/#dfn-dispatch-a-scroll-action
In practice you might be able to make this work in existing UAs by using touch events to trigger pinch zoom interactions, but I don't believe there's anything per spec that guarantees this.
#1053 could be used in a kinda hacky way to provide some amount of control over the visual viewport (c.f. #934 (comment)), but constantly mutating <meta name=viewport> likely behaves differently in existing UAs compared with the UA being interacted via pinch-zoom etc.
(Partly filed based on web-platform-tests/interop-mobile-testing#2 (comment), where we can maybe do this based on pinch-zoom in practice in existing UAs, but there's nothing per-spec guarantees this works.)
In a UA with separate visual and layout viewports, we don't have any standardised way to control the layout and visual viewports separately.
#934 asks for a limited form of this in the specific context of WPT and scaling.
Even the "scroll" events we have currently, the spec doesn't actually define whether they control the layout or visual viewport: https://w3c.github.io/webdriver/#dfn-dispatch-a-scroll-action
In practice you might be able to make this work in existing UAs by using touch events to trigger pinch zoom interactions, but I don't believe there's anything per spec that guarantees this.
#1053 could be used in a kinda hacky way to provide some amount of control over the visual viewport (c.f. #934 (comment)), but constantly mutating
<meta name=viewport>likely behaves differently in existing UAs compared with the UA being interacted via pinch-zoom etc.(Partly filed based on web-platform-tests/interop-mobile-testing#2 (comment), where we can maybe do this based on pinch-zoom in practice in existing UAs, but there's nothing per-spec guarantees this works.)