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

NEW
Unassigned

Status

defect
P2
normal
a year ago
a year ago

People

(Reporter: hiro, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
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)
(Reporter)

Comment 2

a year ago
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
You need to log in before you can comment on or make changes to this bug.