<!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>[244197] 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/244197">244197</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2019-04-11 15:15:01 -0700 (Thu, 11 Apr 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Allow the MediaSource API to be enabled via website policy
https://bugs.webkit.org/show_bug.cgi?id=196429
<rdar://problem/48774333>

Reviewed by Tim Horton.

Source/WebCore:

Add support in DocumentLoader for adjusting page settings using its per-site policies. See WebKit ChangeLog for
more detail (in particular, the implementation of applyToDocumentLoader).

Test: fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::applyPoliciesToSettings const):
(WebCore::DocumentLoader::attachToFrame):
* loader/DocumentLoader.h:

Add an enum class for MediaSource policies; while we're at it, make all of these enum values 8 bits wide.

(WebCore::DocumentLoader::mediaSourcePolicy const):
(WebCore::DocumentLoader::setMediaSourcePolicy):

Source/WebKit:

Adds support for using WebsitePolicies to determine whether to enable the MediaSource API.

* Shared/WebPreferences.yaml:

Disengage the mediaSourceEnabled internal preference from the corresponding WebCore setting; to ensure that
setting the preference to `true` still results in enabling the MediaSource API, we instead make it such that
turning on mediaSourceEnabled causes WebsitePolicies to set its WebsiteMediaSourcePolicy to Enable.

In the future, we should deprecate and remove this preference, in favor of simply setting preferred
compatibility mode on WKWebpagePreferences.

* Shared/WebPreferences.yaml:
* Shared/WebsiteMediaSourcePolicy.h: Copied from Source/WebKit/Shared/WebsitePoliciesData.h.
* Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):

Add plumbing for m_mediaSourcePolicy in the set of website policies.

(WebKit::WebsitePoliciesData::applyToDocumentLoader):

Update the document loader with the given media source policy. There are two possibilities when applying the set
of policies to the document loader; either the document loader is already attached to a Frame, or the document
loader is yet to be attached to a Frame.

In the first case, we update Frame's settings on the spot, by calling the new applyPoliciesToSettings helper
method. In the second scenario, we stash the policy state on DocumentLoader; when the DocumentLoader is attached
to a Frame, we'll then update the Frame's settings using DocumentLoader's policy.

* Shared/WebsitePoliciesData.h:
* UIProcess/API/APIWebsitePolicies.cpp:
(API::WebsitePolicies::data):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

Move code that adjusts website policies after deciding policies for the navigation action from NavigationClient
::decidePolicyForNavigationAction to the completion handler of the policy listener. This allows us to respect
default website policies on the web view configuration, even when using the C API to set the navigation client,
and also allows us to have a single call site for adjustPoliciesForCompatibilityMode. This also enables our
layout tests to opt into modern compatibility mode by default, when specifying modern compatibility mode on
webpage preferences.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::adjustPoliciesForCompatibilityMode):
* UIProcess/WebPageProxy.h:
* WebKit.xcodeproj/project.pbxproj:

LayoutTests:

Add an on-device layout test to ensure that enabling modern compability mode also enables MSE.

* TestExpectations:
* fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode-expected.txt: Added.
* fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/ios/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiosTestExpectations">trunk/LayoutTests/platform/ios/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoaderh">trunk/Source/WebCore/loader/DocumentLoader.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitSharedWebPreferencesyaml">trunk/Source/WebKit/Shared/WebPreferences.yaml</a></li>
<li><a href="#trunkSourceWebKitSharedWebsitePoliciesDatacpp">trunk/Source/WebKit/Shared/WebsitePoliciesData.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedWebsitePoliciesDatah">trunk/Source/WebKit/Shared/WebsitePoliciesData.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPIAPIWebsitePoliciescpp">trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPIAPIWebsitePoliciesh">trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaNavigationStatemm">trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/fast/media/ios/</li>
<li>trunk/LayoutTests/fast/media/ios/ipad/</li>
<li><a href="#trunkLayoutTestsfastmediaiosipadenableMediaSourceAPIinmoderncompatibilitymodeexpectedtxt">trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediaiosipadenableMediaSourceAPIinmoderncompatibilitymodehtml">trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html</a></li>
<li><a href="#trunkSourceWebKitSharedWebsiteMediaSourcePolicyh">trunk/Source/WebKit/Shared/WebsiteMediaSourcePolicy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/LayoutTests/ChangeLog 2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Allow the MediaSource API to be enabled via website policy
+        https://bugs.webkit.org/show_bug.cgi?id=196429
+        <rdar://problem/48774333>
+
+        Reviewed by Tim Horton.
+
+        Add an on-device layout test to ensure that enabling modern compability mode also enables MSE.
+
+        * TestExpectations:
+        * fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode-expected.txt: Added.
+        * fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html: Added.
+        * platform/ios-simulator/TestExpectations:
+        * platform/ios/TestExpectations:
+
</ins><span class="cx"> 2019-04-11  Devin Rousso  <drousso@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Timelines: can't reliably stop/start a recording
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations       2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/LayoutTests/TestExpectations  2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> pointerevents/ios [ Skip ]
</span><span class="cx"> editing/pasteboard/ios [ Skip ]
</span><span class="cx"> editing/pasteboard/mac [ Skip ]
</span><ins>+fast/media/ios [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # WebKit2 only.
</span><span class="cx"> printing/printing-events.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediaiosipadenableMediaSourceAPIinmoderncompatibilitymodeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode-expected.txt (0 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode-expected.txt                           (rev 0)
+++ trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode-expected.txt      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+This test verifies that the MediaSource API is enabled when enabling modern compatibility mode.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS 'MediaSource' in window is true
+PASS MediaSource.prototype is Object.getPrototypeOf(new MediaSource)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediaiosipadenableMediaSourceAPIinmoderncompatibilitymodehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html (0 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html                           (rev 0)
+++ trunk/LayoutTests/fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!-- webkit-test-runner [ shouldUseModernCompatibilityMode=true ] -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("This test verifies that the MediaSource API is enabled when enabling modern compatibility mode.");
+shouldBe("'MediaSource' in window", "true");
+shouldBe("MediaSource.prototype", "Object.getPrototypeOf(new MediaSource)");
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiosTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios/TestExpectations (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios/TestExpectations  2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/LayoutTests/platform/ios/TestExpectations     2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -13,6 +13,8 @@
</span><span class="cx"> quicklook [ Pass ]
</span><span class="cx"> swipe [ Pass ]
</span><span class="cx"> 
</span><ins>+fast/media/ios [ Pass ]
+
</ins><span class="cx"> fast/forms/textarea/ios [ Pass ]
</span><span class="cx"> fast/text-autosizing/ios [ Pass ]
</span><span class="cx"> fast/zooming/ios [ Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations   2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -13,6 +13,9 @@
</span><span class="cx"> fast/forms/searchfield-heights.html [ Skip ]
</span><span class="cx"> fast/forms/visual-hebrew-text-field.html [ Skip ]
</span><span class="cx"> 
</span><ins>+# The MediaSource API is unsupported on iOS simulator.
+fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html [ Skip ]
+
</ins><span class="cx"> # -webkit-flex off-by-one px
</span><span class="cx"> webkit.org/b/126898 css3/flexbox/image-percent-max-height.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebCore/ChangeLog      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Allow the MediaSource API to be enabled via website policy
+        https://bugs.webkit.org/show_bug.cgi?id=196429
+        <rdar://problem/48774333>
+
+        Reviewed by Tim Horton.
+
+        Add support in DocumentLoader for adjusting page settings using its per-site policies. See WebKit ChangeLog for
+        more detail (in particular, the implementation of applyToDocumentLoader).
+
+        Test: fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::applyPoliciesToSettings const):
+        (WebCore::DocumentLoader::attachToFrame):
+        * loader/DocumentLoader.h:
+
+        Add an enum class for MediaSource policies; while we're at it, make all of these enum values 8 bits wide.
+
+        (WebCore::DocumentLoader::mediaSourcePolicy const):
+        (WebCore::DocumentLoader::setMediaSourcePolicy):
+
</ins><span class="cx"> 2019-04-11  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Support RTCDataChannel blob binaryType
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp   2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -1175,6 +1175,21 @@
</span><span class="cx">     m_frame->document()->domWindow()->finishedLoading();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void DocumentLoader::applyPoliciesToSettings()
+{
+    if (!m_frame) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+
+    if (!m_frame->isMainFrame())
+        return;
+
+#if ENABLE(MEDIA_SOURCE)
+    m_frame->settings().setMediaSourceEnabled(m_mediaSourcePolicy == MediaSourcePolicy::Default ? Settings::platformDefaultMediaSourceEnabled() : m_mediaSourcePolicy == MediaSourcePolicy::Enable);
+#endif
+}
+
</ins><span class="cx"> void DocumentLoader::attachToFrame(Frame& frame)
</span><span class="cx"> {
</span><span class="cx">     if (m_frame == &frame)
</span><span class="lines">@@ -1188,6 +1203,8 @@
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     m_hasEverBeenAttached = true;
</span><span class="cx"> #endif
</span><ins>+
+    applyPoliciesToSettings();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DocumentLoader::attachToFrame()
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.h (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.h     2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebCore/loader/DocumentLoader.h        2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> 
</span><span class="cx"> using ResourceLoaderMap = HashMap<unsigned long, RefPtr<ResourceLoader>>;
</span><span class="cx"> 
</span><del>-enum class AutoplayPolicy {
</del><ins>+enum class AutoplayPolicy : uint8_t {
</ins><span class="cx">     Default, // Uses policies specified in document settings.
</span><span class="cx">     Allow,
</span><span class="cx">     AllowWithoutSound,
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">     Deny,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-enum class AutoplayQuirk {
</del><ins>+enum class AutoplayQuirk : uint8_t {
</ins><span class="cx">     SynthesizedPauseEvents = 1 << 0,
</span><span class="cx">     InheritedUserGestures = 1 << 1,
</span><span class="cx">     ArbitraryUserGestures = 1 << 2,
</span><span class="lines">@@ -106,18 +106,24 @@
</span><span class="cx">     PerDocumentAutoplayBehavior = 1 << 3,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-enum class PopUpPolicy {
</del><ins>+enum class PopUpPolicy : uint8_t {
</ins><span class="cx">     Default, // Uses policies specified in frame settings.
</span><span class="cx">     Allow,
</span><span class="cx">     Block,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-enum class MetaViewportPolicy {
</del><ins>+enum class MetaViewportPolicy : uint8_t {
</ins><span class="cx">     Default,
</span><span class="cx">     Respect,
</span><span class="cx">     Ignore,
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum class MediaSourcePolicy : uint8_t {
+    Default,
+    Disable,
+    Enable
+};
+
</ins><span class="cx"> class DocumentLoader
</span><span class="cx">     : public RefCounted<DocumentLoader>
</span><span class="cx">     , public FrameDestructionObserver
</span><span class="lines">@@ -292,6 +298,9 @@
</span><span class="cx">     MetaViewportPolicy metaViewportPolicy() const { return m_metaViewportPolicy; }
</span><span class="cx">     void setMetaViewportPolicy(MetaViewportPolicy policy) { m_metaViewportPolicy = policy; }
</span><span class="cx"> 
</span><ins>+    MediaSourcePolicy mediaSourcePolicy() const { return m_mediaSourcePolicy; }
+    void setMediaSourcePolicy(MediaSourcePolicy policy) { m_mediaSourcePolicy = policy; }
+
</ins><span class="cx">     void addSubresourceLoader(ResourceLoader*);
</span><span class="cx">     void removeSubresourceLoader(LoadCompletionType, ResourceLoader*);
</span><span class="cx">     void addPlugInStreamLoader(ResourceLoader&);
</span><span class="lines">@@ -359,6 +368,8 @@
</span><span class="cx">     void setDownloadAttribute(const String& attribute) { m_downloadAttribute = attribute; }
</span><span class="cx">     const String& downloadAttribute() const { return m_downloadAttribute; }
</span><span class="cx"> 
</span><ins>+    WEBCORE_EXPORT void applyPoliciesToSettings();
+
</ins><span class="cx"> protected:
</span><span class="cx">     WEBCORE_EXPORT DocumentLoader(const ResourceRequest&, const SubstituteData&);
</span><span class="cx"> 
</span><span class="lines">@@ -569,6 +580,7 @@
</span><span class="cx">     OptionSet<AutoplayQuirk> m_allowedAutoplayQuirks;
</span><span class="cx">     PopUpPolicy m_popUpPolicy { PopUpPolicy::Default };
</span><span class="cx">     MetaViewportPolicy m_metaViewportPolicy { MetaViewportPolicy::Default };
</span><ins>+    MediaSourcePolicy m_mediaSourcePolicy { MediaSourcePolicy::Default };
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SERVICE_WORKER)
</span><span class="cx">     Optional<ServiceWorkerRegistrationData> m_serviceWorkerRegistrationData;
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/ChangeLog       2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Allow the MediaSource API to be enabled via website policy
+        https://bugs.webkit.org/show_bug.cgi?id=196429
+        <rdar://problem/48774333>
+
+        Reviewed by Tim Horton.
+
+        Adds support for using WebsitePolicies to determine whether to enable the MediaSource API.
+
+        * Shared/WebPreferences.yaml:
+
+        Disengage the mediaSourceEnabled internal preference from the corresponding WebCore setting; to ensure that
+        setting the preference to `true` still results in enabling the MediaSource API, we instead make it such that
+        turning on mediaSourceEnabled causes WebsitePolicies to set its WebsiteMediaSourcePolicy to Enable.
+
+        In the future, we should deprecate and remove this preference, in favor of simply setting preferred
+        compatibility mode on WKWebpagePreferences.
+
+        * Shared/WebPreferences.yaml:
+        * Shared/WebsiteMediaSourcePolicy.h: Copied from Source/WebKit/Shared/WebsitePoliciesData.h.
+        * Shared/WebsitePoliciesData.cpp:
+        (WebKit::WebsitePoliciesData::encode const):
+        (WebKit::WebsitePoliciesData::decode):
+
+        Add plumbing for m_mediaSourcePolicy in the set of website policies.
+
+        (WebKit::WebsitePoliciesData::applyToDocumentLoader):
+
+        Update the document loader with the given media source policy. There are two possibilities when applying the set
+        of policies to the document loader; either the document loader is already attached to a Frame, or the document
+        loader is yet to be attached to a Frame.
+
+        In the first case, we update Frame's settings on the spot, by calling the new applyPoliciesToSettings helper
+        method. In the second scenario, we stash the policy state on DocumentLoader; when the DocumentLoader is attached
+        to a Frame, we'll then update the Frame's settings using DocumentLoader's policy.
+
+        * Shared/WebsitePoliciesData.h:
+        * UIProcess/API/APIWebsitePolicies.cpp:
+        (API::WebsitePolicies::data):
+        * UIProcess/API/APIWebsitePolicies.h:
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageNavigationClient):
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
+
+        Move code that adjusts website policies after deciding policies for the navigation action from NavigationClient
+        ::decidePolicyForNavigationAction to the completion handler of the policy listener. This allows us to respect
+        default website policies on the web view configuration, even when using the C API to set the navigation client,
+        and also allows us to have a single call site for adjustPoliciesForCompatibilityMode. This also enables our
+        layout tests to opt into modern compatibility mode by default, when specifying modern compatibility mode on
+        webpage preferences.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+        (WebKit::WebPageProxy::adjustPoliciesForCompatibilityMode):
+        * UIProcess/WebPageProxy.h:
+        * WebKit.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2019-04-11  Antti Koivisto  <antti@apple.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: changing iPad orientation on blogger.com crashes under RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations()
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPreferencesyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPreferences.yaml   2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -590,6 +590,7 @@
</span><span class="cx">   type: bool
</span><span class="cx">   defaultValue: WebCore::Settings::platformDefaultMediaSourceEnabled()
</span><span class="cx">   condition: ENABLE(MEDIA_SOURCE)
</span><ins>+  webcoreBinding: none
</ins><span class="cx"> 
</span><span class="cx"> ViewGestureDebuggingEnabled:
</span><span class="cx">   type: bool
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebsiteMediaSourcePolicyhfromrev244196trunkSourceWebKitSharedWebsitePoliciesDatah"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/Shared/WebsiteMediaSourcePolicy.h (from rev 244196, trunk/Source/WebKit/Shared/WebsitePoliciesData.h) (0 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebsiteMediaSourcePolicy.h                            (rev 0)
+++ trunk/Source/WebKit/Shared/WebsiteMediaSourcePolicy.h       2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/Forward.h>
+
+namespace WebKit {
+
+enum class WebsiteMediaSourcePolicy : uint8_t {
+    Default,
+    Disable,
+    Enable
+};
+
+} // namespace WebKit
+
+namespace WTF {
+
+template<> struct EnumTraits<WebKit::WebsiteMediaSourcePolicy> {
+    using values = EnumValues<
+        WebKit::WebsiteMediaSourcePolicy,
+        WebKit::WebsiteMediaSourcePolicy::Default,
+        WebKit::WebsiteMediaSourcePolicy::Disable,
+        WebKit::WebsiteMediaSourcePolicy::Enable
+    >;
+};
+
+} // namespace WTF
</ins></span></pre></div>
<a id="trunkSourceWebKitSharedWebsitePoliciesDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebsitePoliciesData.cpp (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebsitePoliciesData.cpp       2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/Shared/WebsitePoliciesData.cpp  2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">     encoder << customJavaScriptUserAgentAsSiteSpecificQuirks;
</span><span class="cx">     encoder << customNavigatorPlatform;
</span><span class="cx">     encoder << metaViewportPolicy;
</span><ins>+    encoder << mediaSourcePolicy;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Optional<WebsitePoliciesData> WebsitePoliciesData::decode(IPC::Decoder& decoder)
</span><span class="lines">@@ -105,6 +106,11 @@
</span><span class="cx">     decoder >> metaViewportPolicy;
</span><span class="cx">     if (!metaViewportPolicy)
</span><span class="cx">         return WTF::nullopt;
</span><ins>+
+    Optional<WebsiteMediaSourcePolicy> mediaSourcePolicy;
+    decoder >> mediaSourcePolicy;
+    if (!mediaSourcePolicy)
+        return WTF::nullopt;
</ins><span class="cx">     
</span><span class="cx">     return { {
</span><span class="cx">         WTFMove(*contentBlockersEnabled),
</span><span class="lines">@@ -118,6 +124,7 @@
</span><span class="cx">         WTFMove(*customJavaScriptUserAgentAsSiteSpecificQuirks),
</span><span class="cx">         WTFMove(*customNavigatorPlatform),
</span><span class="cx">         WTFMove(*metaViewportPolicy),
</span><ins>+        WTFMove(*mediaSourcePolicy),
</ins><span class="cx">     } };
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -189,12 +196,30 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (websitePolicies.websiteDataStoreParameters) {
-        if (auto* frame = documentLoader.frame()) {
-            if (auto* page = frame->page())
-                page->setSessionID(websitePolicies.websiteDataStoreParameters->networkSessionParameters.sessionID);
-        }
</del><ins>+    switch (websitePolicies.mediaSourcePolicy) {
+    case WebsiteMediaSourcePolicy::Default:
+        documentLoader.setMediaSourcePolicy(WebCore::MediaSourcePolicy::Default);
+        break;
+    case WebsiteMediaSourcePolicy::Disable:
+        documentLoader.setMediaSourcePolicy(WebCore::MediaSourcePolicy::Disable);
+        break;
+    case WebsiteMediaSourcePolicy::Enable:
+        documentLoader.setMediaSourcePolicy(WebCore::MediaSourcePolicy::Enable);
+        break;
</ins><span class="cx">     }
</span><ins>+
+    auto* frame = documentLoader.frame();
+    if (!frame)
+        return;
+
+    documentLoader.applyPoliciesToSettings();
+
+    auto* page = frame->page();
+    if (!page)
+        return;
+
+    if (websitePolicies.websiteDataStoreParameters)
+        page->setSessionID(websitePolicies.websiteDataStoreParameters->networkSessionParameters.sessionID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebsitePoliciesDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebsitePoliciesData.h (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebsitePoliciesData.h 2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/Shared/WebsitePoliciesData.h    2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "WebsiteAutoplayPolicy.h"
</span><span class="cx"> #include "WebsiteAutoplayQuirk.h"
</span><span class="cx"> #include "WebsiteDataStoreParameters.h"
</span><ins>+#include "WebsiteMediaSourcePolicy.h"
</ins><span class="cx"> #include "WebsiteMetaViewportPolicy.h"
</span><span class="cx"> #include "WebsitePopUpPolicy.h"
</span><span class="cx"> #include <WebCore/HTTPHeaderField.h>
</span><span class="lines">@@ -58,6 +59,7 @@
</span><span class="cx">     String customJavaScriptUserAgentAsSiteSpecificQuirks;
</span><span class="cx">     String customNavigatorPlatform;
</span><span class="cx">     WebsiteMetaViewportPolicy metaViewportPolicy { WebsiteMetaViewportPolicy::Default };
</span><ins>+    WebsiteMediaSourcePolicy mediaSourcePolicy { WebsiteMediaSourcePolicy::Default };
</ins><span class="cx"> 
</span><span class="cx">     void encode(IPC::Encoder&) const;
</span><span class="cx">     static Optional<WebsitePoliciesData> decode(IPC::Decoder&);
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPIAPIWebsitePoliciescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp 2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp    2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx">         m_customJavaScriptUserAgentAsSiteSpecificQuirks,
</span><span class="cx">         m_customNavigatorPlatform,
</span><span class="cx">         m_metaViewportPolicy,
</span><ins>+        m_mediaSourcePolicy
</ins><span class="cx">     };
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPIAPIWebsitePoliciesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.h (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.h   2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.h      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "WebCompatibilityMode.h"
</span><span class="cx"> #include "WebsiteAutoplayPolicy.h"
</span><span class="cx"> #include "WebsiteAutoplayQuirk.h"
</span><ins>+#include "WebsiteMediaSourcePolicy.h"
</ins><span class="cx"> #include "WebsiteMetaViewportPolicy.h"
</span><span class="cx"> #include "WebsitePopUpPolicy.h"
</span><span class="cx"> #include <WebCore/HTTPHeaderField.h>
</span><span class="lines">@@ -90,6 +91,9 @@
</span><span class="cx">     WebKit::WebsiteMetaViewportPolicy metaViewportPolicy() const { return m_metaViewportPolicy; }
</span><span class="cx">     void setMetaViewportPolicy(WebKit::WebsiteMetaViewportPolicy policy) { m_metaViewportPolicy = policy; }
</span><span class="cx"> 
</span><ins>+    WebKit::WebsiteMediaSourcePolicy mediaSourcePolicy() const { return m_mediaSourcePolicy; }
+    void setMediaSourcePolicy(WebKit::WebsiteMediaSourcePolicy policy) { m_mediaSourcePolicy = policy; }
+
</ins><span class="cx"> private:
</span><span class="cx">     WebsitePolicies(bool contentBlockersEnabled, OptionSet<WebKit::WebsiteAutoplayQuirk>, WebKit::WebsiteAutoplayPolicy, Vector<WebCore::HTTPHeaderField>&&, WebKit::WebsitePopUpPolicy, RefPtr<WebsiteDataStore>&&);
</span><span class="cx"> 
</span><span class="lines">@@ -105,6 +109,7 @@
</span><span class="cx">     WTF::String m_customNavigatorPlatform;
</span><span class="cx">     WebKit::WebCompatibilityMode m_preferredCompatibilityMode { WebKit::WebCompatibilityMode::Default };
</span><span class="cx">     WebKit::WebsiteMetaViewportPolicy m_metaViewportPolicy { WebKit::WebsiteMetaViewportPolicy::Default };
</span><ins>+    WebKit::WebsiteMediaSourcePolicy m_mediaSourcePolicy { WebKit::WebsiteMediaSourcePolicy::Default };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm   2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -525,9 +525,6 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if (defaultWebsitePolicies)
-                webPage->adjustPoliciesForCompatibilityMode(navigationAction, *defaultWebsitePolicies);
-
</del><span class="cx">             if (!navigationAction->targetFrame()) {
</span><span class="cx">                 listener->use(defaultWebsitePolicies.get());
</span><span class="cx">                 return;
</span><span class="lines">@@ -597,8 +594,6 @@
</span><span class="cx">                 [NSException raise:NSInvalidArgumentException format:@"WKWebpagePreferences._customUserAgent must be nil for subframe navigations."];
</span><span class="cx">             if (!apiWebsitePolicies->customNavigatorPlatform().isNull() && subframeNavigation)
</span><span class="cx">                 [NSException raise:NSInvalidArgumentException format:@"WKWebpagePreferences._customNavigatorPlatform must be nil for subframe navigations."];
</span><del>-
-            webPageProxy->adjustPoliciesForCompatibilityMode(navigationAction, *apiWebsitePolicies);
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch (actionPolicy) {
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -4569,6 +4569,14 @@
</span><span class="cx">     auto listener = makeRef(frame.setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(frame), sender = WTFMove(sender), navigation] (PolicyAction policyAction, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning) mutable {
</span><span class="cx"> 
</span><span class="cx">         auto completionHandler = [this, protectedThis = protectedThis.copyRef(), frame = frame.copyRef(), sender = WTFMove(sender), navigation = WTFMove(navigation), processSwapRequestedByClient, policies = makeRefPtr(policies)] (PolicyAction policyAction) mutable {
</span><ins>+            if (frame->isMainFrame()) {
+                if (!policies) {
+                    if (auto* defaultPolicies = m_configuration->defaultWebsitePolicies())
+                        policies = defaultPolicies->copy();
+                }
+                if (policies)
+                    adjustPoliciesForCompatibilityMode(*policies);
+            }
</ins><span class="cx">             receivedNavigationPolicyDecision(policyAction, navigation.get(), processSwapRequestedByClient, frame, policies.get(), WTFMove(sender));
</span><span class="cx">         };
</span><span class="cx"> 
</span><span class="lines">@@ -8912,7 +8920,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS_FAMILY) || !USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> 
</span><del>-void WebPageProxy::adjustPoliciesForCompatibilityMode(const API::NavigationAction&, API::WebsitePolicies&)
</del><ins>+void WebPageProxy::adjustPoliciesForCompatibilityMode(API::WebsitePolicies&)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -1514,7 +1514,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void configureLoggingChannel(const String&, WTFLogChannelState, WTFLogLevel);
</span><del>-    void adjustPoliciesForCompatibilityMode(const API::NavigationAction&, API::WebsitePolicies&);
</del><span class="cx"> 
</span><span class="cx">     void addObserver(WebViewDidMoveToWindowObserver&);
</span><span class="cx">     void removeObserver(WebViewDidMoveToWindowObserver&);
</span><span class="lines">@@ -1622,6 +1621,8 @@
</span><span class="cx">     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&);
</span><span class="cx">     void beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListenerProxy&);
</span><span class="cx"> 
</span><ins>+    void adjustPoliciesForCompatibilityMode(API::WebsitePolicies&);
+
</ins><span class="cx">     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&);
</span><span class="cx"> 
</span><span class="cx">     void contentRuleListNotification(URL&&, WebCore::ContentRuleListResults&&);
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (244196 => 244197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj     2019-04-11 21:51:10 UTC (rev 244196)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2019-04-11 22:15:01 UTC (rev 244197)
</span><span class="lines">@@ -1649,6 +1649,7 @@
</span><span class="cx">          F44DFEB21E9E752F0038D196 /* WebIconUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = F44DFEB01E9E752F0038D196 /* WebIconUtilities.h */; };
</span><span class="cx">          F48D2A8521583A7E00C6752B /* AppKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = F48D2A8421583A0200C6752B /* AppKitSPI.h */; };
</span><span class="cx">          F496A4311F58A272004C1757 /* DragDropInteractionState.h in Headers */ = {isa = PBXBuildFile; fileRef = F496A42F1F58A272004C1757 /* DragDropInteractionState.h */; };
</span><ins>+               F4CB09E5225D5A0900891487 /* WebsiteMediaSourcePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F4CB09E4225D5A0300891487 /* WebsiteMediaSourcePolicy.h */; };
</ins><span class="cx">           F4D5F51D206087A10038BBA8 /* WKTextInputListViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = F4D5F519206087A00038BBA8 /* WKTextInputListViewController.h */; };
</span><span class="cx">          F4D5F51F206087A10038BBA8 /* WKQuickboardListViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = F4D5F51B206087A10038BBA8 /* WKQuickboardListViewController.h */; };
</span><span class="cx">          F6113E25126CE1820057D0A7 /* APIUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = F6113E24126CE1820057D0A7 /* APIUserContentURLPattern.h */; };
</span><span class="lines">@@ -4595,6 +4596,7 @@
</span><span class="cx">          F496A42F1F58A272004C1757 /* DragDropInteractionState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DragDropInteractionState.h; path = ios/DragDropInteractionState.h; sourceTree = "<group>"; };
</span><span class="cx">          F496A4301F58A272004C1757 /* DragDropInteractionState.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = DragDropInteractionState.mm; path = ios/DragDropInteractionState.mm; sourceTree = "<group>"; };
</span><span class="cx">          F4B378D021DDBBAB0095A378 /* WebUndoStepID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebUndoStepID.h; sourceTree = "<group>"; };
</span><ins>+               F4CB09E4225D5A0300891487 /* WebsiteMediaSourcePolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebsiteMediaSourcePolicy.h; sourceTree = "<group>"; };
</ins><span class="cx">           F4D5F519206087A00038BBA8 /* WKTextInputListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKTextInputListViewController.h; path = ios/forms/WKTextInputListViewController.h; sourceTree = "<group>"; };
</span><span class="cx">          F4D5F51A206087A10038BBA8 /* WKTextInputListViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKTextInputListViewController.mm; path = ios/forms/WKTextInputListViewController.mm; sourceTree = "<group>"; };
</span><span class="cx">          F4D5F51B206087A10038BBA8 /* WKQuickboardListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKQuickboardListViewController.h; path = ios/forms/WKQuickboardListViewController.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5235,9 +5237,10 @@
</span><span class="cx">                          5C8DD3811FE455CA00F2A556 /* WebsiteAutoplayQuirk.h */,
</span><span class="cx">                          511F7D3F1EB1BCEE00E47B83 /* WebsiteDataStoreParameters.cpp */,
</span><span class="cx">                          511F7D401EB1BCEE00E47B83 /* WebsiteDataStoreParameters.h */,
</span><ins>+                               F4CB09E4225D5A0300891487 /* WebsiteMediaSourcePolicy.h */,
+                               F430E941224732A9005FE053 /* WebsiteMetaViewportPolicy.h */,
</ins><span class="cx">                           5C3AEA8E1FE1F1DF002318D3 /* WebsitePoliciesData.cpp */,
</span><span class="cx">                          5C13024A1FE341A7000D9B31 /* WebsitePoliciesData.h */,
</span><del>-                               F430E941224732A9005FE053 /* WebsiteMetaViewportPolicy.h */,
</del><span class="cx">                           0EDE85022004E74900030560 /* WebsitePopUpPolicy.h */,
</span><span class="cx">                          8360349D1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp */,
</span><span class="cx">                          8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */,
</span><span class="lines">@@ -9709,6 +9712,8 @@
</span><span class="cx">                          1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
</span><span class="cx">                          1A53C2AA1A325730004E8C70 /* WebsiteDataStore.h in Headers */,
</span><span class="cx">                          511F7D411EB1BCF500E47B83 /* WebsiteDataStoreParameters.h in Headers */,
</span><ins>+                               F4CB09E5225D5A0900891487 /* WebsiteMediaSourcePolicy.h in Headers */,
+                               F430E9422247335F005FE053 /* WebsiteMetaViewportPolicy.h in Headers */,
</ins><span class="cx">                           0EDE85032004E75D00030560 /* WebsitePopUpPolicy.h in Headers */,
</span><span class="cx">                          C149380922347104000CD707 /* WebSpeechSynthesisClient.h in Headers */,
</span><span class="cx">                          836034A01ACB34D600626549 /* WebSQLiteDatabaseTracker.h in Headers */,
</span><span class="lines">@@ -9834,7 +9839,6 @@
</span><span class="cx">                          BC4075F8124FF0270068F20A /* WKData.h in Headers */,
</span><span class="cx">                          37A709A71E3EA0FD00CA5969 /* WKDataDetectorTypes.h in Headers */,
</span><span class="cx">                          37A709A91E3EA40C00CA5969 /* WKDataDetectorTypesInternal.h in Headers */,
</span><del>-                               F430E9422247335F005FE053 /* WebsiteMetaViewportPolicy.h in Headers */,
</del><span class="cx">                           2E94FC1620351A6D00974BA0 /* WKDatePickerViewController.h in Headers */,
</span><span class="cx">                          377EAD4517E2C51A002D193D /* WKDeclarationSpecifiers.h in Headers */,
</span><span class="cx">                          5C359C0D2154739F009E7948 /* WKDeprecated.h in Headers */,
</span></span></pre>
</div>
</div>

</body>
</html>