<!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>[205784] 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/205784">205784</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2016-09-10 01:19:10 -0700 (Sat, 10 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Apple.com keynote does not display media controls
https://bugs.webkit.org/show_bug.cgi?id=161833
&lt;rdar://problem/28230123&gt;

Reviewed by Tim Horton.

Source/WebCore:

Tweaks the main content check so that we can distinguish between main content for the purposes of determining
autoplay policy vs. main content for the purposes of showing media controls. Namely, we make the latter less
restrictive than the former in terms of the maximum aspect ratio a video can have to be considered the right
size for main content.

New unit test in TestWebKitAPI.

* html/HTMLMediaElement.cpp:
(WebCore::mediaElementSessionInfoForSession):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager):
(WebCore::MediaElementSession::isLargeEnoughForMainContent):
(WebCore::MediaElementSession::wantsToObserveViewportVisibilityForMediaControls):
(WebCore::isMainContentForPurposesOfAutoplay):
(WebCore::isElementLargeEnoughForMainContent):
(WebCore::MediaElementSession::updateIsMainContent):
(WebCore::isMainContent): Deleted.
* html/MediaElementSession.h:

Tools:

New unit test verifying that wide videos (~2 aspect ratio) still get media controls.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlMediaElementSessioncpp">trunk/Source/WebCore/html/MediaElementSession.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlMediaElementSessionh">trunk/Source/WebCore/html/MediaElementSession.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaVideoControlsManagermm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2Cocoawideautoplayingvideowithaudiohtml">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Source/WebCore/ChangeLog        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-09-10  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Apple.com keynote does not display media controls
+        https://bugs.webkit.org/show_bug.cgi?id=161833
+        &lt;rdar://problem/28230123&gt;
+
+        Reviewed by Tim Horton.
+
+        Tweaks the main content check so that we can distinguish between main content for the purposes of determining
+        autoplay policy vs. main content for the purposes of showing media controls. Namely, we make the latter less
+        restrictive than the former in terms of the maximum aspect ratio a video can have to be considered the right
+        size for main content.
+
+        New unit test in TestWebKitAPI.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::mediaElementSessionInfoForSession):
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::canShowControlsManager):
+        (WebCore::MediaElementSession::isLargeEnoughForMainContent):
+        (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForMediaControls):
+        (WebCore::isMainContentForPurposesOfAutoplay):
+        (WebCore::isElementLargeEnoughForMainContent):
+        (WebCore::MediaElementSession::updateIsMainContent):
+        (WebCore::isMainContent): Deleted.
+        * html/MediaElementSession.h:
+
</ins><span class="cx"> 2016-09-09  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         URLParser: Keep track of cannot-be-a-base-url according to spec
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx">         session.mostRecentUserInteractionTime(),
</span><span class="cx">         session.canShowControlsManager(),
</span><span class="cx">         element.isFullscreen() || element.isVisibleInViewport(),
</span><del>-        session.isLargeEnoughForMainContent(),
</del><ins>+        session.isLargeEnoughForMainContent(MediaSessionMainContentPurpose::MediaControls),
</ins><span class="cx">         element.isPlaying() &amp;&amp; element.hasAudio() &amp;&amp; !element.muted()
</span><span class="cx">     };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlMediaElementSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/MediaElementSession.cpp        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -59,8 +59,7 @@
</span><span class="cx"> 
</span><span class="cx"> static const double elementMainContentCheckInterval = .250;
</span><span class="cx"> 
</span><del>-static bool isMainContent(const HTMLMediaElement&amp;);
-static bool isElementLargeEnoughForMainContent(const HTMLMediaElement&amp;);
</del><ins>+static bool isElementLargeEnoughForMainContent(const HTMLMediaElement&amp;, MediaSessionMainContentPurpose);
</ins><span class="cx"> 
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="cx"> static String restrictionName(MediaElementSession::BehaviorRestrictions restriction)
</span><span class="lines">@@ -274,7 +273,7 @@
</span><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (isLargeEnoughForMainContent()) {
</del><ins>+        if (isLargeEnoughForMainContent(MediaSessionMainContentPurpose::MediaControls)) {
</ins><span class="cx">             LOG(Media, &quot;MediaElementSession::canShowControlsManager - returning TRUE: Is main content&quot;);
</span><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="lines">@@ -284,9 +283,9 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MediaElementSession::isLargeEnoughForMainContent() const
</del><ins>+bool MediaElementSession::isLargeEnoughForMainContent(MediaSessionMainContentPurpose purpose) const
</ins><span class="cx"> {
</span><del>-    return isElementLargeEnoughForMainContent(m_element);
</del><ins>+    return isElementLargeEnoughForMainContent(m_element, purpose);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> double MediaElementSession::mostRecentUserInteractionTime() const
</span><span class="lines">@@ -296,7 +295,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool MediaElementSession::wantsToObserveViewportVisibilityForMediaControls() const
</span><span class="cx"> {
</span><del>-    return isLargeEnoughForMainContent();
</del><ins>+    return isLargeEnoughForMainContent(MediaSessionMainContentPurpose::MediaControls);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MediaElementSession::wantsToObserveViewportVisibilityForAutoplay() const
</span><span class="lines">@@ -582,7 +581,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-static bool isMainContent(const HTMLMediaElement&amp; element)
</del><ins>+static bool isMainContentForPurposesOfAutoplay(const HTMLMediaElement&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     if (!element.hasAudio() || !element.hasVideo())
</span><span class="cx">         return false;
</span><span class="lines">@@ -592,7 +591,7 @@
</span><span class="cx">     if (!renderer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (!isElementLargeEnoughForMainContent(element))
</del><ins>+    if (!isElementLargeEnoughForMainContent(element, MediaSessionMainContentPurpose::Autoplay))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // Elements which are hidden by style, or have been scrolled out of view, cannot be main content.
</span><span class="lines">@@ -652,10 +651,10 @@
</span><span class="cx">     return maxVisibleClientWidth * maxVisibleClientHeight &gt; minimumPercentageOfMainFrameAreaForMainContent * mainFrameView.visibleWidth() * mainFrameView.visibleHeight();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool isElementLargeEnoughForMainContent(const HTMLMediaElement&amp; element)
</del><ins>+static bool isElementLargeEnoughForMainContent(const HTMLMediaElement&amp; element, MediaSessionMainContentPurpose purpose)
</ins><span class="cx"> {
</span><span class="cx">     static const double elementMainContentAreaMinimum = 400 * 300;
</span><del>-    static const double maximumAspectRatio = 1.8; // Slightly larger than 16:9.
</del><ins>+    static const double maximumAspectRatio = purpose == MediaSessionMainContentPurpose::MediaControls ? 3 : 1.8;
</ins><span class="cx">     static const double minimumAspectRatio = .5; // Slightly smaller than 9:16.
</span><span class="cx"> 
</span><span class="cx">     // Elements which have not yet been laid out, or which are not yet in the DOM, cannot be main content.
</span><span class="lines">@@ -688,7 +687,7 @@
</span><span class="cx"> bool MediaElementSession::updateIsMainContent() const
</span><span class="cx"> {
</span><span class="cx">     bool wasMainContent = m_isMainContent;
</span><del>-    m_isMainContent = isMainContent(m_element);
</del><ins>+    m_isMainContent = isMainContentForPurposesOfAutoplay(m_element);
</ins><span class="cx"> 
</span><span class="cx">     if (m_isMainContent != wasMainContent)
</span><span class="cx">         m_element.updateShouldPlay();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlMediaElementSessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/MediaElementSession.h (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/MediaElementSession.h        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Source/WebCore/html/MediaElementSession.h        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -35,6 +35,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+enum class MediaSessionMainContentPurpose {
+    MediaControls,
+    Autoplay
+};
+
</ins><span class="cx"> class Document;
</span><span class="cx"> class HTMLMediaElement;
</span><span class="cx"> class SourceBuffer;
</span><span class="lines">@@ -114,7 +119,7 @@
</span><span class="cx">     bool wantsToObserveViewportVisibilityForMediaControls() const;
</span><span class="cx">     bool wantsToObserveViewportVisibilityForAutoplay() const;
</span><span class="cx">     bool canShowControlsManager() const;
</span><del>-    bool isLargeEnoughForMainContent() const;
</del><ins>+    bool isLargeEnoughForMainContent(MediaSessionMainContentPurpose) const;
</ins><span class="cx">     double mostRecentUserInteractionTime() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Tools/ChangeLog        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-09-10  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Apple.com keynote does not display media controls
+        https://bugs.webkit.org/show_bug.cgi?id=161833
+        &lt;rdar://problem/28230123&gt;
+
+        Reviewed by Tim Horton.
+
+        New unit test verifying that wide videos (~2 aspect ratio) still get media controls.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html: Added.
+
</ins><span class="cx"> 2016-09-09  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WKThumbnailView should expose a mode where it can be reparented without resnapshotting
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">                 2DD7D3AF178227B30026E1E3 /* lots-of-text-vertical-lr.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */; };
</span><span class="cx">                 2DE71AFE1D49C0BD00904094 /* AnimatedResize.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DE71AFD1D49C0BD00904094 /* AnimatedResize.mm */; };
</span><span class="cx">                 2DE71B001D49C3ED00904094 /* blinking-div.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2DE71AFF1D49C2F000904094 /* blinking-div.html */; };
</span><ins>+                2E131C181D83A98A001BA36C /* wide-autoplaying-video-with-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2E131C171D83A97E001BA36C /* wide-autoplaying-video-with-audio.html */; };
</ins><span class="cx">                 2E14A5291D3FE96B0010F35B /* autoplaying-video-with-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2E14A5281D3FE8B80010F35B /* autoplaying-video-with-audio.html */; };
</span><span class="cx">                 2E1B7B001D41ABA7007558B4 /* large-video-seek-after-ending.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2E1B7AFF1D41A95F007558B4 /* large-video-seek-after-ending.html */; };
</span><span class="cx">                 2E1B7B021D41B1B9007558B4 /* large-video-hides-controls-after-seek-to-end.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2E1B7B011D41B1B3007558B4 /* large-video-hides-controls-after-seek-to-end.html */; };
</span><span class="lines">@@ -528,6 +529,7 @@
</span><span class="cx">                         dstPath = TestWebKitAPI.resources;
</span><span class="cx">                         dstSubfolderSpec = 7;
</span><span class="cx">                         files = (
</span><ins>+                                2E131C181D83A98A001BA36C /* wide-autoplaying-video-with-audio.html in Copy Resources */,
</ins><span class="cx">                                 2E54F40D1D7BC84200921ADF /* large-video-mutes-onplaying.html in Copy Resources */,
</span><span class="cx">                                 2E691AF31D79E75E00129407 /* large-video-playing-scroll-away.html in Copy Resources */,
</span><span class="cx">                                 2E691AF11D79E51A00129407 /* large-videos-autoplaying-scroll-to-video.html in Copy Resources */,
</span><span class="lines">@@ -753,6 +755,7 @@
</span><span class="cx">                 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = &quot;lots-of-text-vertical-lr.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DE71AFD1D49C0BD00904094 /* AnimatedResize.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AnimatedResize.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DE71AFF1D49C2F000904094 /* blinking-div.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;blinking-div.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2E131C171D83A97E001BA36C /* wide-autoplaying-video-with-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;wide-autoplaying-video-with-audio.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2E14A5281D3FE8B80010F35B /* autoplaying-video-with-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;autoplaying-video-with-audio.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E1B7AFF1D41A95F007558B4 /* large-video-seek-after-ending.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;large-video-seek-after-ending.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E1B7B011D41B1B3007558B4 /* large-video-hides-controls-after-seek-to-end.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;large-video-hides-controls-after-seek-to-end.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1423,6 +1426,7 @@
</span><span class="cx">                 A16F66B81C40E9E100BD4D24 /* Resources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                2E131C171D83A97E001BA36C /* wide-autoplaying-video-with-audio.html */,
</ins><span class="cx">                                 2E54F40C1D7BC83900921ADF /* large-video-mutes-onplaying.html */,
</span><span class="cx">                                 2E691AF21D79E75400129407 /* large-video-playing-scroll-away.html */,
</span><span class="cx">                                 2E691AF01D79E51400129407 /* large-videos-autoplaying-scroll-to-video.html */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaVideoControlsManagermm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm (205783 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm        2016-09-10 02:20:11 UTC (rev 205783)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -411,6 +411,14 @@
</span><span class="cx">     [webView expectControlsManager:NO afterReceivingMessage:@&quot;playing&quot;];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TEST(VideoControlsManager, VideoControlsManagerWideMediumSizedVideoInWideMainFrame)
+{
+    RetainPtr&lt;VideoControlsManagerTestWebView*&gt; webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800));
+
+    [webView loadTestPageNamed:@&quot;wide-autoplaying-video-with-audio&quot;];
+    [webView expectControlsManager:YES afterReceivingMessage:@&quot;playing&quot;];
+}
+
</ins><span class="cx"> TEST(VideoControlsManager, VideoControlsManagerFullSizeVideoInWideMainFrame)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;VideoControlsManagerTestWebView*&gt; webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800));
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2Cocoawideautoplayingvideowithaudiohtml"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html (0 => 205784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html        2016-09-10 08:19:10 UTC (rev 205784)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        video {
+            width: 800px;
+            height: 400px;
+        }
+    &lt;/style&gt;
+    &lt;script&gt;
+    function finishTest() {
+        setTimeout(function() {
+            try {
+                window.webkit.messageHandlers.playingHandler.postMessage(&quot;playing&quot;);
+            } catch(e) { }
+        }, 0);
+    }
+   &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;video autoplay src=&quot;video-with-audio.mp4&quot; webkit-playsinline onplaying=finishTest()&gt;&lt;/video&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>