w3c / webdriver-bidi

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

CSS pixels for scrolling #520

Closed jrandolf closed 1 year ago

jrandolf commented 1 year ago

Currently BiDi doesn't specify whether scrolling uses hardware pixels or CSS pixels. Based on current implementation, it seems like we want hardware pixels.

whimboo commented 1 year ago

For a wheel action in the WebDriver classic specification we define values like:

If x is less than 0 or greater than the width of the viewport in CSS pixels, then return error with error code move target out of bounds.

To stay compatible with classic WebDriver BiDi also has to use CSS pixels and not screen pixels.

jrandolf commented 1 year ago

Turns out there was a bug in Chromium. Fixed in https://chromium-review.googlesource.com/c/chromium/src/+/4813942