Title: [195511] trunk
- Revision
- 195511
- Author
- [email protected]
- Date
- 2016-01-23 14:51:40 -0800 (Sat, 23 Jan 2016)
Log Message
[GTK] Fix media controls displaying without controls attribute
https://bugs.webkit.org/show_bug.cgi?id=152500
Media controls is not displayed without controls attribute by default
when the video element has text track. It'll be displayed on fullscreen
regardless of controls attribute.
Patch by Wonchul Lee <[email protected]> on 2016-01-23
Reviewed by Michael Catanzaro.
Source/WebCore:
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.shouldHaveControls):
(ControllerGtk.prototype.reconnectControls):
(ControllerGtk.prototype.removeControls):
(ControllerGtk.prototype.configureControls): Deleted.
LayoutTests:
* media/video-controls-no-display-with-text-track-expected.txt: Added.
* media/video-controls-no-display-with-text-track.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (195510 => 195511)
--- trunk/LayoutTests/ChangeLog 2016-01-23 10:08:26 UTC (rev 195510)
+++ trunk/LayoutTests/ChangeLog 2016-01-23 22:51:40 UTC (rev 195511)
@@ -1,3 +1,17 @@
+2016-01-23 Wonchul Lee <[email protected]>
+
+ [GTK] Fix media controls displaying without controls attribute
+ https://bugs.webkit.org/show_bug.cgi?id=152500
+
+ Media controls is not displayed without controls attribute by default
+ when the video element has text track. It'll be displayed on fullscreen
+ regardless of controls attribute.
+
+ Reviewed by Michael Catanzaro.
+
+ * media/video-controls-no-display-with-text-track-expected.txt: Added.
+ * media/video-controls-no-display-with-text-track.html: Added.
+
2016-01-23 Brady Eidson <[email protected]>
Modern IDB: Implement clearing object stores and opening cursors in the SQLite backend.
Added: trunk/LayoutTests/media/video-controls-no-display-with-text-track-expected.txt (0 => 195511)
--- trunk/LayoutTests/media/video-controls-no-display-with-text-track-expected.txt (rev 0)
+++ trunk/LayoutTests/media/video-controls-no-display-with-text-track-expected.txt 2016-01-23 22:51:40 UTC (rev 195511)
@@ -0,0 +1,12 @@
+Tests that video controls are not shown for videos with a text track when the controls attribute is not present, except when fullscreen
+
+EVENT(canplay)
+
+** Video controls should not be shown **
+EXPECTED (panel == 'null') OK
+EVENT(webkitfullscreenchange)
+
+** Video controls should be shown on fullscreen **
+EXPECTED (panel.style['display'] != 'none') OK
+END OF TEST
+
Added: trunk/LayoutTests/media/video-controls-no-display-with-text-track.html (0 => 195511)
--- trunk/LayoutTests/media/video-controls-no-display-with-text-track.html (rev 0)
+++ trunk/LayoutTests/media/video-controls-no-display-with-text-track.html 2016-01-23 22:51:40 UTC (rev 195511)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Video controls no display with text track Test</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <script>
+ var panel;
+
+ var startTest = function() {
+ findMediaElement();
+ waitForEvent(video, 'canplay', oncanplay);
+ video.src = "" 'content/test');
+ };
+
+ var _oncanplay_ = function() {
+ panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel");
+
+ consoleWrite("");
+ consoleWrite("** Video controls should not be shown **");
+ testExpected("panel", null, "==");
+
+ waitForEvent(video, 'webkitfullscreenchange', onfullscreenchange);
+ runWithKeyDown(function(){ video.webkitRequestFullscreen(); })
+ };
+
+ var _onfullscreenchange_ = function() {
+ panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel");
+
+ consoleWrite("");
+ consoleWrite("** Video controls should be shown on fullscreen **");
+
+ testExpected("panel.style['display']", 'none', "!=");
+ endTest();
+ };
+ </script>
+</head>
+<body _onload_="startTest()">
+ Tests that video controls are not shown for videos with a text track when the controls attribute is not present, except when fullscreen<br>
+ <video>
+ <track>
+ </video>
+
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (195510 => 195511)
--- trunk/Source/WebCore/ChangeLog 2016-01-23 10:08:26 UTC (rev 195510)
+++ trunk/Source/WebCore/ChangeLog 2016-01-23 22:51:40 UTC (rev 195511)
@@ -1,3 +1,19 @@
+2016-01-23 Wonchul Lee <[email protected]>
+
+ [GTK] Fix media controls displaying without controls attribute
+ https://bugs.webkit.org/show_bug.cgi?id=152500
+
+ Media controls is not displayed without controls attribute by default
+ when the video element has text track. It'll be displayed on fullscreen
+ regardless of controls attribute.
+
+ Reviewed by Michael Catanzaro.
+
+ * Modules/mediacontrols/mediaControlsGtk.js:
+ (ControllerGtk.prototype.shouldHaveControls):
+ (ControllerGtk.prototype.reconnectControls):
+ (ControllerGtk.prototype.removeControls):
+ (ControllerGtk.prototype.configureControls): Deleted.
2016-01-23 Alex Christensen <[email protected]>
Use credentials from a URL with NetworkSession like we did with ResourceHandle
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js (195510 => 195511)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js 2016-01-23 10:08:26 UTC (rev 195510)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js 2016-01-23 22:51:40 UTC (rev 195511)
@@ -54,18 +54,19 @@
this.controls.enclosure.appendChild(this.controls.panel);
},
- configureControls: function() {
- if (this.controls.configured)
- return;
-
- this.configureInlineControls();
- this.controls.configured = true;
- this.addControls();
+ shouldHaveControls: function()
+ {
+ return this.video.controls || this.isFullScreen();
},
reconnectControls: function()
{
- this.configureControls();
+ Controller.prototype.disconnectControls.apply(this, arguments);
+
+ this.configureInlineControls();
+
+ if (this.shouldHaveControls())
+ this.addControls();
},
setStatusHidden: function(hidden)
@@ -133,6 +134,13 @@
return true;
},
+ removeControls: function()
+ {
+ if (this.controls.enclosure.parentNode)
+ this.controls.enclosure.parentNode.removeChild(this.controls.enclosure);
+ this.destroyCaptionMenu();
+ },
+
addControls: function()
{
this.base.appendChild(this.controls.enclosure);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes