Title: [151684] trunk
- Revision
- 151684
- Author
- [email protected]
- Date
- 2013-06-18 08:16:02 -0700 (Tue, 18 Jun 2013)
Log Message
<video> element delays document load event for ~ 3 seconds
https://bugs.webkit.org/show_bug.cgi?id=90272
Patch by Santosh Mahto <[email protected]> on 2013-06-18
Reviewed by Eric Carlson.
Source/WebCore:
Test: media/media-preload-no-delay-loadevent.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
No need to delay document load event here when preload="none"
LayoutTests:
* media/media-preload-no-delay-loadevent-expected.txt: Added.
* media/media-preload-no-delay-loadevent.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (151683 => 151684)
--- trunk/LayoutTests/ChangeLog 2013-06-18 13:16:50 UTC (rev 151683)
+++ trunk/LayoutTests/ChangeLog 2013-06-18 15:16:02 UTC (rev 151684)
@@ -1,3 +1,13 @@
+2013-06-18 Santosh Mahto <[email protected]>
+
+ <video> element delays document load event for ~ 3 seconds
+ https://bugs.webkit.org/show_bug.cgi?id=90272
+
+ Reviewed by Eric Carlson.
+
+ * media/media-preload-no-delay-loadevent-expected.txt: Added.
+ * media/media-preload-no-delay-loadevent.html: Added.
+
2013-06-18 Gabor Abraham <[email protected]>
[Qt] Unreviewed gardening. Rebaseline and skipping some tests.
Added: trunk/LayoutTests/media/media-preload-no-delay-loadevent-expected.txt (0 => 151684)
--- trunk/LayoutTests/media/media-preload-no-delay-loadevent-expected.txt (rev 0)
+++ trunk/LayoutTests/media/media-preload-no-delay-loadevent-expected.txt 2013-06-18 15:16:02 UTC (rev 151684)
@@ -0,0 +1 @@
+Document load event triggered: Load Time < 2s PASS
Added: trunk/LayoutTests/media/media-preload-no-delay-loadevent.html (0 => 151684)
--- trunk/LayoutTests/media/media-preload-no-delay-loadevent.html (rev 0)
+++ trunk/LayoutTests/media/media-preload-no-delay-loadevent.html 2013-06-18 15:16:02 UTC (rev 151684)
@@ -0,0 +1,41 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+var startTime = new Date().getTime();
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function finish()
+{
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.notifyDone();
+ }
+}
+
+window.addEventListener('load', function()
+{
+ var endTime = new Date().getTime();
+ var loadTime = endTime - startTime;
+ if(loadTime > 2000)
+ document.getElementById('load-time').innerHTML = 'Load Time > 2s' + ' FAIL';
+ else
+ document.getElementById('load-time').innerHTML = 'Load Time < 2s' + ' PASS';
+ finish();
+}, false);
+
+</script>
+<body>
+
+<video id="video" controls preload="none">
+</video>
+<script>
+ var vid = document.getElementById('video');
+ vid.src = "" "content/test.mp4");
+</script>
+<div>Document load event triggered: <span id="load-time">not yet</span></div>
+
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (151683 => 151684)
--- trunk/Source/WebCore/ChangeLog 2013-06-18 13:16:50 UTC (rev 151683)
+++ trunk/Source/WebCore/ChangeLog 2013-06-18 15:16:02 UTC (rev 151684)
@@ -1,3 +1,16 @@
+2013-06-18 Santosh Mahto <[email protected]>
+
+ <video> element delays document load event for ~ 3 seconds
+ https://bugs.webkit.org/show_bug.cgi?id=90272
+
+ Reviewed by Eric Carlson.
+
+ Test: media/media-preload-no-delay-loadevent.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::prepareForLoad):
+ No need to delay document load event here when preload="none"
+
2013-06-18 Diego Pino Garcia <[email protected]>
[GTK] Remove comment about possibility of handling ObjCPolymorphic (it's used by ObjC bindings only)
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (151683 => 151684)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-06-18 13:16:50 UTC (rev 151683)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-06-18 15:16:02 UTC (rev 151684)
@@ -863,7 +863,8 @@
// The spec doesn't say to block the load event until we actually run the asynchronous section
// algorithm, but do it now because we won't start that until after the timer fires and the
// event may have already fired by then.
- setShouldDelayLoadEvent(true);
+ if (m_preload != MediaPlayer::None)
+ setShouldDelayLoadEvent(true);
configureMediaControls();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes