<!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>[207744] branches/safari-602-branch</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/207744">207744</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2016-10-24 00:18:37 -0700 (Mon, 24 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/207159">r207159</a>. rdar://problem/28857481</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari602branchLayoutTestsChangeLog">branches/safari-602-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediamediacontrolsjs">branches/safari-602-branch/LayoutTests/media/media-controls.js</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediavideocontrolstransformedhtml">branches/safari-602-branch/LayoutTests/media/video-controls-transformed.html</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediavideocontrolsvisibleaudioonlyhtml">branches/safari-602-branch/LayoutTests/media/video-controls-visible-audio-only.html</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediavideofullscreeenonlyplaybackhtml">branches/safari-602-branch/LayoutTests/media/video-fullscreeen-only-playback.html</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediavideoplayaudiorequireusergesturehtml">branches/safari-602-branch/LayoutTests/media/video-play-audio-require-user-gesture.html</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediavideoplayrequireusergesturehtml">branches/safari-602-branch/LayoutTests/media/video-play-require-user-gesture.html</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediavideotestjs">branches/safari-602-branch/LayoutTests/media/video-test.js</a></li>
<li><a href="#branchessafari602branchLayoutTestsplatformiossimulatorTestExpectations">branches/safari-602-branch/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#branchessafari602branchSourceWebCoreChangeLog">branches/safari-602-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebCorehtmlHTMLMediaElementcpp">branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#branchessafari602branchSourceWebCorepageSettingscpp">branches/safari-602-branch/Source/WebCore/page/Settings.cpp</a></li>
<li><a href="#branchessafari602branchSourceWebCorepageSettingsin">branches/safari-602-branch/Source/WebCore/page/Settings.in</a></li>
<li><a href="#branchessafari602branchSourceWebKitmacChangeLog">branches/safari-602-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebKitmacWebViewWebViewmm">branches/safari-602-branch/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#branchessafari602branchSourceWebKit2ChangeLog">branches/safari-602-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebKit2SharedWebPreferencesDefinitionsh">branches/safari-602-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#branchessafari602branchSourceWebKit2UIProcessAPICocoaWKWebViewmm">branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#branchessafari602branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari602branchLayoutTestsmedialoadedmetadatafireswithoutusergesturewhensetRequiresUserGestureToLoadVideofalseexpectedtxt">branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false-expected.txt</a></li>
<li><a href="#branchessafari602branchLayoutTestsmedialoadedmetadatafireswithoutusergesturewhensetRequiresUserGestureToLoadVideofalsehtml">branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediarequireusergesturetoloadvideoexpectedtxt">branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video-expected.txt</a></li>
<li><a href="#branchessafari602branchLayoutTestsmediarequireusergesturetoloadvideohtml">branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari602branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/ChangeLog (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/ChangeLog        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/ChangeLog        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r207159. rdar://problem/28857481
+
+    2016-10-11  Daniel Bates  &lt;dabates@apple.com&gt;
+
+            [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
+            https://bugs.webkit.org/show_bug.cgi?id=163244
+            &lt;rdar://problem/27250015&gt;
+
+            Reviewed by Jer Noble.
+
+            Add tests to ensure that Settings::setRequiresUserGestureToLoadVideo() behaves as expected.
+
+            * media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false-expected.txt: Added.
+            * media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html: Added.
+            * media/media-controls.js:
+            (clickPlayButton): Added.
+            * media/require-user-gesture-to-load-video-expected.txt: Added.
+            * media/require-user-gesture-to-load-video.html: Added.
+            * media/video-controls-transformed.html: Write in terms of clickPlayButton().
+            * media/video-controls-visible-audio-only.html: Ditto.
+            * media/video-fullscreeen-only-playback.html: Ditto.
+            * media/video-play-audio-require-user-gesture.html: Ditto.
+            * media/video-play-require-user-gesture.html: Ditto.
+            * media/video-test.js:
+            (passTest): Added.
+            * platform/ios-simulator/TestExpectations: Skip test media/require-user-gesture-to-load-video.html as
+            we need to fix &lt;https://bugs.webkit.org/show_bug.cgi?id=163291&gt; to support tapping the play button on iOS.
+
+2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r206712. rdar://problem/28216065
</span><span class="cx"> 
</span><span class="cx">     2016-10-01  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsmedialoadedmetadatafireswithoutusergesturewhensetRequiresUserGestureToLoadVideofalseexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false-expected.txt (0 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false-expected.txt                                (rev 0)
+++ branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false-expected.txt        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+EVENT(loadedmetadata)
+Did load metadata without user gesture OK
+END OF TEST
+
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsmedialoadedmetadatafireswithoutusergesturewhensetRequiresUserGestureToLoadVideofalsehtml"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html (0 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html                                (rev 0)
+++ branches/safari-602-branch/LayoutTests/media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;media-file.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;video-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setVideoPlaybackRequiresUserGesture(true);
+    internals.settings.setRequiresUserGestureToLoadVideo(false);
+}
+
+function done()
+{
+    passTest(&quot;Did load metadata without user gesture&quot;);
+}
+
+function start()
+{
+    findMediaElement();
+    waitForEvent(&quot;loadedmetadata&quot;, done);
+    video.src = findMediaFile(&quot;video&quot;, &quot;content/test&quot;);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;start()&quot;&gt;
+    &lt;video id=&quot;video&quot;&gt;&lt;/video&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediamediacontrolsjs"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/media-controls.js (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/media-controls.js        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/media-controls.js        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -92,3 +92,18 @@
</span><span class="cx"> 
</span><span class="cx">     return displayElement;
</span><span class="cx"> }
</span><ins>+
+// FIXME: Make this work for iOS.
+function clickPlayButton(video)
+{
+    if (!window.eventSender)
+        return;
+
+    var playButtonCoordinates = mediaControlsButtonCoordinates(video, &quot;play-button&quot;);
+    var x = playButtonCoordinates[0];
+    var y = playButtonCoordinates[1];
+
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+}
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediarequireusergesturetoloadvideoexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video-expected.txt (0 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video-expected.txt                                (rev 0)
+++ branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video-expected.txt        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+EVENT(loadedmetadata)
+Did load metadata after user gesture. OK
+END OF TEST
+
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediarequireusergesturetoloadvideohtml"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video.html (0 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video.html                                (rev 0)
+++ branches/safari-602-branch/LayoutTests/media/require-user-gesture-to-load-video.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;media-controls.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;media-file.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;video-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setVideoPlaybackRequiresUserGesture(true);
+    internals.settings.setRequiresUserGestureToLoadVideo(true);
+}
+
+var didUserGesture = false;
+
+function checkDidLoadMetadataAfterUserGesture()
+{
+    if (didUserGesture)
+        passTest(&quot;Did load metadata after user gesture.&quot;);
+    else
+        failTest(&quot;Did load metadata without user gesture&quot;);
+}
+
+function performClickOnPlayButton()
+{
+    didUserGesture = true;
+    clickPlayButton(video);
+}
+
+function start()
+{
+    findMediaElement();
+    waitForEvent(&quot;loadedmetadata&quot;, checkDidLoadMetadataAfterUserGesture);
+    video.src = findMediaFile(&quot;video&quot;, &quot;content/test&quot;);
+
+    window.setTimeout(performClickOnPlayButton, 0);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;start()&quot;&gt;
+    &lt;video id=&quot;video&quot; controls&gt;&lt;/video&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediavideocontrolstransformedhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/video-controls-transformed.html (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/video-controls-transformed.html        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/video-controls-transformed.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -18,20 +18,11 @@
</span><span class="cx">     &lt;script&gt;
</span><span class="cx">         testExpected(&quot;video.controls&quot;, null, '!=');
</span><span class="cx">         waitForEvent('canplaythrough', function () {
</span><del>-            if (window.eventSender) {
-                // Find the play button and click the middle of its bounding box.
-                var playCoords;
-                try {
-                    playCoords = mediaControlsButtonCoordinates(video, &quot;play-button&quot;);
-                } catch (exception) {
-                    failTest(exception.description);
-                    return;
-                }
-                var clickX = playCoords[0];
-                var clickY = playCoords[1];
-                eventSender.mouseMoveTo(clickX, clickY);
-                eventSender.mouseDown();
-                eventSender.mouseUp();
</del><ins>+            try {
+                clickPlayButton(video);
+            } catch (exception) {
+                failTest(exception.description);
+                return;
</ins><span class="cx">             }
</span><span class="cx">             testExpected(&quot;video.paused&quot;, false);
</span><span class="cx">             endTest();
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediavideocontrolsvisibleaudioonlyhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/video-controls-visible-audio-only.html (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/video-controls-visible-audio-only.html        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/video-controls-visible-audio-only.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -37,20 +37,13 @@
</span><span class="cx">                 if (!window.testRunner)
</span><span class="cx">                     return;
</span><span class="cx"> 
</span><del>-                // start playback
-                var playCoords
</del><span class="cx">                 try {
</span><del>-                    playCoords = mediaControlsButtonCoordinates(video, &quot;play-button&quot;);
</del><ins>+                    clickPlayButton(video);
</ins><span class="cx">                 } catch (exception) {
</span><span class="cx">                     consoleWrite(exception.description);
</span><span class="cx">                     testRunner.notifyDone();
</span><span class="cx">                     return;
</span><span class="cx">                 }
</span><del>-                var clickX = playCoords[0];
-                var clickY = playCoords[1];
-                eventSender.mouseMoveTo(clickX, clickY);
-                eventSender.mouseDown();
-                eventSender.mouseUp();
</del><span class="cx">                 testcondition(&quot;!video.paused&quot;);
</span><span class="cx"> 
</span><span class="cx">                 // move the mouse off of the element
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediavideofullscreeenonlyplaybackhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/video-fullscreeen-only-playback.html (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/video-fullscreeen-only-playback.html        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/video-fullscreeen-only-playback.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -33,17 +33,12 @@
</span><span class="cx"> 
</span><span class="cx">                 consoleWrite(&quot;&lt;br&gt;** Clicking \'play\' button...&quot;);
</span><span class="cx"> 
</span><del>-                var playCoords;
</del><span class="cx">                 try {
</span><del>-                    playCoords = mediaControlsButtonCoordinates(video, &quot;play-button&quot;);
</del><ins>+                    clickPlayButton(video);
</ins><span class="cx">                 } catch (exception) {
</span><span class="cx">                     failTest(exception.description);
</span><span class="cx">                     return;
</span><span class="cx">                 }
</span><del>-
-                eventSender.mouseMoveTo(playCoords[0], playCoords[1]);
-                eventSender.mouseDown();
-                eventSender.mouseUp();
</del><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediavideoplayaudiorequireusergesturehtml"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/video-play-audio-require-user-gesture.html (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/video-play-audio-require-user-gesture.html        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/video-play-audio-require-user-gesture.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -9,26 +9,6 @@
</span><span class="cx">             if (window.internals) 
</span><span class="cx">                 window.internals.settings.setAudioPlaybackRequiresUserGesture(true);
</span><span class="cx"> 
</span><del>-            function click()
-            {
-                if (window.eventSender) {
-                    var playCoords;
-                    try {
-                        playCoords = mediaControlsButtonCoordinates(video, &quot;play-button&quot;);
-                    } catch (exception) {
-                        failTest(exception.description);
-                        return;
-                    }
-                    var x = playCoords[0];
-                    var y = playCoords[1];
-                     
-                    userGestureInitiated = 1;
-                    eventSender.mouseMoveTo(x, y);
-                    eventSender.mouseDown();
-                    eventSender.mouseUp();
-                }
-            }
-
</del><span class="cx">             function playing()
</span><span class="cx">             {
</span><span class="cx">                 if (userGestureInitiated == 0) {
</span><span class="lines">@@ -62,7 +42,13 @@
</span><span class="cx">                 consoleWrite(&quot;&quot;);
</span><span class="cx"> 
</span><span class="cx">                 consoleWrite(&quot;* User gesture initiated&quot;);
</span><del>-                click();
</del><ins>+                userGestureInitiated = 1;
+                try {
+                    clickPlayButton(video);
+                } catch (exception) {
+                    failTest(exception.description);
+                    return;
+                }
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             function start()
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediavideoplayrequireusergesturehtml"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/video-play-require-user-gesture.html (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/video-play-require-user-gesture.html        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/video-play-require-user-gesture.html        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -9,26 +9,6 @@
</span><span class="cx">             if (window.internals) 
</span><span class="cx">                 window.internals.settings.setVideoPlaybackRequiresUserGesture(true);
</span><span class="cx"> 
</span><del>-            function click()
-            {
-                if (window.eventSender) {
-                    var playCoords;
-                    try {
-                        playCoords = mediaControlsButtonCoordinates(video, &quot;play-button&quot;);
-                    } catch (exception) {
-                        failTest(exception.description);
-                        return;
-                    }
-                    var x = playCoords[0];
-                    var y = playCoords[1];
-                     
-                    userGestureInitiated = 1;
-                    eventSender.mouseMoveTo(x, y);
-                    eventSender.mouseDown();
-                    eventSender.mouseUp();
-                }
-            }
-
</del><span class="cx">             function playing()
</span><span class="cx">             {
</span><span class="cx">                 if (userGestureInitiated == 0) {
</span><span class="lines">@@ -62,7 +42,13 @@
</span><span class="cx">                 consoleWrite(&quot;&quot;);
</span><span class="cx"> 
</span><span class="cx">                 consoleWrite(&quot;* User gesture initiated&quot;);
</span><del>-                click();
</del><ins>+                userGestureInitiated = 1;
+                try {
+                    clickPlayButton(video);
+                } catch (exception) {
+                    failTest(exception.description);
+                    return;
+                }
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             function start()
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsmediavideotestjs"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/media/video-test.js (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/media/video-test.js        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/media/video-test.js        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> var consoleElement = null;
</span><span class="cx"> var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting())
</span><span class="cx"> var Failed = false;
</span><ins>+var Success = true;
</ins><span class="cx"> 
</span><span class="cx"> var track = null; // Current TextTrack being tested.
</span><span class="cx"> var cues = null; // Current TextTrackCueList being tested.
</span><span class="lines">@@ -266,6 +267,11 @@
</span><span class="cx">     endTest();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function passTest(text)
+{
+    logResult(Success, text);
+    endTest();
+}
</ins><span class="cx"> 
</span><span class="cx"> function logResult(success, text)
</span><span class="cx"> {
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/platform/ios-simulator/TestExpectations (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -3020,3 +3020,11 @@
</span><span class="cx"> 
</span><span class="cx"> # System font on iOS 9 cannot be bold and italic.
</span><span class="cx"> fast/text/system-font-weight-italic.html [ Failure ]
</span><ins>+
+# Media tests cannot tap play button on iOS.
+webkit.org/b/163291 media/require-user-gesture-to-load-video.html
+webkit.org/b/163291 media/video-controls-transformed.html [ Failure ]
+webkit.org/b/163291 media/video-controls-visible-audio-only.html [ Failure ]
+webkit.org/b/163291 media/video-fullscreeen-only-playback.html [ Failure ]
+webkit.org/b/163291 media/video-play-audio-require-user-gesture.html [ Failure ]
+webkit.org/b/163291 media/video-play-require-user-gesture.html 
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/ChangeLog        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -1,5 +1,29 @@
</span><span class="cx"> 2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r207159. rdar://problem/28857481
+
+    2016-10-11  Daniel Bates  &lt;dabates@apple.com&gt;
+
+            [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
+            https://bugs.webkit.org/show_bug.cgi?id=163244
+            &lt;rdar://problem/27250015&gt;
+
+            Reviewed by Jer Noble.
+
+            Adds a new setting to toggle requiring a user gesture to load a video (enabled by default).
+            Disable this setting for apps built against iOS 9 or earlier.
+
+            Tests: media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html
+                   media/require-user-gesture-to-load-video.html
+
+            * html/HTMLMediaElement.cpp:
+            (WebCore::HTMLMediaElement::HTMLMediaElement): Only require a user gesture to load a video
+            when Settings::requiresUserGestureToLoadVideo() is true.
+            * page/Settings.cpp: Enable setting requiresUserGestureToLoadVideo by default.
+            * page/Settings.in: Add setting, requiresUserGestureToLoadVideo.
+
+2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r206712. rdar://problem/28216065
</span><span class="cx"> 
</span><span class="cx">     2016-10-01  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -522,7 +522,8 @@
</span><span class="cx">     if (document.ownerElement() || !document.isMediaDocument()) {
</span><span class="cx">         if (settings &amp;&amp; settings-&gt;videoPlaybackRequiresUserGesture()) {
</span><span class="cx">             m_mediaSession-&gt;addBehaviorRestriction(MediaElementSession::RequireUserGestureForVideoRateChange);
</span><del>-            m_mediaSession-&gt;addBehaviorRestriction(MediaElementSession::RequireUserGestureForLoad);
</del><ins>+            if (settings-&gt;requiresUserGestureToLoadVideo())
+                m_mediaSession-&gt;addBehaviorRestriction(MediaElementSession::RequireUserGestureForLoad);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (settings &amp;&amp; settings-&gt;audioPlaybackRequiresUserGesture())
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/page/Settings.cpp (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/page/Settings.cpp        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebCore/page/Settings.cpp        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -169,6 +169,8 @@
</span><span class="cx"> static const bool defaultQuickTimePluginReplacementEnabled = false;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+static const bool defaultRequiresUserGestureToLoadVideo = true;
+
</ins><span class="cx"> static const bool defaultAllowsPictureInPictureMediaPlayback = true;
</span><span class="cx"> 
</span><span class="cx"> static const double defaultIncrementalRenderingSuppressionTimeoutInSeconds = 5;
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/page/Settings.in (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/page/Settings.in        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebCore/page/Settings.in        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -127,6 +127,7 @@
</span><span class="cx"> fixedElementsLayoutRelativeToFrame initial=false
</span><span class="cx"> allowDisplayOfInsecureContent initial=false
</span><span class="cx"> allowRunningOfInsecureContent initial=false
</span><ins>+requiresUserGestureToLoadVideo initial=defaultRequiresUserGestureToLoadVideo
</ins><span class="cx"> videoPlaybackRequiresUserGesture initial=defaultVideoPlaybackRequiresUserGesture
</span><span class="cx"> audioPlaybackRequiresUserGesture initial=defaultAudioPlaybackRequiresUserGesture
</span><span class="cx"> mainContentUserGestureOverrideEnabled initial=false
</span></span></pre></div>
<a id="branchessafari602branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebKit/mac/ChangeLog (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebKit/mac/ChangeLog        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebKit/mac/ChangeLog        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r207159. rdar://problem/28857481
+
+    2016-10-11  Daniel Bates  &lt;dabates@apple.com&gt;
+
+            [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
+            https://bugs.webkit.org/show_bug.cgi?id=163244
+            &lt;rdar://problem/27250015&gt;
+
+            Reviewed by Jer Noble.
+
+            Enable or disable the Setting::requiresUserGestureToLoadVideo() in legacy WebKit depending
+            on the version of iOS SDK that the app was linked against. We require a user gesture to
+            begin loading a video as of iOS 10.
+
+            * WebView/WebView.mm:
+            (shouldRequireUserGestureToLoadVideo):
+            (-[WebView _preferencesChanged:]): Modified to pass the WebKit requiresUserGestureToLoadVideo
+            preference to WebCore.
+
</ins><span class="cx"> 2016-10-20  Matthew Hanson  &lt;matthew_hanson&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r207385. rdar://problem/28811872
</span></span></pre></div>
<a id="branchessafari602branchSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebKit/mac/WebView/WebView.mm (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebKit/mac/WebView/WebView.mm        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebKit/mac/WebView/WebView.mm        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -899,6 +899,12 @@
</span><span class="cx">     return shouldConvertInvalidURLsToBlank;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool shouldRequireUserGestureToLoadVideo()
+{
+    static bool shouldRequireUserGestureToLoadVideo = dyld_get_program_sdk_version() &gt;= DYLD_IOS_VERSION_10_0;
+    return shouldRequireUserGestureToLoadVideo;
+}
+
</ins><span class="cx"> #if ENABLE(GAMEPAD)
</span><span class="cx"> static void WebKitInitializeGamepadProviderIfNecessary()
</span><span class="cx"> {
</span><span class="lines">@@ -2348,6 +2354,7 @@
</span><span class="cx">     BOOL mediaPlaybackRequiresUserGesture = [preferences mediaPlaybackRequiresUserGesture];
</span><span class="cx">     settings.setVideoPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture || [preferences videoPlaybackRequiresUserGesture]);
</span><span class="cx">     settings.setAudioPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture || [preferences audioPlaybackRequiresUserGesture]);
</span><ins>+    settings.setRequiresUserGestureToLoadVideo(shouldRequireUserGestureToLoadVideo());
</ins><span class="cx">     settings.setMainContentUserGestureOverrideEnabled([preferences overrideUserGestureRequirementForMainContent]);
</span><span class="cx">     settings.setAllowsInlineMediaPlayback([preferences mediaPlaybackAllowsInline]);
</span><span class="cx">     settings.setAllowsInlineMediaPlaybackAfterFullscreen([preferences allowsInlineMediaPlaybackAfterFullscreen]);
</span></span></pre></div>
<a id="branchessafari602branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebKit2/ChangeLog (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebKit2/ChangeLog        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebKit2/ChangeLog        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -1,5 +1,29 @@
</span><span class="cx"> 2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r207159. rdar://problem/28857481
+
+    2016-10-11  Daniel Bates  &lt;dabates@apple.com&gt;
+
+            [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
+            https://bugs.webkit.org/show_bug.cgi?id=163244
+            &lt;rdar://problem/27250015&gt;
+
+            Reviewed by Jer Noble.
+
+            Enable or disable the Setting::requiresUserGestureToLoadVideo() in WebKit depending on the
+            version of iOS SDK that the app was linked against. We require a user gesture to begin
+            loading a video as of iOS 10.
+
+            * Shared/WebPreferencesDefinitions.h:
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (shouldRequireUserGestureToLoadVideo): Added.
+            (-[WKWebView _initializeWithConfiguration:]): Set the requiresUserGestureToLoadVideo preference.
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::updatePreferences): Modified to pass the WebKit requiresUserGestureToLoadVideo
+            preference to WebCore.
+
+2016-10-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r203809. rdar://problem/28433607
</span><span class="cx"> 
</span><span class="cx">     2016-07-27  Andy Estes  &lt;aestes@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari602branchSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -149,6 +149,7 @@
</span><span class="cx">     macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, false, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(RequiresUserGestureForVideoPlayback, requiresUserGestureForVideoPlayback, Bool, bool, false, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK, &quot;&quot;, &quot;&quot;) \
</span><ins>+    macro(RequiresUserGestureToLoadVideo, requiresUserGestureToLoadVideo, Bool, bool, false, &quot;&quot;, &quot;&quot;) \
</ins><span class="cx">     macro(MainContentUserGestureOverrideEnabled, mainContentUserGestureOverrideEnabled, Bool, bool, false, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(AllowsInlineMediaPlaybackAfterFullscreen, allowsInlineMediaPlaybackAfterFullscreen, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN, &quot;&quot;, &quot;&quot;) \
</span></span></pre></div>
<a id="branchessafari602branchSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -325,6 +325,12 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+static bool shouldRequireUserGestureToLoadVideo()
+{
+    static bool shouldRequireUserGestureToLoadVideo = dyld_get_program_sdk_version() &gt;= DYLD_IOS_VERSION_10_0;
+    return shouldRequireUserGestureToLoadVideo;
+}
+
</ins><span class="cx"> #if ENABLE(DATA_DETECTION) &amp;&amp; PLATFORM(IOS)
</span><span class="cx"> static WebCore::DataDetectorTypes fromWKDataDetectorTypes(uint64_t types)
</span><span class="cx"> {
</span><span class="lines">@@ -454,6 +460,7 @@
</span><span class="cx">     WKAudiovisualMediaTypes mediaTypesRequiringUserGesture = [_configuration mediaTypesRequiringUserActionForPlayback];
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureForVideoPlaybackKey(), WebKit::WebPreferencesStore::Value((mediaTypesRequiringUserGesture &amp; WKAudiovisualMediaTypeVideo) == WKAudiovisualMediaTypeVideo));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureForAudioPlaybackKey(), WebKit::WebPreferencesStore::Value(((mediaTypesRequiringUserGesture &amp; WKAudiovisualMediaTypeAudio) == WKAudiovisualMediaTypeAudio)));
</span><ins>+    pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureToLoadVideoKey(), WebKit::WebPreferencesStore::Value(shouldRequireUserGestureToLoadVideo()));
</ins><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::mainContentUserGestureOverrideEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mainContentUserGestureOverrideEnabled]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::invisibleAutoplayNotPermittedKey(), WebKit::WebPreferencesStore::Value(!![_configuration _invisibleAutoplayNotPermitted]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::mediaDataLoadsAutomaticallyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mediaDataLoadsAutomatically]));
</span></span></pre></div>
<a id="branchessafari602branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (207743 => 207744)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-24 07:18:28 UTC (rev 207743)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-24 07:18:37 UTC (rev 207744)
</span><span class="lines">@@ -3006,6 +3006,7 @@
</span><span class="cx">     bool requiresUserGestureForMedia = store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForMediaPlaybackKey());
</span><span class="cx">     settings.setVideoPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForVideoPlaybackKey()));
</span><span class="cx">     settings.setAudioPlaybackRequiresUserGesture(requiresUserGestureForMedia || store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForAudioPlaybackKey()));
</span><ins>+    settings.setRequiresUserGestureToLoadVideo(store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureToLoadVideoKey()));
</ins><span class="cx">     settings.setMainContentUserGestureOverrideEnabled(store.getBoolValueForKey(WebPreferencesKey::mainContentUserGestureOverrideEnabledKey()));
</span><span class="cx">     settings.setAllowsInlineMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackKey()));
</span><span class="cx">     settings.setAllowsInlineMediaPlaybackAfterFullscreen(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackAfterFullscreenKey()));
</span></span></pre>
</div>
</div>

</body>
</html>