Closed lutien closed 2 months ago
@OrKoN, @sadym-chromium, could you take a look if that's somewhat similar to what CDP is doing @gsnedders, could you also assess if that's something Safari could potentially implement
The Browser Testing and Tools Working Group just discussed Update handling of "devicePixelRatio" argument in "browsingContext.setViewport" command
.
jgraham: The spec change was based on what Firefox's RDM mode uses, but we need someone to check if that is the same behaviour that other browsers have.
That's actually not accurate. The Firefox RDM implementation also doesn't use fullZoom
but exact the same mode as CDP does by setting the overrideDPPX
property on the browsing context which then gets distributed through all child contexts as well.
For details see: https://searchfox.org/mozilla-central/rev/058ab60e5020d7c5c98cf82d298aa84626e0cd79/dom/chrome-webidl/BrowsingContext.webidl#163-176
As such using the behavior from CDP would be equivalent to RDM and that is what we are proposing here.
I wonder if we need to have anything to devicePixelRatio
at all because CDP does have it but if you then send over other commands(interaction commands as example) they will not work as intended and the wrong elements will get the command leading to element click intercepted
errors being thrown.
If we leave it in then I think we need to have meaningful tests added to show that interactions work as expected (which they don't currently)
Since the implementation of changing the CSS pixels is problematic for at least Chrome and Firefox (probably Safari as well?) and likely not required, the suggestion here is to rather emulate certain parts, e.g. image source set selection and media queries.
Preview | Diff