<!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>[218313] 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/218313">218313</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-06-14 20:36:06 -0700 (Wed, 14 Jun 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rebaseline media/modern-media-controls/media-documents
https://bugs.webkit.org/show_bug.cgi?id=173394

Patch by Antoine Quint <graouts@apple.com> on 2017-06-14
Reviewed by Dean Jackson.

Source/WebCore:

We found two issues related to media documents while rebaselining the dedicated tests.

First, we needed to expose the --inline-controls-bar-height CSS variable to <video>
elements in media documents that are actually showing an audio UI. Previously we would
only expose the variable to <audio> elements.

Also, due to webkit.org/b/173387, we would fail to identify certain media documents as
video because the videoTracks weren't set yet when the "loadedmetadata" event would be
triggered. So now we also look at the videoWidth and videoHeight properties, which should
provide accurate information in the "loadedmetadata" event handler.

* Modules/modern-media-controls/controls/media-controls.css:
(:host(audio), :host(video.media-document.audio), *):
(:host(audio), *): Deleted.
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get isAudio):

LayoutTests:

* media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt:
* media/modern-media-controls/media-documents/click-on-video-should-not-pause.html:
* media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt:
* media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsmediadocumentsclickonvideoshouldnotpauseexpectedtxt">trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsmediadocumentsclickonvideoshouldnotpausehtml">trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsmediadocumentsmediadocumentaudiomacsizingexpectedtxt">trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsmediadocumentsmediadocumentaudiomacsizinghtml">trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsmediacontrolscss">trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolsmediamediacontrollerjs">trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/ChangeLog 2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-06-14  Antoine Quint  <graouts@apple.com>
+
+        Rebaseline media/modern-media-controls/media-documents
+        https://bugs.webkit.org/show_bug.cgi?id=173394
+
+        Reviewed by Dean Jackson.
+
+        * media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt:
+        * media/modern-media-controls/media-documents/click-on-video-should-not-pause.html:
+        * media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt:
+        * media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html:
+        * platform/ios-simulator/TestExpectations:
+        * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2017-06-14  Dean Jackson  <dino@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Restrict filtered painting across cross-origin boundaries with transforms
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsmediadocumentsclickonvideoshouldnotpauseexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt       2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt  2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> PASS video.paused is false
</span><span class="cx"> 
</span><span class="cx"> Clicking on video controls
</span><del>-PASS video.paused is false
</del><ins>+PASS video.paused became false
</ins><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsmediadocumentsclickonvideoshouldnotpausehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause.html (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause.html       2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/click-on-video-should-not-pause.html  2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -30,15 +30,15 @@
</span><span class="cx">         const bounds = video.getBoundingClientRect();
</span><span class="cx">         debug("");
</span><span class="cx">         debug("Clicking on video controls");
</span><del>-        window.eventSender.mouseMoveTo(bounds.left + 5, bounds.bottom - 5);
</del><ins>+        window.eventSender.mouseMoveTo(bounds.left + 1, bounds.bottom - 1);
</ins><span class="cx">         window.eventSender.mouseDown();
</span><span class="cx">         window.eventSender.mouseUp();
</span><span class="cx"> 
</span><del>-        shouldBeFalse("video.paused");
-
-        debug("");
-        iframe.remove();
-        finishJSTest();
</del><ins>+        shouldBecomeEqual("video.paused", "false", () => {
+            debug("");
+            iframe.remove();
+            finishJSTest();
+        });
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> })();
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsmediadocumentsmediadocumentaudiomacsizingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt       2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt  2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS getComputedStyle(media).width became "650px"
</span><del>-PASS getComputedStyle(media).height is "25px"
</del><ins>+PASS getComputedStyle(media).height is "31px"
</ins><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsmediadocumentsmediadocumentaudiomacsizinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html       2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html  2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     shouldBecomeEqualToString("getComputedStyle(media).width", "650px", () => {
</span><del>-        shouldBeEqualToString("getComputedStyle(media).height", "25px");
</del><ins>+        shouldBeEqualToString("getComputedStyle(media).height", "31px");
</ins><span class="cx"> 
</span><span class="cx">         debug("");
</span><span class="cx">         iframe.remove();
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations   2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx"> media/modern-media-controls/invalid-placard [ Pass ]
</span><span class="cx"> media/modern-media-controls/layout-item [ Pass ]
</span><span class="cx"> media/modern-media-controls/layout-node [ Pass ]
</span><ins>+media/modern-media-controls/media-documents [ Pass ]
</ins><span class="cx"> media/modern-media-controls/mute-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/mute-support [ Pass ]
</span><span class="cx"> media/modern-media-controls/pip-button [ Pass ]
</span><span class="lines">@@ -119,6 +120,8 @@
</span><span class="cx"> 
</span><span class="cx"> # These tests are designed to work only on macOS
</span><span class="cx"> media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
</span><ins>+media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html [ Skip ]
+media/modern-media-controls/media-documents/media-document-video-mac-sizing.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> webkit.org/b/172965 media/track/track-cue-overlap-snap-to-lines-not-set.html [ Failure ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations  2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/LayoutTests/platform/mac/TestExpectations     2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -1562,6 +1562,7 @@
</span><span class="cx"> media/modern-media-controls/layout-node [ Pass ]
</span><span class="cx"> media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html [ Pass ]
</span><span class="cx"> media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html [ Pass ]
</span><ins>+media/modern-media-controls/media-documents [ Pass ]
</ins><span class="cx"> media/modern-media-controls/mute-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/mute-support [ Pass ]
</span><span class="cx"> media/modern-media-controls/pip-button [ Pass ]
</span><span class="lines">@@ -1584,6 +1585,9 @@
</span><span class="cx"> # These tests are iOS-specific
</span><span class="cx"> media/modern-media-controls/audio/audio-controls-styles.html [ Skip ]
</span><span class="cx"> media/modern-media-controls/placard-support/ipad [ Skip ]
</span><ins>+media/modern-media-controls/media-documents/ipad [ Skip ]
+media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html [ Skip ]
+media/modern-media-controls/media-documents/media-document-video-ios-sizing.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # These tests use Picture-in-Picture which isn't supported on El Capitan.
</span><span class="cx"> [ ElCapitan ] media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/Source/WebCore/ChangeLog      2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2017-06-14  Antoine Quint  <graouts@apple.com>
+
+        Rebaseline media/modern-media-controls/media-documents
+        https://bugs.webkit.org/show_bug.cgi?id=173394
+
+        Reviewed by Dean Jackson.
+
+        We found two issues related to media documents while rebaselining the dedicated tests.
+
+        First, we needed to expose the --inline-controls-bar-height CSS variable to <video>
+        elements in media documents that are actually showing an audio UI. Previously we would
+        only expose the variable to <audio> elements.
+
+        Also, due to webkit.org/b/173387, we would fail to identify certain media documents as
+        video because the videoTracks weren't set yet when the "loadedmetadata" event would be
+        triggered. So now we also look at the videoWidth and videoHeight properties, which should
+        provide accurate information in the "loadedmetadata" event handler.
+
+        * Modules/modern-media-controls/controls/media-controls.css:
+        (:host(audio), :host(video.media-document.audio), *):
+        (:host(audio), *): Deleted.
+        * Modules/modern-media-controls/media/media-controller.js:
+        (MediaController.prototype.get isAudio):
+
</ins><span class="cx"> 2017-06-14  Zalan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         animations-paused-in-background-page.html and animated-svg-image-removed-from-document-paused.html fail after r218284
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsmediacontrolscss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css   2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css      2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     --secondary-glyph-color: rgba(255, 255, 255, 0.55);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-:host(audio), * {
</del><ins>+:host(audio), :host(video.media-document.audio), * {
</ins><span class="cx">     /* This constant needs to stay in sync with the BottomControlsBarHeight JS constant. */
</span><span class="cx">     --inline-controls-bar-height: 31px;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolsmediamediacontrollerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js (218312 => 218313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js     2017-06-15 03:31:35 UTC (rev 218312)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js        2017-06-15 03:36:06 UTC (rev 218313)
</span><span class="lines">@@ -71,6 +71,9 @@
</span><span class="cx">         if (this.media.readyState < HTMLMediaElement.HAVE_METADATA)
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><ins>+        if (this.media.videoWidth || this.media.videoHeight)
+            return false;
+
</ins><span class="cx">         return !this.media.videoTracks.length;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>