Document::checkLoadEventSoon() races tasks that stop delaying-the-load-event |
|||||
Issue descriptionSee 1. https://www.w3.org/TR/html51/syntax.html#delay-the-load-event 2. https://codereview.chromium.org/2021573002/diff/40001/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-attach-stops-delaying-load-event.html#newcode32 3. https://github.com/w3c/web-platform-tests/pull/3082#issuecomment-244501252 The sequencing of queueing of tasks by the task that removes the last thing that "delays the load event" versus the queueing of the task that sets the current document readiness to "complete" and conditionally fires a 'load' event at the Document's Window is broken. In the MSE example: MSE attachment sequentially in the same task does: a) sets the delaying-the-load-event-flag false b) queues 'sourceopen' event Per spec, if 'load' was still delayed (had not been fired yet) prior to MSE attachment, then 'load' *MUST* be fired *after* 'sourceopen', since the task to do the latter is enqueued first. But in Chrome, as soon as step (a) in the MSE example is done, the task to conditionally fire the load event is queued immediately and the event sequence is reversed vs spec. A short-term Chrome MSE hack would be to simply reverse (a) and (b) in the MSE implementation. A longer-term fix would be to fix the Document 'load' event infra to conform to the spec (and undo any short-term MSE hack).
,
Sep 2 2016
,
Sep 5 2016
,
Sep 5 2016
Can you use Document::incrementLoadEventDelayCount() and Document::decreaseLoadEventDelayCount() the same way HTMLMediaElement does?
,
Sep 8 2016
The way I read the spec is that the sourceopen event should be fired before the window load event, regardless of how the MSE spec were to order the two steps, because the task to fire the window load event is enqueued in between tasks, as soon as nothing is no longer delaying the load event. Although the shape of the code is very different in Blink, it looks to me like the timing of the load event fired by LocalDOMWindow::dispatchLoadEvent is actually going to be correct, although I didn't verify in a debugger or anything. Isn't MSE using Document::incrementLoadEventDelayCount() and Document::decreaseLoadEventDelayCount()?
,
Sep 11 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 11 2017
this bug has been stale for > 1 year. close it. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by wolenetz@chromium.org
, Sep 2 2016