<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164024] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164024">164024</a></dd>
<dt>Author</dt> <dd>calvaris@igalia.com</dd>
<dt>Date</dt> <dd>2014-02-13 03:28:34 -0800 (Thu, 13 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] MEDIA_CONTROLS_SCRIPT support
https://bugs.webkit.org/show_bug.cgi?id=123097
Reviewed by Jer Noble.
.:
Part of the Autotools and CMake structure to build the media
controls script.
* Source/autotools/SetupWebKitFeatures.m4: Activated the media
controls script by default.
* Source/cmake/OptionsGTK.cmake: Activated the media controls
script by default.
* Source/cmake/WebKitFeatures.cmake: Created the option to
activate the controls script.
* Source/cmakeconfig.h.cmake: Created the define template the the
media controls script.
Source/WebCore:
WebKitGTK+ multimedia controls are now managed from Javascript
code. Apple controls are kept as common code and GTK+ ones are
subclassed for the specific behavior.
Both CMake and Autotools build support is provided.
* CMakeLists.txt: Added support to build the media controls
script and their associated files.
* GNUmakefile.am: Added support to generate the C++ code from the
Javascript.
* GNUmakefile.list.am: Added the media controls script associated
files.
* Modules/mediacontrols/MediaControlsHost.cpp:
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
(WebCore::MediaControlsHost::supportsFullscreen): Added attribute
to know if the element supports fullscreen.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleWrapperMouseMove):
(Controller.prototype.handleWrapperMouseOut):
(Controller.prototype.updatePlaying): Use clear and
resetHideControlsTimer.
(Controller.prototype.clearHideControlsTimer): Added.
(Controller.prototype.resetHideControlsTimer): Added.
* Modules/mediacontrols/mediaControlsGtk.js: Added.
(createControls): Calls ControllerGtk.
(ControllerGtk): Calls the superclass.
(contains): Defines a function to know if an object is contained
in an array.
(ControllerGtk.prototype.inheritFrom): Copies the method of the
superclass that are not reimplemented in the subclass.
(ControllerGtk.prototype.createControls): Calls the superclass and
create the remaining needed elements.
(ControllerGtk.prototype.configureInlineControls): Configures the
controls.
(ControllerGtk.prototype.setStatusHidden): Redefined empty.
(ControllerGtk.prototype.updateTime): Writes the duration and
current position. As it was so far, current time also includes
duration. If current time is bigger than 0 we show that.
(ControllerGtk.prototype.showCurrentTime): Shows current time and
hides duration label (that is included in current time).
(ControllerGtk.prototype.handlePlay): Calls the superclass and
force showing the current time.
(ControllerGtk.prototype.handleTimeUpdate): Always update the
time.
(ControllerGtk.prototype.handleMuteButtonMouseOver): Shows the
volume slider.
(ControllerGtk.prototype.handleVolumeBoxMouseOut): Hides the
volume slider.
(ControllerGtk.prototype.addControls): Adds the enclosure instead
of the panel directly. Panel is, of course, part of the enclosure.
(ControllerGtk.prototype.updateReadyState): Shows the fullscreen
button only if fullscreen is supported. Sets the volume in up or
down mode depending on its position in the document. Updates the
volume.
(ControllerGtk.prototype.setControlsType): Creates the controls it
they were not created before. Unlike Apple ones, WebKitGTK+
fullscreen and inline controls are the same.
(ControllerGtk.prototype.updatePlaying): Calls the superclass and
shows the controls if not playing.
(ControllerGtk.prototype.handleCaptionButtonClicked): Redefined
empty. To be coherent with volume, that also shows a popup, this
is handled with mouseover instead of click.
(ControllerGtk.prototype.buildCaptionMenu): Calls the superclass
to build the menu, sets some listeners, centers the popup with the
captions button, keeps the current height and sets the style to 0,
which is needed to animate it.
(ControllerGtk.prototype.destroyCaptionMenu): Hides the caption menu.
(ControllerGtk.prototype.showCaptionMenu): Resets the height to
its original. We don't animate it with CSS because we would need
to specify a height in the style and we don't know it in advance.
(ControllerGtk.prototype.hideCaptionMenu): Sets height to 0.
(ControllerGtk.prototype.captionMenuTransitionEnd): When the
captions menu transtition ends, it is destroyed.
(ControllerGtk.prototype.handleCaptionButtonMouseOver): Creates
the caption menu and shows it.
(ControllerGtk.prototype.handleCaptionButtonMouseOut): Hides the
captions menu.
(ControllerGtk.prototype.handleCaptionMouseOut): Hides the
captions menu.
* PlatformGTK.cmake: Added WebCore to the target link libraries
and initialized the variables needed at CMakelists.txt
* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-panel)
(video::-webkit-media-controls-panel): Added transtion based on opacity.
(video::-webkit-media-controls-panel): Set video opacity to 0.
(video::-webkit-media-controls-panel.paused): Set video opacity to 1.
(audio::-webkit-media-controls-panel div.mute-box): Set the same
style as the mute button to preserve the layout.
(audio::-webkit-media-controls-panel div.mute-box.hidden): Sets
the display to none.
(audio::-webkit-media-controls-mute-button)
(video::-webkit-media-controls-mute-button): Removed the outline
and the margin that is managed by the mute box now.
(audio::-webkit-media-controls-play-button)
(video::-webkit-media-controls-play-button): Removed the outline.
(audio::-webkit-media-controls-time-remaining-display)
(video::-webkit-media-controls-time-remaining-display): Removed
the display.
(audio::-webkit-media-controls-current-time-display)
(video::-webkit-media-controls-current-time-display): Added the
display block.
(video::-webkit-media-controls-time-remaining-display): Set
display none.
(video::-webkit-media-controls-time-remaining-display.show): Set
display block.
(video::-webkit-media-controls-time-remaining-display.hidden): Set
display none.
(audio::-webkit-media-controls-timeline)
(video::-webkit-media-controls-timeline): Removed outline.
(audio::-webkit-media-controls-volume-slider-container)
(video::-webkit-media-controls-volume-slider-container): Set
overflow hidden and set a transition by height.
(video::-webkit-media-controls-volume-slider-container.hidden):
Set height 0.
(video::-webkit-media-controls-volume-slider-container.down): Set
bottom to be below the panel. Changed the border radius and
transition accordingly.
(video::-webkit-media-controls-panel .hidden.down): Sets default
bottom as 0.
(audio::-webkit-media-controls-volume-slider)
(video::-webkit-media-controls-volume-slider): Removed the outline.
(audio::-webkit-media-controls-toggle-closed-captions-button)
(video::-webkit-media-controls-toggle-closed-captions-button):
Removed the background that is painted from C++ and removed the
outline.
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-container h3):
(video::-webkit-media-controls-closed-captions-container ul):
(video::-webkit-media-controls-closed-captions-container li):
(video::-webkit-media-controls-closed-captions-container li.selected): Changed
the style to make it more coherent with the rest of the controls.
(audio::-webkit-media-controls-fullscreen-button)
(video::-webkit-media-controls-fullscreen-button): Removed the outline.
(audio::-webkit-media-controls-panel button.hidden): Sets the
display to none.
* html/HTMLMediaElement.cpp: UserAgentScripts.h is not needed here
and build cmake build would need for changes to get this compiled.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::nodeHasPseudo): Added. Checks if a node has a certain
pseudo.
(WebCore::nodeHasClass): Added. Checks if a node has a certain
class.
(WebCore::supportsFocus): Removed some element types as outline is
now handled in CSS.
(WebCore::RenderThemeGtk::paintMediaPlayButton): Checks if the
play button has the class paused to show the play icon instead of
the pause one.
(WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
Added. Paints the captions icon.
(WebCore::RenderThemeGtk::mediaControlsScript): Added. Loads the
bundled scripts.
* platform/gtk/RenderThemeGtk.h: Added the mediaControlsScript
method and declared the redefinition of the method to play the
captions icon.
LayoutTests:
Tests infrastructure for the media controls script.
* media/click-volume-bar-not-pausing.html:
* media/media-volume-slider-rendered-normal.html:
* media/video-controls-captions-trackmenu-hide-on-click-outside.html:
* media/video-volume-slider.html: Fixed.
* platform/gtk-wk2/TestExpectations: Tests flagged.
* platform/gtk/TestExpectations: Changed tests flags.
* platform/gtk/accessibility/media-element-expected.txt:
* platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/gtk/fast/layers/video-layer-expected.txt: Rebaseline.
* platform/gtk/fullscreen/video-controls-override-expected.txt: Added.
* platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png:
* platform/gtk/media/audio-controls-rendering-expected.png:
* platform/gtk/media/audio-controls-rendering-expected.txt:
* platform/gtk/media/audio-repaint-expected.txt:
* platform/gtk/media/controls-after-reload-expected.png:
* platform/gtk/media/controls-after-reload-expected.txt:
* platform/gtk/media/controls-strict-expected.png:
* platform/gtk/media/controls-strict-expected.txt:
* platform/gtk/media/controls-styling-strict-expected.png:
* platform/gtk/media/controls-styling-strict-expected.txt:
* platform/gtk/media/controls-without-preload-expected.png:
* platform/gtk/media/controls-without-preload-expected.txt:
* platform/gtk/media/video-controls-rendering-expected.png:
* platform/gtk/media/video-controls-rendering-expected.txt:
* platform/gtk/media/video-display-toggle-expected.png:
* platform/gtk/media/video-display-toggle-expected.txt:
* platform/gtk/media/video-empty-source-expected.txt:
* platform/gtk/media/video-no-audio-expected.png:
* platform/gtk/media/video-no-audio-expected.txt:
* platform/gtk/media/video-volume-slider-expected.png:
* platform/gtk/media/video-volume-slider-expected.txt:
* platform/gtk/media/video-zoom-controls-expected.png:
* platform/gtk/media/video-zoom-controls-expected.txt:
Rebaseline.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediaclickvolumebarnotpausinghtml">trunk/LayoutTests/media/click-volume-bar-not-pausing.html</a></li>
<li><a href="#trunkLayoutTestsmediamediavolumesliderrenderednormalhtml">trunk/LayoutTests/media/media-volume-slider-rendered-normal.html</a></li>
<li><a href="#trunkLayoutTestsmediavideocontrolscaptionstrackmenuhideonclickoutsidehtml">trunk/LayoutTests/media/video-controls-captions-trackmenu-hide-on-click-outside.html</a></li>
<li><a href="#trunkLayoutTestsmediavideovolumesliderhtml">trunk/LayoutTests/media/video-volume-slider.html</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitymediaelementexpectedtxt">trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkfasthidpivideocontrolsinhidpiexpectedtxt">trunk/LayoutTests/platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkfastlayersvideolayerexpectedtxt">trunk/LayoutTests/platform/gtk/fast/layers/video-layer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkhttptestsmediavideobufferedrangecontainscurrentTimeexpectedpng">trunk/LayoutTests/platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediaaudiocontrolsrenderingexpectedpng">trunk/LayoutTests/platform/gtk/media/audio-controls-rendering-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediaaudiocontrolsrenderingexpectedtxt">trunk/LayoutTests/platform/gtk/media/audio-controls-rendering-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediaaudiorepaintexpectedtxt">trunk/LayoutTests/platform/gtk/media/audio-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolsafterreloadexpectedpng">trunk/LayoutTests/platform/gtk/media/controls-after-reload-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolsafterreloadexpectedtxt">trunk/LayoutTests/platform/gtk/media/controls-after-reload-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolsstrictexpectedpng">trunk/LayoutTests/platform/gtk/media/controls-strict-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolsstrictexpectedtxt">trunk/LayoutTests/platform/gtk/media/controls-strict-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolsstylingstrictexpectedpng">trunk/LayoutTests/platform/gtk/media/controls-styling-strict-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolsstylingstrictexpectedtxt">trunk/LayoutTests/platform/gtk/media/controls-styling-strict-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolswithoutpreloadexpectedpng">trunk/LayoutTests/platform/gtk/media/controls-without-preload-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediacontrolswithoutpreloadexpectedtxt">trunk/LayoutTests/platform/gtk/media/controls-without-preload-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideocontrolsrenderingexpectedpng">trunk/LayoutTests/platform/gtk/media/video-controls-rendering-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideocontrolsrenderingexpectedtxt">trunk/LayoutTests/platform/gtk/media/video-controls-rendering-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideodisplaytoggleexpectedpng">trunk/LayoutTests/platform/gtk/media/video-display-toggle-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideodisplaytoggleexpectedtxt">trunk/LayoutTests/platform/gtk/media/video-display-toggle-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideoemptysourceexpectedtxt">trunk/LayoutTests/platform/gtk/media/video-empty-source-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideonoaudioexpectedpng">trunk/LayoutTests/platform/gtk/media/video-no-audio-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideonoaudioexpectedtxt">trunk/LayoutTests/platform/gtk/media/video-no-audio-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideovolumesliderexpectedpng">trunk/LayoutTests/platform/gtk/media/video-volume-slider-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideovolumesliderexpectedtxt">trunk/LayoutTests/platform/gtk/media/video-volume-slider-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideozoomcontrolsexpectedpng">trunk/LayoutTests/platform/gtk/media/video-zoom-controls-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmediavideozoomcontrolsexpectedtxt">trunk/LayoutTests/platform/gtk/media/video-zoom-controls-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkwk2TestExpectations">trunk/LayoutTests/platform/gtk-wk2/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefileam">trunk/Source/WebCore/GNUmakefile.am</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsMediaControlsHostcpp">trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsMediaControlsHosth">trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsMediaControlsHostidl">trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCorecssmediaControlsGtkcss">trunk/Source/WebCore/css/mediaControlsGtk.css</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkRenderThemeGtkcpp">trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkRenderThemeGtkh">trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h</a></li>
<li><a href="#trunkSourceautotoolsSetupWebKitFeaturesm4">trunk/Source/autotools/SetupWebKitFeatures.m4</a></li>
<li><a href="#trunkSourcecmakeOptionsGTKcmake">trunk/Source/cmake/OptionsGTK.cmake</a></li>
<li><a href="#trunkSourcecmakeWebKitFeaturescmake">trunk/Source/cmake/WebKitFeatures.cmake</a></li>
<li><a href="#trunkSourcecmakeconfighcmake">trunk/Source/cmakeconfig.h.cmake</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformgtkfullscreenvideocontrolsoverrideexpectedtxt">trunk/LayoutTests/platform/gtk/fullscreen/video-controls-override-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsGtkjs">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/ChangeLog        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-02-13 Xabier Rodriguez Calvar <calvaris@igalia.com>
+
+ [GTK] MEDIA_CONTROLS_SCRIPT support
+ https://bugs.webkit.org/show_bug.cgi?id=123097
+
+ Reviewed by Jer Noble.
+
+ Part of the Autotools and CMake structure to build the media
+ controls script.
+
+ * Source/autotools/SetupWebKitFeatures.m4: Activated the media
+ controls script by default.
+ * Source/cmake/OptionsGTK.cmake: Activated the media controls
+ script by default.
+ * Source/cmake/WebKitFeatures.cmake: Created the option to
+ activate the controls script.
+ * Source/cmakeconfig.h.cmake: Created the define template the the
+ media controls script.
+
</ins><span class="cx"> 2014-02-12 Zan Dobersek <zdobersek@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GDB] Add .gdbinit to the list of files ignored by Git
</span></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/ChangeLog        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2014-02-13 Xabier Rodriguez Calvar <calvaris@igalia.com>
+
+ [GTK] MEDIA_CONTROLS_SCRIPT support
+ https://bugs.webkit.org/show_bug.cgi?id=123097
+
+ Reviewed by Jer Noble.
+
+ Tests infrastructure for the media controls script.
+
+ * media/click-volume-bar-not-pausing.html:
+ * media/media-volume-slider-rendered-normal.html:
+ * media/video-controls-captions-trackmenu-hide-on-click-outside.html:
+ * media/video-volume-slider.html: Fixed.
+ * platform/gtk-wk2/TestExpectations: Tests flagged.
+ * platform/gtk/TestExpectations: Changed tests flags.
+ * platform/gtk/accessibility/media-element-expected.txt:
+ * platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt:
+ * platform/gtk/fast/layers/video-layer-expected.txt: Rebaseline.
+ * platform/gtk/fullscreen/video-controls-override-expected.txt: Added.
+ * platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png:
+ * platform/gtk/media/audio-controls-rendering-expected.png:
+ * platform/gtk/media/audio-controls-rendering-expected.txt:
+ * platform/gtk/media/audio-repaint-expected.txt:
+ * platform/gtk/media/controls-after-reload-expected.png:
+ * platform/gtk/media/controls-after-reload-expected.txt:
+ * platform/gtk/media/controls-strict-expected.png:
+ * platform/gtk/media/controls-strict-expected.txt:
+ * platform/gtk/media/controls-styling-strict-expected.png:
+ * platform/gtk/media/controls-styling-strict-expected.txt:
+ * platform/gtk/media/controls-without-preload-expected.png:
+ * platform/gtk/media/controls-without-preload-expected.txt:
+ * platform/gtk/media/video-controls-rendering-expected.png:
+ * platform/gtk/media/video-controls-rendering-expected.txt:
+ * platform/gtk/media/video-display-toggle-expected.png:
+ * platform/gtk/media/video-display-toggle-expected.txt:
+ * platform/gtk/media/video-empty-source-expected.txt:
+ * platform/gtk/media/video-no-audio-expected.png:
+ * platform/gtk/media/video-no-audio-expected.txt:
+ * platform/gtk/media/video-volume-slider-expected.png:
+ * platform/gtk/media/video-volume-slider-expected.txt:
+ * platform/gtk/media/video-zoom-controls-expected.png:
+ * platform/gtk/media/video-zoom-controls-expected.txt:
+ Rebaseline.
+
</ins><span class="cx"> 2014-02-12 Ryosuke Niwa <rniwa@webkit.org>
</span><span class="cx">
</span><span class="cx"> Another Windows test expectations update.
</span></span></pre></div>
<a id="trunkLayoutTestsmediaclickvolumebarnotpausinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/click-volume-bar-not-pausing.html (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/click-volume-bar-not-pausing.html        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/media/click-volume-bar-not-pausing.html        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -70,6 +70,10 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ internals.suspendAnimations(); // Volumebar can be animated and we would need a timeout to have it shown.
+
+ mediaElement.volume = 1;
+
</ins><span class="cx"> waitForEventAndFail("error");
</span><span class="cx"> waitForEventOnce('playing', playing);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediavolumesliderrenderednormalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-volume-slider-rendered-normal.html (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-volume-slider-rendered-normal.html        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/media/media-volume-slider-rendered-normal.html        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -17,6 +17,7 @@
</span><span class="cx">
</span><span class="cx"> function init()
</span><span class="cx"> {
</span><ins>+ internals.suspendAnimations(); // Volumebar can be animated and we would need a timeout to have it shown.
</ins><span class="cx"> video = document.getElementsByTagName("video")[0];
</span><span class="cx"> video.src = findMediaFile("video", "content/test");
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideocontrolscaptionstrackmenuhideonclickoutsidehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu-hide-on-click-outside.html (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-controls-captions-trackmenu-hide-on-click-outside.html        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu-hide-on-click-outside.html        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -44,6 +44,8 @@
</span><span class="cx"> findMediaElement();
</span><span class="cx"> video.src = findMediaFile('video', 'content/test');
</span><span class="cx"> waitForEvent('canplaythrough', function () { startTrackMenuTest(startTest); });
</span><ins>+
+ internals.suspendAnimations(); // Captions menu can be animated and allowing the animation can create flakyness.
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> </head>
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideovolumesliderhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-volume-slider.html (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-volume-slider.html        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/media/video-volume-slider.html        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -11,6 +11,8 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="cx">
</span><ins>+ internals.suspendAnimations(); // Volumebar can be animated and we would need a timeout to have it shown.
+
</ins><span class="cx"> video = document.getElementsByTagName("video")[0];
</span><span class="cx"> video.src = findMediaFile("video", "content/test");
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -441,9 +441,7 @@
</span><span class="cx"> webkit.org/b/107818 media/controls-styling.html [ Failure ]
</span><span class="cx">
</span><span class="cx"> # New chromium based controls
</span><del>-webkit.org/b/107825 fullscreen/video-controls-drag.html [ Failure ]
</del><span class="cx"> webkit.org/b/107825 media/audio-delete-while-step-button-clicked.html [ Failure ]
</span><del>-webkit.org/b/107825 media/media-volume-slider-rendered-below.html [ Failure ]
</del><span class="cx"> webkit.org/b/107825 media/nodesFromRect-shadowContent.html [ Failure ]
</span><span class="cx"> webkit.org/b/107825 media/video-controls-fullscreen-volume.html [ Failure ]
</span><span class="cx"> webkit.org/b/107825 media/media-controls-clone.html [ Failure ]
</span><span class="lines">@@ -993,7 +991,7 @@
</span><span class="cx"> webkit.org/b/44478 fast/text/hyphen-min-preferred-width.html [ Skip ]
</span><span class="cx">
</span><span class="cx"> # GTK is moving from toggle button to a menu of tracks.
</span><del>-webkit.org/b/101670 media/video-controls-captions-trackmenu.html [ Failure ]
</del><ins>+webkit.org/b/101670 media/video-controls-captions-trackmenu.html [ Timeout Failure ]
</ins><span class="cx"> webkit.org/b/101670 media/track/track-user-preferences.html [ Failure ]
</span><span class="cx"> webkit.org/b/101670 media/video-controls-captions-trackmenu-includes-enabled-track.html [ Failure ]
</span><span class="cx">
</span><span class="lines">@@ -1484,7 +1482,7 @@
</span><span class="cx"> webkit.org/b/124507 fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink.html [ ImageOnlyFailure ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/124509 media/video-controls-captions-trackmenu-hide-on-click-outside.html [ Failure ]
</span><del>-webkit.org/b/124509 media/video-controls-captions-trackmenu-hide-on-click.html [ Failure ]
</del><ins>+webkit.org/b/124509 media/video-controls-captions-trackmenu-hide-on-click.html [ Timeout Failure ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/124566 fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml [ Failure ]
</span><span class="cx">
</span><span class="lines">@@ -1515,8 +1513,6 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/126519 inspector-protocol/model/highlight-shape-outside-margin.html [ Failure ]
</span><span class="cx">
</span><del>-webkit.org/b/126520 media/click-volume-bar-not-pausing.html [ Failure ]
-
</del><span class="cx"> webkit.org/b/126521 accessibility/menu-list-sends-change-notification.html [ Failure ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/126619 http/tests/media/video-auth.html [ Failure ]
</span><span class="lines">@@ -1547,6 +1543,11 @@
</span><span class="cx"> webkit.org/b/128061 tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
</span><span class="cx"> # End of subpixel failures.
</span><span class="cx">
</span><ins>+# After webkit.org/b/123097 we flag these tests that also fail in mac
+webkit.org/b/123097 media/track/track-cue-mutable-text.html [ Failure ]
+webkit.org/b/123097 media/video-controls-captions-trackmenu-sorted.html [ Failure ]
+webkit.org/b/123097 media/video-controls-toggling.html [ Timeout ]
+
</ins><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # End of Tests failing
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitymediaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -9,28 +9,32 @@
</span><span class="cx"> role: AXRole: AXEmbedded
</span><span class="cx">
</span><span class="cx">
</span><del>- description: AXDescription: video playback
</del><ins>+ description: AXDescription: Video Playback
</ins><span class="cx"> role: AXRole: AXToolbar
</span><span class="cx">
</span><span class="cx">
</span><del>- description: AXDescription: video playback
- role: AXRole: AXToolbar
</del><ins>+ description: AXDescription: Play
+ role: AXRole: AXButton
</ins><span class="cx">
</span><span class="cx">
</span><del>- description: AXDescription: play
- role: AXRole: AXButton
</del><ins>+ description: AXDescription: Duration
+ role: AXRole: AXSlider
</ins><span class="cx">
</span><span class="cx">
</span><del>- description: AXDescription:
- role: AXRole: AXSlider
</del><ins>+ description: AXDescription: Remaining
+ role: AXRole: AXTimer
</ins><span class="cx">
</span><span class="cx">
</span><del>- description: AXDescription: enter fullscreen
- role: AXRole: AXButton
</del><ins>+ description: AXDescription: Display Full Screen
+ role: AXRole: AXButton
</ins><span class="cx">
</span><span class="cx">
</span><del>- description: AXDescription: mute
- role: AXRole: AXButton
</del><ins>+ description: AXDescription: Mute
+ role: AXRole: AXButton
</ins><span class="cx">
</span><span class="cx">
</span><ins>+ description: AXDescription: Volume
+ role: AXRole: AXSlider
</ins><span class="cx">
</span><ins>+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfasthidpivideocontrolsinhidpiexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> RenderBlock {DIV} at (0,110) size 300x40
</span><span class="cx"> layer at (13,140) size 290x30
</span><span class="cx"> RenderFlexibleBox {DIV} at (5,5) size 290x30 [bgcolor=#141414CC]
</span><del>- RenderButton {INPUT} at (9,0) size 30x30
</del><ins>+ RenderButton {BUTTON} at (9,0) size 30x30
</ins><span class="cx"> RenderSlider {INPUT} at (49,11) size 179x8 [color=#E6E6E659]
</span><span class="cx"> RenderFlexibleBox {DIV} at (0,0) size 179x8 [border: (1px solid #E6E6E659)]
</span><span class="cx"> RenderBlock {DIV} at (1,-2) size 191x12
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfastlayersvideolayerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/fast/layers/video-layer-expected.txt (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/fast/layers/video-layer-expected.txt        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/platform/gtk/fast/layers/video-layer-expected.txt        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> RenderBlock {DIV} at (0,110) size 300x40
</span><span class="cx"> layer at (64,224) size 290x30
</span><span class="cx"> RenderFlexibleBox {DIV} at (5,5) size 290x30 [bgcolor=#141414CC]
</span><del>- RenderButton {INPUT} at (9,0) size 30x30
</del><ins>+ RenderButton {BUTTON} at (9,0) size 30x30
</ins><span class="cx"> RenderSlider {INPUT} at (49,11) size 179x8 [color=#E6E6E659]
</span><span class="cx"> RenderFlexibleBox {DIV} at (0,0) size 179x8 [border: (1px solid #E6E6E659)]
</span><span class="cx"> RenderBlock {DIV} at (1,-2) size 191x12
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfullscreenvideocontrolsoverrideexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/gtk/fullscreen/video-controls-override-expected.txt (0 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/fullscreen/video-controls-override-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/gtk/fullscreen/video-controls-override-expected.txt        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+This tests that the video element's "controls" attribute is overridden in full screen mode, and that the controls are correctly hidden upon exiting full screen. Press any key to continue.
+
+
+EVENT(webkitfullscreenchange)
+EXPECTED (shadowRoot = internals.shadowRoot(video) != 'null') OK
+EXPECTED (panel = mediaControlsElement(shadowRoot.firstChild, '-webkit-media-controls-panel') != 'null') OK
+EXPECTED (internals.shadowPseudoId(panel) == '-webkit-media-controls-panel') OK
+EXPECTED (document.defaultView.getComputedStyle(panel)['display'] != 'none') OK
+EXPECTED (document.defaultView.getComputedStyle(panel)['height'] >= '20px') OK
+EVENT(webkitfullscreenchange)
+EXPECTED (document.defaultView.getComputedStyle(panel)['display'] == 'none'), OBSERVED '' FAIL
+END OF TEST
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformgtkhttptestsmediavideobufferedrangecontainscurrentTimeexpectedpng"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png (164023 => 164024)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png        2014-02-13 08:42:21 UTC (rev 164023)
+++ trunk/LayoutTests/platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png        2014-02-13 11:28:34 UTC (rev 164024)
</span><span class="lines">@@ -1,89 +1,66 @@
</span><span class="cx"> \x89PNG
</span><span class="cx">
</span><span class="cx">