RESOLVED FIXED 90272
<video> element delays document load event for ~ 3 seconds
https://bugs.webkit.org/show_bug.cgi?id=90272
Summary <video> element delays document load event for ~ 3 seconds
Steffen Weber
Reported 2012-06-29 04:38:35 PDT
If the video element has a source then it delays the document's load event for about 3 seconds even though the attribute preload="none" has been set. Test case: http://steffenweber.net/chrome-video-document-load-delay/video.html Expected result: The document load event should fire without noticeable delay. What happens instead? The document load event is delayed by ~ 3 seconds. UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 The problem is not limited to Linux, it occurs on Windows and Mac OS X, too.
Attachments
Patch (3.61 KB, patch)
2013-06-13 04:35 PDT, Santosh Mahto
no flags
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (556.51 KB, application/zip)
2013-06-13 07:06 PDT, Build Bot
no flags
Patch (3.93 KB, patch)
2013-06-13 21:36 PDT, Santosh Mahto
no flags
Patch (3.98 KB, patch)
2013-06-16 01:48 PDT, Santosh Mahto
no flags
patch for landing (3.98 KB, patch)
2013-06-16 01:58 PDT, Santosh Mahto
no flags
Steffen Weber
Comment 1 2012-07-04 02:27:33 PDT
The latest Chrome Nightly for Windows (22.0.1194.1 canary) is affected, too.
Steffen Weber
Comment 2 2013-03-14 09:17:29 PDT
Bug still exists in Chrome 26.0.1410.33 beta (WebKit 537.31)
Santosh Mahto
Comment 3 2013-06-13 04:35:29 PDT
Build Bot
Comment 4 2013-06-13 07:06:28 PDT
Comment on attachment 204573 [details] Patch Attachment 204573 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/847142 New failing tests: media/media-preload-no-delay-loadevent.html fast/repaint/table-cell-collapsed-border-scroll.html
Build Bot
Comment 5 2013-06-13 07:06:30 PDT
Created attachment 204583 [details] Archive of layout-test-results from webkit-ews-03 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Eric Carlson
Comment 6 2013-06-13 08:13:30 PDT
Comment on attachment 204573 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=204573&action=review > LayoutTests/media/media-preload-no-delay-loadevent.html:8 > +function finish(){ Nit: a function's opening brace should be on a new line. > LayoutTests/media/media-preload-no-delay-loadevent.html:12 > + } Eek, a tab! > LayoutTests/media/media-preload-no-delay-loadevent.html:22 > + document.getElementById('load-time').innerHTML = loadTime + ' PASS'; Logging the time it takes to load will make this test flakey because not all bots run at the same speed. > LayoutTests/media/media-preload-no-delay-loadevent.html:30 > + <source src="void.mp4"> This test should use a valid media file that can be loaded by the platform being tested. See how other tests use "findMediaFile" to choose a platform appropriate test file.
Santosh Mahto
Comment 7 2013-06-13 21:36:28 PDT
Eric Carlson
Comment 8 2013-06-14 07:30:50 PDT
Comment on attachment 204669 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=204669&action=review > Source/WebCore/ChangeLog:11 > + (WebCore::HTMLMediaElement::prepareForLoad): Nit: I think it is useful to have per-method comments so it is easier to understand what changed when reading the ChangeLog later. > LayoutTests/media/media-preload-no-delay-loadevent.html:8 > + testRunner.waitUntilDone(); Nit: double indent > LayoutTests/media/media-preload-no-delay-loadevent.html:37 > + var source = document.getElementById('source'); > + source.src = findMediaFile("video", "content/test.mp4"); Nit: there is no need to use a <source> element when only one media url is used.
Santosh Mahto
Comment 9 2013-06-16 01:48:11 PDT
Santosh Mahto
Comment 10 2013-06-16 01:58:02 PDT
Created attachment 204784 [details] patch for landing
Santosh Mahto
Comment 11 2013-06-16 02:03:22 PDT
review+ by Eric Carlson
Santosh Mahto
Comment 12 2013-06-18 05:56:06 PDT
Done all the requested changes I uploaded the patch for landing please have a look.
WebKit Commit Bot
Comment 13 2013-06-18 08:16:20 PDT
Comment on attachment 204784 [details] patch for landing Clearing flags on attachment: 204784 Committed r151684: <http://trac.webkit.org/changeset/151684>
WebKit Commit Bot
Comment 14 2013-06-18 08:16:22 PDT
All reviewed patches have been landed. Closing bug.
Steffen Weber
Comment 15 2013-06-18 08:48:24 PDT
Thanks!
Note You need to log in before you can comment on or make changes to this bug.