<!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>[218241] 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/218241">218241</a></dd>
<dt>Author</dt> <dd>graouts@webkit.org</dd>
<dt>Date</dt> <dd>2017-06-13 19:44:08 -0700 (Tue, 13 Jun 2017)</dd>
</dl>

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

Reviewed by Dean Jackson.

Source/WebCore:

We make a source change to use a "placard" getter/setter to show or hide a placard, making it
more convenient to test whether a placard has been set.

* Modules/modern-media-controls/controls/inline-media-controls.js:
(InlineMediaControls.prototype.get placard):
(InlineMediaControls.prototype.set placard):
(InlineMediaControls.prototype.showPlacard): Deleted.
(InlineMediaControls.prototype.hidePlacard): Deleted.
* Modules/modern-media-controls/media/placard-support.js:
(PlacardSupport.prototype._updatePlacard):
(PlacardSupport):

LayoutTests:

We update tests to use the new "placard" property rather than "showsPlacard" which this patch removes.

* media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
* media/modern-media-controls/placard-support/placard-support-airplay.html:
* media/modern-media-controls/placard-support/placard-support-error-expected.txt:
* media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt:
* media/modern-media-controls/placard-support/placard-support-error-recover.html:
* media/modern-media-controls/placard-support/placard-support-error.html:
* media/modern-media-controls/placard-support/placard-support-pip-expected.txt:
* media/modern-media-controls/placard-support/placard-support-pip.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="#trunkLayoutTestsmediamodernmediacontrolsairplayplacardairplayplacardtextsectionhtml">trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolspipplacardpipplacardtextsectionhtml">trunk/LayoutTests/media/modern-media-controls/pip-placard/pip-placard-text-section.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportairplayexpectedtxt">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportairplayhtml">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorexpectedtxt">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorrecoverexpectedtxt">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorrecoverhtml">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorhtml">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportpipexpectedtxt">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportpiphtml">trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip.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="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsinlinemediacontrolsjs">trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolsmediaplacardsupportjs">trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/ChangeLog 2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -1,5 +1,25 @@
</span><span class="cx"> 2017-06-13  Antoine Quint  <graouts@apple.com>
</span><span class="cx"> 
</span><ins>+        Rebaseline media/modern-media-controls/placard-support
+        https://bugs.webkit.org/show_bug.cgi?id=173340
+
+        Reviewed by Dean Jackson.
+
+        We update tests to use the new "placard" property rather than "showsPlacard" which this patch removes.
+
+        * media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
+        * media/modern-media-controls/placard-support/placard-support-airplay.html:
+        * media/modern-media-controls/placard-support/placard-support-error-expected.txt:
+        * media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt:
+        * media/modern-media-controls/placard-support/placard-support-error-recover.html:
+        * media/modern-media-controls/placard-support/placard-support-error.html:
+        * media/modern-media-controls/placard-support/placard-support-pip-expected.txt:
+        * media/modern-media-controls/placard-support/placard-support-pip.html:
+        * platform/ios-simulator/TestExpectations:
+        * platform/mac/TestExpectations:
+
+2017-06-13  Antoine Quint  <graouts@apple.com>
+
</ins><span class="cx">         Rebaseline media/modern-media-controls/mute-support
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=173345
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsairplayplacardairplayplacardtextsectionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html  2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html     2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> description("Testing that text selection is turned off for <code>AirplayPlacard</code>.");
</span><span class="cx"> 
</span><span class="cx"> const mediaControls = new MacOSInlineMediaControls({ width: 600, height: 300 });
</span><del>-mediaControls.showPlacard(mediaControls.airplayPlacard);
</del><ins>+mediaControls.placard = mediaControls.airplayPlacard;
</ins><span class="cx"> document.body.appendChild(mediaControls.element);
</span><span class="cx"> 
</span><span class="cx"> shouldBecomeEqual("!!document.querySelector('.placard')", "true", () => {
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolspipplacardpipplacardtextsectionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/pip-placard/pip-placard-text-section.html (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/pip-placard/pip-placard-text-section.html  2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/pip-placard/pip-placard-text-section.html     2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> description("Testing that text selection is turned off for <code>PiPPlacard</code>.");
</span><span class="cx"> 
</span><span class="cx"> const mediaControls = new MacOSInlineMediaControls({ width: 600, height: 300 });
</span><del>-mediaControls.showPlacard(mediaControls.pipPlacard);
</del><ins>+mediaControls.placard = mediaControls.pipPlacard;
</ins><span class="cx"> document.body.appendChild(mediaControls.element);
</span><span class="cx"> 
</span><span class="cx"> scheduler.frameDidFire = function()
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportairplayexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt       2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt  2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS mediaController.controls.showsPlacard is true
</del><ins>+PASS mediaController.controls.placard is mediaController.controls.airplayPlacard
</ins><span class="cx"> PASS mediaController.controls.children.includes(mediaController.controls.airplayPlacard) is true
</span><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportairplayhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html       2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html  2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     if (!media.webkitCurrentPlaybackTargetIsWireless)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    shouldBeTrue("mediaController.controls.showsPlacard");
</del><ins>+    shouldBe("mediaController.controls.placard", "mediaController.controls.airplayPlacard");
</ins><span class="cx">     shouldBeTrue("mediaController.controls.children.includes(mediaController.controls.airplayPlacard)");
</span><span class="cx"> 
</span><span class="cx">     debug("");
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-expected.txt (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-expected.txt 2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-expected.txt    2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS mediaController.controls.showsPlacard is true
</del><ins>+PASS mediaController.controls.placard is mediaController.controls.invalidPlacard
</ins><span class="cx"> PASS mediaController.controls.children.includes(mediaController.controls.invalidPlacard) is true
</span><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorrecoverexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt 2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt    2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -3,9 +3,10 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS mediaController.controls.showsPlacard is true
</del><ins>+PASS mediaController.controls.placard is mediaController.controls.invalidPlacard
</ins><span class="cx"> PASS mediaController.controls.children.includes(mediaController.controls.invalidPlacard) is true
</span><del>-PASS mediaController.controls.showsPlacard is false
</del><ins>+PASS mediaController.controls.placard is null
+PASS mediaController.controls.children.includes(mediaController.controls.invalidPlacard) is false
</ins><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorrecoverhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover.html (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover.html 2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover.html    2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -14,11 +14,12 @@
</span><span class="cx"> const mediaController = createControls(shadowRoot, media, null);
</span><span class="cx"> 
</span><span class="cx"> media.addEventListener("error", () => {
</span><del>-    shouldBeTrue("mediaController.controls.showsPlacard");
</del><ins>+    shouldBe("mediaController.controls.placard", "mediaController.controls.invalidPlacard");
</ins><span class="cx">     shouldBeTrue("mediaController.controls.children.includes(mediaController.controls.invalidPlacard)");
</span><span class="cx"> 
</span><span class="cx">     media.addEventListener("loadstart", () => {
</span><del>-        shouldBeFalse("mediaController.controls.showsPlacard");
</del><ins>+        shouldBeNull("mediaController.controls.placard");
+        shouldBeFalse("mediaController.controls.children.includes(mediaController.controls.invalidPlacard)");
</ins><span class="cx">         debug("");
</span><span class="cx">         shadowRoot.host.remove();
</span><span class="cx">         media.remove();
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupporterrorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error.html (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error.html 2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error.html    2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> const mediaController = createControls(shadowRoot, media, null);
</span><span class="cx"> 
</span><span class="cx"> media.addEventListener("error", function() {
</span><del>-    shouldBeTrue("mediaController.controls.showsPlacard");
</del><ins>+    shouldBe("mediaController.controls.placard", "mediaController.controls.invalidPlacard");
</ins><span class="cx">     shouldBeTrue("mediaController.controls.children.includes(mediaController.controls.invalidPlacard)");
</span><span class="cx">     debug("");
</span><span class="cx">     shadowRoot.host.remove();
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportpipexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip-expected.txt (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip-expected.txt   2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip-expected.txt      2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -3,9 +3,9 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS mediaController.controls.showsPlacard is true
</del><ins>+PASS mediaController.controls.placard is mediaController.controls.pipPlacard
</ins><span class="cx"> PASS mediaController.controls.children.includes(mediaController.controls.pipPlacard) is true
</span><del>-PASS mediaController.controls.showsPlacard is false
</del><ins>+PASS mediaController.controls.placard is null
</ins><span class="cx"> PASS mediaController.controls.children.includes(mediaController.controls.pipPlacard) is false
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsplacardsupportplacardsupportpiphtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip.html (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip.html   2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip.html      2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> <script src="../../../resources/js-test-pre.js"></script>
</span><span class="cx"> <script src="../resources/media-controls-loader.js" type="text/javascript"></script>
</span><ins>+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
</ins><span class="cx"> <body>
</span><span class="cx"> <style type="text/css" media="screen">
</span><span class="cx">     
</span><span class="lines">@@ -12,6 +13,7 @@
</span><span class="cx">     video {
</span><span class="cx">         width: 800px;
</span><span class="cx">         height: 240px;
</span><ins>+        pointer-events: none;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx"> </style>
</span><span class="lines">@@ -23,8 +25,6 @@
</span><span class="cx"> 
</span><span class="cx"> description("Testing the <code>PlacardSupport</code> behavior when entering picture-in-picture.");
</span><span class="cx"> 
</span><del>-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
</del><span class="cx"> if (window.internals)
</span><span class="cx">     window.internals.settings.setAllowsPictureInPictureMediaPlayback(true);
</span><span class="cx"> 
</span><span class="lines">@@ -32,7 +32,8 @@
</span><span class="cx"> const media = document.querySelector("video");
</span><span class="cx"> const mediaController = createControls(container, media, null);
</span><span class="cx"> 
</span><del>-const button = document.body.appendChild(document.createElement("button"));
</del><ins>+const button = document.body.appendChild(document.createElement("div"));
+button.innerText = "Enter picture-in-picture";
</ins><span class="cx"> 
</span><span class="cx"> button.addEventListener("click", () => {
</span><span class="cx">     media.webkitSetPresentationMode(media.webkitPresentationMode == "inline" ? "picture-in-picture" : "inline");
</span><span class="lines">@@ -40,14 +41,15 @@
</span><span class="cx"> 
</span><span class="cx"> media.addEventListener("webkitpresentationmodechanged", () => {
</span><span class="cx">     if (media.webkitPresentationMode == "picture-in-picture") {
</span><del>-        shouldBeTrue("mediaController.controls.showsPlacard");
</del><ins>+        shouldBe("mediaController.controls.placard", "mediaController.controls.pipPlacard");
</ins><span class="cx">         shouldBeTrue("mediaController.controls.children.includes(mediaController.controls.pipPlacard)");
</span><span class="cx">         clickButton();
</span><span class="cx">     } else {
</span><del>-        shouldBeFalse("mediaController.controls.showsPlacard");
</del><ins>+        shouldBeNull("mediaController.controls.placard");
</ins><span class="cx">         shouldBeFalse("mediaController.controls.children.includes(mediaController.controls.pipPlacard)");
</span><span class="cx">         container.remove();
</span><span class="cx">         media.remove();
</span><ins>+        button.remove();
</ins><span class="cx">         finishJSTest();
</span><span class="cx">     }
</span><span class="cx"> });
</span><span class="lines">@@ -55,13 +57,7 @@
</span><span class="cx"> media.addEventListener("play", clickButton);
</span><span class="cx"> 
</span><span class="cx"> function clickButton() {
</span><del>-    const bounds = button.getBoundingClientRect();
-    const centerX = bounds.left + bounds.width / 2;
-    const centerY = bounds.top + bounds.height / 2;
-
-    eventSender.mouseMoveTo(centerX, centerY);
-    eventSender.mouseDown();
-    eventSender.mouseUp();
</del><ins>+    pressOnElement(button);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations   2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx"> media/modern-media-controls/pip-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/pip-placard [ Pass ]
</span><span class="cx"> media/modern-media-controls/placard [ Pass ]
</span><ins>+media/modern-media-controls/placard-support [ Pass ]
</ins><span class="cx"> media/modern-media-controls/play-pause-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/rewind-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/scheduler [ Pass ]
</span><span class="lines">@@ -100,6 +101,7 @@
</span><span class="cx"> # AirPlay cannot be tested on iOS
</span><span class="cx"> webkit.org/b/166062 media/modern-media-controls/airplay-support [ Skip ]
</span><span class="cx"> webkit.org/b/166062 media/modern-media-controls/audio/audio-controls-buttons.html [ Skip ]
</span><ins>+webkit.org/b/166062 media/modern-media-controls/placard-support/placard-support-airplay.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # These tests use touch events and don't work in OpenSource
</span><span class="cx"> media/modern-media-controls/button/button.html [ Skip ]
</span><span class="lines">@@ -106,6 +108,7 @@
</span><span class="cx"> media/modern-media-controls/button/button-active-state.html [ Skip ]
</span><span class="cx"> media/modern-media-controls/fullscreen-support/fullscreen-support-press.html [ Skip ]
</span><span class="cx"> media/modern-media-controls/mute-support/mute-support-press-on-button.html [ Skip ]
</span><ins>+media/modern-media-controls/placard-support/ipad [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # These tests rely on fullscreen which do not use the WebKit media controls on iOS
</span><span class="cx"> media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html [ Skip ]
</span><span class="lines">@@ -114,6 +117,9 @@
</span><span class="cx"> # These tests specifically test iOS-only media controls features
</span><span class="cx"> media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding.html [ Pass ]
</span><span class="cx"> 
</span><ins>+# These tests are designed to work only on macOS
+media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
+
</ins><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 class="cx"> webkit.org/b/156718 storage/websql/alter-to-info-table.html [ Failure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations  2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/platform/mac/TestExpectations     2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -1567,6 +1567,7 @@
</span><span class="cx"> media/modern-media-controls/pip-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/pip-placard [ Pass ]
</span><span class="cx"> media/modern-media-controls/placard [ Pass ]
</span><ins>+media/modern-media-controls/placard-support [ Pass ]
</ins><span class="cx"> media/modern-media-controls/play-pause-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/rewind-button [ Pass ]
</span><span class="cx"> media/modern-media-controls/scheduler [ Pass ]
</span><span class="lines">@@ -1582,6 +1583,7 @@
</span><span class="cx"> 
</span><span class="cx"> # These tests are iOS-specific
</span><span class="cx"> media/modern-media-controls/audio/audio-controls-styles.html [ Skip ]
</span><ins>+media/modern-media-controls/placard-support/ipad [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> webkit.org/b/170907 [ Debug ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.html [ Pass Failure Timeout ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/Source/WebCore/ChangeLog      2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2017-06-13  Antoine Quint  <graouts@apple.com>
+
+        Rebaseline media/modern-media-controls/placard-support
+        https://bugs.webkit.org/show_bug.cgi?id=173340
+
+        Reviewed by Dean Jackson.
+
+        We make a source change to use a "placard" getter/setter to show or hide a placard, making it
+        more convenient to test whether a placard has been set.
+
+        * Modules/modern-media-controls/controls/inline-media-controls.js:
+        (InlineMediaControls.prototype.get placard):
+        (InlineMediaControls.prototype.set placard):
+        (InlineMediaControls.prototype.showPlacard): Deleted.
+        (InlineMediaControls.prototype.hidePlacard): Deleted.
+        * Modules/modern-media-controls/media/placard-support.js:
+        (PlacardSupport.prototype._updatePlacard):
+        (PlacardSupport):
+
</ins><span class="cx"> 2017-06-11  Antoine Quint  <graouts@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Rebaseline media/modern-media-controls/fullscreen-support
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsinlinemediacontrolsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js     2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js        2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -94,22 +94,17 @@
</span><span class="cx">         this.layout();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    showPlacard(placard)
</del><ins>+    get placard()
</ins><span class="cx">     {
</span><del>-        if (this._placard === placard)
-            return;
-
-        this._placard = placard;
-        this.layout();
</del><ins>+        return this._placard;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    hidePlacard()
</del><ins>+    set placard(placard)
</ins><span class="cx">     {
</span><del>-        if (!this._placard)
</del><ins>+        if (this._placard === placard)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        this._placard.remove();
-        this._placard = null;
</del><ins>+        this._placard = placard;
</ins><span class="cx">         this.layout();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolsmediaplacardsupportjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js (218240 => 218241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js      2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js 2017-06-14 02:44:08 UTC (rev 218241)
</span><span class="lines">@@ -52,16 +52,17 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         const controls = this.mediaController.controls;
</span><ins>+        const media = this.mediaController.media;
</ins><span class="cx"> 
</span><del>-        const media = this.mediaController.media;
</del><ins>+        let placard = null;
</ins><span class="cx">         if (media.webkitPresentationMode === "picture-in-picture")
</span><del>-            controls.showPlacard(controls.pipPlacard);
</del><ins>+            placard = controls.pipPlacard;
</ins><span class="cx">         else if (media.webkitCurrentPlaybackTargetIsWireless)
</span><del>-            controls.showPlacard(controls.airplayPlacard);
</del><ins>+            placard = controls.airplayPlacard;
</ins><span class="cx">         else if (media instanceof HTMLVideoElement && media.error !== null && media.played.length === 0)
</span><del>-            controls.showPlacard(controls.invalidPlacard);
-        else
-            controls.hidePlacard();
</del><ins>+            placard = controls.invalidPlacard;
+
+        controls.placard = placard;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>