requestFullscreen may result on neither fullscreenchange nor fullscreenerror being dispatched due to race condition
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: xidorn, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
This is revealed in bug 1489190 after the fullscreen test was re-enabled as part of bug 1350875.
The contract of Fullscreen API is that, when requestFullscreen
method is called, either fullscreenchange
or fullscreenerror
event should be dispatched, indicating it succeeds or fails. Also the promise it returns should also be either resolved or rejected.
However, in case when the child process exits fullscreen and request fullscreen again, while the parent process is still in the process of exiting, sometimes neither of the events is dispatched, breaking the contract.
It can be easily reproduced with the attached testcase with full-screen-api.allow-trusted-requests-only
set to false
. Open the page with the pref set, it should repeatedly enter fullscreen and exit because we repeat requestFullscreen
whenever either of the event happens. However, it gets stuck very soon.
This is probably not very important, as it doesn't seem to drag the document into weird state, only that we leave a promise unresolved forever until document goes away. Also as it requires exit then immediately entering fullscreen, it's unlikely to be hit in normal case at all, as entering fullscreen requires user activation.
Updated•4 years ago
|
Updated•2 years ago
|
Comment 1•2 years ago
|
||
(There are some investigations related to this in bug 1826645.)
Description
•