w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

"browsingContext.print" with custom scaling should not use default value (true) of "shrinkToFit" argument #686

Open whimboo opened 3 months ago

whimboo commented 3 months ago

Right now the shrinkToFit argument of the browsingContext.print command defaults to true. That even when a client specified the scale argument with a different value than 1. As result in Firefox the scaling is not applied at all.

When I check the print options of Safari I can see that Scale to fit paper size doesn't have any effect when a scaling value is set. Also Chrome behaves that way when using the system print dialog on MacOS. In it's own UI a Shrink to Fit option is not even visible. And in Firefox Shrink to Fit and Scale are options that are mutual exclusive.

Should we consider not applying shrinkToFit when scale has a custom value?

Note that this will also apply to WebDriver classic, and would require a separate PR.

CC @gsnedders @sadym-chromium, @jgraham