Open Bug 1434785 Opened 6 years ago Updated 1 year ago

WebDriver:Fullscreen might want to wait for the next tick after receiving sizemodechange event

Categories

(Remote Protocol :: Marionette, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: hiro, Unassigned)

References

(Blocks 1 open bug)

Details

Currently fullscreenWindow wraps sizemodechange event callback by a Promise, but after bug 1193394 the Promise is fulfilled soon after dispatching the event, so on Linux platform it's possible that media feature change won't be applied at that time (see bug 1430380 comment 16).

https://hg.mozilla.org/mozilla-central/file/17ade9f88b6e/testing/marionette/driver.js#l3086
Thanks for filing this bug.

Specifically what does “waiting for the next tick” entail?
Flags: needinfo?(hikezoe)
To be precise, that means to make sure all queued micro tasks have finished.  I think waiting a requestAnimationFrame is a good one if we just do something flushing styles (i.e. getComputedStyle() or querying offsetTop or something) after fullscreenWindow. (setTimeout also works for that).  If we did something which does not involve flushing style (querying style attribute directly?  Though I don't think there are such cases we need, and it might be broken in the first place), we need to wait for one more tick (requestAnimationFrame) to make sure styling process happens.
Flags: needinfo?(hikezoe)
Blocks: webdriver
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Version: Version 3 → Trunk
Summary: fullscreenWindow might want to wait for the next tick after receiving sizemodechange event → WebDriver:Fullscreen might want to wait for the next tick after receiving sizemodechange event
Severity: normal → S3
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.