Diff
Modified: trunk/LayoutTests/ChangeLog (190159 => 190160)
--- trunk/LayoutTests/ChangeLog 2015-09-23 11:03:08 UTC (rev 190159)
+++ trunk/LayoutTests/ChangeLog 2015-09-23 11:07:15 UTC (rev 190160)
@@ -1,3 +1,16 @@
+2015-09-23 ChangSeok Oh <changseok...@collabora.com>
+
+ [GTK] playbutton in media controls is not changed when it is clicked.
+ https://bugs.webkit.org/show_bug.cgi?id=149113
+
+ Reviewed by Philippe Normand.
+
+ * media/media-controls-play-button-updates-expected.png: Added.
+ * media/media-controls-play-button-updates-expected.txt: Added.
+ * media/media-controls-play-button-updates.html: Added.
+ * platform/gtk/media/media-controls-play-button-updates-expected.png: Added.
+ * platform/gtk/media/media-controls-play-button-updates-expected.txt: Added.
+
2015-09-23 Xabier Rodriguez Calvar <calva...@igalia.com>
[Streams API] Add bad strategies writable streams tests
Added: trunk/LayoutTests/media/media-controls-play-button-updates-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/media/media-controls-play-button-updates-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/media/media-controls-play-button-updates-expected.txt (0 => 190160)
--- trunk/LayoutTests/media/media-controls-play-button-updates-expected.txt (rev 0)
+++ trunk/LayoutTests/media/media-controls-play-button-updates-expected.txt 2015-09-23 11:07:15 UTC (rev 190160)
@@ -0,0 +1,64 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x356
+ RenderBlock {HTML} at (0,0) size 800x356
+ RenderBody {BODY} at (8,16) size 784x332
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 548x18
+ text run at (0,0) width 548: "This tests if media controls play button is properly updated accroding to mouse clicks"
+ RenderBlock (anonymous) at (0,34) size 784x244
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (0,278) size 784x54
+ RenderText {#text} at (0,0) size 163x18
+ text run at (0,0) width 163: "EVENT(canplaythrough)"
+ RenderBR {BR} at (162,0) size 1x18
+ RenderText {#text} at (0,18) size 112x18
+ text run at (0,18) width 112: "EVENT(playing)"
+ RenderBR {BR} at (111,18) size 1x18
+ RenderText {#text} at (0,36) size 100x18
+ text run at (0,36) width 100: "EVENT(pause)"
+ RenderBR {BR} at (99,36) size 1x18
+layer at (8,50) size 320x240 isolatesBlending
+ RenderVideo {VIDEO} at (0,0) size 320x240
+layer at (8,50) size 320x240
+ RenderFlexibleBox {DIV} at (0,0) size 320x240
+layer at (8,245) size 320x45
+ RenderFlexibleBox {DIV} at (0,195) size 320x45
+layer at (8,245) size 320x45 isolatesBlending
+ RenderBlock (positioned) {DIV} at (0,0) size 320x45
+layer at (8,245) size 320x45
+ RenderBlock (positioned) {DIV} at (0,0) size 320x45 [bgcolor=#1E1E1E73]
+layer at (8,245) size 320x45 blendMode: lighten
+ RenderBlock (positioned) {DIV} at (0,0) size 320x45 [bgcolor=#292929]
+layer at (16,270) size 12x15 blendMode: plus-lighter
+ RenderButton {BUTTON} at (8,25) size 12x15 [color=#FFFFFF]
+layer at (44,270) size 16x15 blendMode: plus-lighter
+ RenderButton {BUTTON} at (36,24) size 16x16 [color=#FFFFFF]
+layer at (68,269) size 234x17
+ RenderFlexibleBox {DIV} at (60,24) size 234x17
+layer at (76,271) size 32x13 blendMode: plus-lighter
+ RenderFlexibleBox {DIV} at (8,2) size 32x13 [color=#FFFFFF]
+ RenderBlock (anonymous) at (0,0) size 32x13
+ RenderText {#text} at (0,0) size 32x13
+ text run at (0,0) width 32: "00:00"
+layer at (118,269) size 129x17
+ RenderFlexibleBox {DIV} at (50,0) size 129x17
+layer at (118,269) size 129x17 blendMode: plus-lighter
+ RenderSlider {INPUT} at (0,0) size 129x17 [color=#909090]
+ RenderFlexibleBox {DIV} at (0,0) size 129x17
+ RenderBlock {DIV} at (0,1) size 129x15
+ RenderBlock {DIV} at (0,0) size 3x15
+layer at (257,271) size 37x13 scrollWidth 38 blendMode: plus-lighter
+ RenderFlexibleBox {DIV} at (189,2) size 37x13 [color=#FFFFFF]
+ RenderBlock (anonymous) at (0,0) size 38x13
+ RenderText {#text} at (0,0) size 38x13
+ text run at (0,0) width 38: "-00:06"
+layer at (310,265) size 14x25
+ RenderFlexibleBox {DIV} at (302,20) size 14x25
+layer at (310,270) size 14x15 blendMode: plus-lighter
+ RenderButton {BUTTON} at (0,5) size 14x15 [color=#FFFFFF]
+layer at (340,270) size 14x15 blendMode: plus-lighter
+ RenderButton {BUTTON} at (332,25) size 14x15 [color=#FFFFFF]
Added: trunk/LayoutTests/media/media-controls-play-button-updates.html (0 => 190160)
--- trunk/LayoutTests/media/media-controls-play-button-updates.html (rev 0)
+++ trunk/LayoutTests/media/media-controls-play-button-updates.html 2015-09-23 11:07:15 UTC (rev 190160)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<p>This tests if media controls play button is properly updated accroding to mouse clicks</p>
+<video controls></video>
+<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 click()
+{
+ if (!window.testRunner)
+ return;
+
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+function canplaythrough()
+{
+ if (!window.testRunner)
+ return;
+
+ window.testRunner.waitUntilDone();
+
+ var playButtonCoords;
+ try {
+ playButtonCoords = mediaControlsButtonCoordinates(video, "play-button");
+ } catch (exception) {
+ window.testRunner.notifyDone();
+ return;
+ }
+
+ eventSender.mouseMoveTo(playButtonCoords[0], playButtonCoords[1]);
+ setTimeout(click, 0);
+}
+
+function pause()
+{
+ if (!window.testRunner)
+ return;
+
+ window.testRunner.notifyDone();
+}
+
+function playing()
+{
+ setTimeout(click, 0);
+}
+
+var video;
+var requirePixelDump = true;
+
+_onload_ = function() {
+ findMediaElement();
+ video.src = "" "content/test");
+
+ waitForEvent("canplaythrough", canplaythrough);
+ waitForEvent("playing", playing);
+ waitForEvent("pause", pause);
+ waitForEventAndFail("error");
+}
+</script>
+<script src=""
Added: trunk/LayoutTests/platform/gtk/media/media-controls-play-button-updates-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/gtk/media/media-controls-play-button-updates-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/platform/gtk/media/media-controls-play-button-updates-expected.txt (0 => 190160)
--- trunk/LayoutTests/platform/gtk/media/media-controls-play-button-updates-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/gtk/media/media-controls-play-button-updates-expected.txt 2015-09-23 11:07:15 UTC (rev 190160)
@@ -0,0 +1,41 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x351
+ RenderBlock {HTML} at (0,0) size 800x351
+ RenderBody {BODY} at (8,16) size 784x327
+ RenderBlock {P} at (0,0) size 784x17
+ RenderText {#text} at (0,0) size 535x17
+ text run at (0,0) width 535: "This tests if media controls play button is properly updated accroding to mouse clicks"
+ RenderBlock (anonymous) at (0,33) size 784x243
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (0,276) size 784x51
+ RenderText {#text} at (0,0) size 162x17
+ text run at (0,0) width 162: "EVENT(canplaythrough)"
+ RenderBR {BR} at (162,0) size 0x17
+ RenderText {#text} at (0,17) size 111x17
+ text run at (0,17) width 111: "EVENT(playing)"
+ RenderBR {BR} at (111,17) size 0x17
+ RenderText {#text} at (0,34) size 100x17
+ text run at (0,34) width 100: "EVENT(pause)"
+ RenderBR {BR} at (100,34) size 0x17
+layer at (8,49) size 320x240
+ RenderVideo {VIDEO} at (0,0) size 320x240
+layer at (8,49) size 320x240
+ RenderFlexibleBox {DIV} at (0,0) size 320x240
+ RenderBlock {DIV} at (0,200) size 320x40
+layer at (13,254) size 310x30
+ RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC]
+ RenderButton {BUTTON} at (9,0) size 30x30
+ RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659]
+ RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)]
+ RenderBlock {DIV} at (1,-2) size 105x12
+ RenderBlock {DIV} at (-7,0) size 13x12 [color=#FFFFFF]
+ RenderBlock {DIV} at (157,0) size 74x30 [color=#FFFFFF]
+ RenderText {#text} at (0,7) size 74x15
+ text run at (0,7) width 74: "00:00 / 00:06"
+ RenderButton {BUTTON} at (239,0) size 30x30
+ RenderFlexibleBox {DIV} at (271,0) size 30x30
+ RenderButton {BUTTON} at (0,0) size 30x30
Modified: trunk/Source/WebCore/ChangeLog (190159 => 190160)
--- trunk/Source/WebCore/ChangeLog 2015-09-23 11:03:08 UTC (rev 190159)
+++ trunk/Source/WebCore/ChangeLog 2015-09-23 11:07:15 UTC (rev 190160)
@@ -1,3 +1,24 @@
+2015-09-23 ChangSeok Oh <changseok...@collabora.com>
+
+ [GTK] playbutton in media controls is not changed when it is clicked.
+ https://bugs.webkit.org/show_bug.cgi?id=149113
+
+ Reviewed by Philippe Normand.
+
+ When the play button in media controls is clicked, a 'paused' class is added or removed
+ for the element to update its appearance. Although Document::recalcStyle is triggered
+ by that class attribute change, the play button is not changed since there is
+ no difference in styles whether having the 'paused' class or not. Gtk port
+ does not define the -webkit-media-controls-play-button.paused. To fix this,
+ -webkit-media-controls-play-button.paused is newly defined with a dummy style,
+ "position: relative;", which should not change the play button appearance,
+ but be clearly different in style.
+
+ Test: media/media-controls-play-button-updates.html
+
+ * css/mediaControlsGtk.css:
+ (video::-webkit-media-controls-play-button.paused):
+
2015-09-23 Youenn Fablet <youenn.fab...@crf.canon.fr>
[Streams API] Implement ReadableStream pipeThrough
Modified: trunk/Source/WebCore/css/mediaControlsGtk.css (190159 => 190160)
--- trunk/Source/WebCore/css/mediaControlsGtk.css 2015-09-23 11:03:08 UTC (rev 190159)
+++ trunk/Source/WebCore/css/mediaControlsGtk.css 2015-09-23 11:07:15 UTC (rev 190160)
@@ -145,6 +145,12 @@
outline: none;
}
+/* paused classes for audio/video controls should be defined to make a difference in style from not having this class. Overwise a repaint would not happen. */
+audio::-webkit-media-controls-play-button.paused,
+video::-webkit-media-controls-play-button.paused {
+ position: relative;
+}
+
audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display {
-webkit-appearance: media-current-time-display;