w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
679 stars 194 forks source link

Zoom level and screen resolution #1378

Open AutomatedTester opened 5 years ago

AutomatedTester commented 5 years ago

After a recent survey for Blink Developers setting zoom level and screen resolution manipulation. This is around being to do a text/layout zoom of a web page.

christian-bromann commented 5 years ago

@AutomatedTester do you have a link to that survey?

AutomatedTester commented 5 years ago

https://groups.google.com/a/chromium.org/d/msg/ecosystem-infra/nbLGsXkkHjw/4YN4Jx0dBgAJ

AutomatedTester commented 5 years ago

It makes sense that webdriver offer these features.

christian-bromann commented 5 years ago

I think changing the zoom level is clear but what is screen resolution suppose to mean here? It sounds more like an OS level thing to control.

noamr commented 4 years ago

See wpt issue: https://github.com/web-platform-tests/wpt/issues/7140 WebDriver is used to simulate environments. One of the subjects of the simulation is simulating different device resolutions, in order to test different behaviors of srcset and other resolution-dependent features without having to change anything on the OS level.

whimboo commented 4 years ago

I think we should separate zoom and emulating devices into separate issues. Both are different in terms what they actually achieve.

FYI the device emulation piece I got implemented a while ago for our partial CDP support in Firefox (See bug 1544417). Therefore we are simulating the device's resolution and the appropriate DPI value.

Adding support for zoom wouldn't have to change any device metrics, but just adjust the internal zoom level of the current top browsing context.

noamr commented 4 years ago

I think we should separate zoom and emulating devices into separate issues. Both are different in terms what they actually achieve.

Created a separate event for device-resolution API: https://github.com/w3c/webdriver/issues/1547