Title: [190934] releases/WebKitGTK/webkit-2.10
Revision
190934
Author
[email protected]
Date
2015-10-13 02:03:58 -0700 (Tue, 13 Oct 2015)

Log Message

Merge r190054 - [GTK] media controls does not show up when playing video finishes.
https://bugs.webkit.org/show_bug.cgi?id=149112

Reviewed by Philippe Normand.

Source/WebCore:

GTK port does not show controls after playing video. This behavior is different
from what Mac port does. They do show controls when playing video finishes.
At least, we should update the timeline before showing it up not to show incorrect numbers
when reappearing.

Test: media/media-controls-timeline-updates-after-playing.html

* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.setPlaying):
(Controller.prototype.showControls):

LayoutTests:

* media/media-controls-timeline-updates-after-playing-expected.txt: Added.
* media/media-controls-timeline-updates-after-playing.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (190933 => 190934)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-10-13 09:02:55 UTC (rev 190933)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-10-13 09:03:58 UTC (rev 190934)
@@ -1,5 +1,15 @@
 2015-09-21  ChangSeok Oh  <[email protected]>
 
+        [GTK] media controls does not show up when playing video finishes.
+        https://bugs.webkit.org/show_bug.cgi?id=149112
+
+        Reviewed by Philippe Normand.
+
+        * media/media-controls-timeline-updates-after-playing-expected.txt: Added.
+        * media/media-controls-timeline-updates-after-playing.html: Added.
+
+2015-09-21  ChangSeok Oh  <[email protected]>
+
         [GTK] timeline is not updated after few seconds when mouse hovers on controls
         https://bugs.webkit.org/show_bug.cgi?id=149111
 

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/media/media-controls-timeline-updates-after-playing-expected.txt (0 => 190934)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/media/media-controls-timeline-updates-after-playing-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/media/media-controls-timeline-updates-after-playing-expected.txt	2015-10-13 09:03:58 UTC (rev 190934)
@@ -0,0 +1,13 @@
+This tests if media controls shows up and timeline is accordingly updated after playing the video.
+
+
+EVENT(canplaythrough)
+EXPECTED (timeLineValue() == '0') OK
+RUN(video.fastSeek(video.duration - 1))
+EVENT(seeked)
+RUN(video.play())
+EVENT(play)
+EVENT(pause)
+TEST(Math.floor(video.currentTime * 100) / 100 == timeLineValue()) OK
+END OF TEST
+

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/media/media-controls-timeline-updates-after-playing.html (0 => 190934)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/media/media-controls-timeline-updates-after-playing.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/media/media-controls-timeline-updates-after-playing.html	2015-10-13 09:03:58 UTC (rev 190934)
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<p>This tests if media controls shows up and timeline is accordingly updated after playing the video.</p>
+<video controls></video>
+<script src=""
+<script src=""
+<script src=""
+<script>
+function timeLineValue()
+{
+    var timeline = mediaControlsElement(internals.shadowRoot(video).firstChild.firstChild, '-webkit-media-controls-timeline');
+    if (!timeline)
+        throw "Failed to find -webkit-media-controls-timeline";
+
+    return timeline.value;
+}
+
+function canplaythrough()
+{
+    if (!window.testRunner) {
+        endTest();
+        return;
+    }
+
+    testExpected("timeLineValue()", 0);
+    run('video.fastSeek(video.duration - 1)');
+}
+
+function seeked()
+{
+    run("video.play()");
+}
+
+function paused()
+{
+    // timeLineValue returns a two decimal value.
+    test("Math.floor(video.currentTime * 100) / 100 == timeLineValue()");
+    endTest();
+}
+
+var video;
+findMediaElement();
+video.src = "" "content/test");
+
+waitForEvent("canplaythrough", canplaythrough);
+waitForEvent("seeked", seeked);
+waitForEvent("play");
+waitForEvent("pause", paused);
+waitForEventAndFail("error");
+</script>

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (190933 => 190934)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2015-10-13 09:02:55 UTC (rev 190933)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2015-10-13 09:03:58 UTC (rev 190934)
@@ -1,5 +1,23 @@
 2015-09-21  ChangSeok Oh  <[email protected]>
 
+        [GTK] media controls does not show up when playing video finishes.
+        https://bugs.webkit.org/show_bug.cgi?id=149112
+
+        Reviewed by Philippe Normand.
+
+        GTK port does not show controls after playing video. This behavior is different
+        from what Mac port does. They do show controls when playing video finishes.
+        At least, we should update the timeline before showing it up not to show incorrect numbers
+        when reappearing.
+
+        Test: media/media-controls-timeline-updates-after-playing.html
+
+        * Modules/mediacontrols/mediaControlsBase.js:
+        (Controller.prototype.setPlaying):
+        (Controller.prototype.showControls):
+
+2015-09-21  ChangSeok Oh  <[email protected]>
+
         [GTK] timeline is not updated after few seconds when mouse hovers on controls
         https://bugs.webkit.org/show_bug.cgi?id=149111
 

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js (190933 => 190934)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js	2015-10-13 09:02:55 UTC (rev 190933)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js	2015-10-13 09:03:58 UTC (rev 190934)
@@ -998,6 +998,7 @@
             this.controls.panel.classList.add(this.ClassNames.paused);
             this.controls.playButton.classList.add(this.ClassNames.paused);
             this.controls.playButton.setAttribute('aria-label', this.UIString('Play'));
+            this.showControls();
         } else {
             this.controls.panel.classList.remove(this.ClassNames.paused);
             this.controls.playButton.classList.remove(this.ClassNames.paused);
@@ -1013,6 +1014,7 @@
         this.controls.panel.classList.add(this.ClassNames.show);
         this.controls.panel.classList.remove(this.ClassNames.hidden);
 
+        this.updateTime();
         this.setNeedsTimelineMetricsUpdate();
     },
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to