performance.timing.domInteractive is zero
Reported by
nn1436...@gmail.com,
May 22 2018
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Steps to reproduce the problem: 1. Go to https://raw.githubusercontent.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4 2. Open devtools console 3. http://techslides.com/demos/sample-videos/small.webm What is the expected behavior? The value is filled correctly with timestamp. What went wrong? window.performance.timing.domInteractive is zero while domComplete and other timings are not. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 66 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 29.0 r0
,
May 22 2018
,
May 22 2018
,
May 25 2018
Can you provide some more context on what you're using this for? I'm not sure if this violates the spec or not. From the spec: https://www.w3.org/TR/html5/syntax.html#the-end ''' Once the user agent stops parsing the document, the user agent must run the following steps: Set the current document readiness to "interactive" and the insertion point to undefined. ''' There isn't really a document to parse in this case... Domenic, it looks like we never set the document readiness state to "interactive" in the case where we're just showing media. Any idea if this behavior is spec compliant?
,
May 25 2018
(Reminder to use https://html.spec.whatwg.org/multipage/parsing.html#the-end.) Per https://html.spec.whatwg.org/multipage/browsing-the-web.html#read-media, "the user agent must act as if it had stopped parsing." So you do need to set it to interactive.
,
May 28 2018
Thanks Domenic! This should be a one-line change to https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/media/media_document.cc Marking P3, as I can't come up with any particularly reasonable use case here, but we probably should fix this at some point. Max, I've tentatively put this on your plate as a P3.
,
May 28 2018
Yep I can take it. Thanks!
,
Sep 25
,
Sep 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6f5978f29f4558a212246d53757b518e3acde7d4 commit 6f5978f29f4558a212246d53757b518e3acde7d4 Author: Liquan(Max) Gu <maxlg@chromium.org> Date: Wed Sep 26 22:08:28 2018 [DomInteractive] Mark Dom interactive to media document and image document According to the spec (https://html.spec.whatwg.org/multipage/browsing-the-web.html#read-media), "Then, the user agent must act as if it had stopped parsing", so we mark DOM-interactive to Media Document when finishes parsing. Bug: 845385 Change-Id: I825409e9cf4c8d11f1f9233844492cc3a0bebe9a Reviewed-on: https://chromium-review.googlesource.com/1239516 Reviewed-by: Timothy Dresser <tdresser@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Liquan (Max) Gǔ <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#594494} [add] https://crrev.com/6f5978f29f4558a212246d53757b518e3acde7d4/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/dom_interactive_image_document.html [add] https://crrev.com/6f5978f29f4558a212246d53757b518e3acde7d4/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/dom_interactive_media_document.html [modify] https://crrev.com/6f5978f29f4558a212246d53757b518e3acde7d4/third_party/blink/renderer/core/dom/raw_data_document_parser.h [modify] https://crrev.com/6f5978f29f4558a212246d53757b518e3acde7d4/third_party/blink/renderer/core/html/image_document.cc [modify] https://crrev.com/6f5978f29f4558a212246d53757b518e3acde7d4/third_party/blink/renderer/core/html/image_document_test.cc [modify] https://crrev.com/6f5978f29f4558a212246d53757b518e3acde7d4/third_party/blink/renderer/core/html/media/html_media_element_test.cc
,
Oct 2
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by nn1436...@gmail.com
, May 22 2018