<!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>[280726] 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/280726">280726</a></dd>
<dt>Author</dt> <dd>peng.liu6@apple.com</dd>
<dt>Date</dt> <dd>2021-08-06 09:38:28 -0700 (Fri, 06 Aug 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[macOS] Clean up Feature Flags related code
https://bugs.webkit.org/show_bug.cgi?id=228803
<rdar://problem/81142982>

Reviewed by Tim Horton.

Source/WebKit:

On macOS, Safari Technology Preview or a local build WebKit/Safari will always
get the default preference values through the "Feature Flags" SPI. Unfortunately,
this approach won't work if the OS does not provide correct default preference values.

With this patch, we only get default preference values with the SPI for system
WebKit on macOS. For all other cases, we use hardcoded values. So that
WebKit will always get the correct default preference values.

This patch also fixes a few mistakes in two preferences: "webm_webaudio" and "vp8_decoder".

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-watchos.plist:

* Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
(WebKit::isFeatureFlagEnabled):
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::isFeatureFlagEnabled):
(WebKit::defaultAsyncFrameAndOverflowScrollingEnabled):
(WebKit::defaultUseGPUProcessForCanvasRenderingEnabled):
(WebKit::defaultUseGPUProcessForDOMRenderingEnabled):
(WebKit::defaultUseGPUProcessForMediaEnabled):
(WebKit::defaultUseGPUProcessForWebGLEnabled):
(WebKit::defaultCaptureAudioInGPUProcessEnabled):
(WebKit::defaultCaptureVideoInGPUProcessEnabled):
(WebKit::defaultWebRTCCodecsInGPUProcess):
(WebKit::defaultIncrementalPDFEnabled):
(WebKit::defaultWebMFormatReaderEnabled):
(WebKit::defaultVP8DecoderEnabled):
(WebKit::defaultVP9DecoderEnabled):
(WebKit::defaultVP9SWDecoderEnabledOnBattery):
(WebKit::defaultWebMParserEnabled):
(WebKit::defaultWebMWebAudioEnabled):
(WebKit::defaultInAppBrowserPrivacy): Deleted.
* Shared/WebPreferencesDefaultValues.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Fix a typo.

Source/WebKitLegacy/mac:

On macOS, Safari Technology Preview or a local build WebKit/Safari will always
get the default preference values through the "Feature Flags" SPI. Unfortunately,
this approach won't work if the OS does not provide correct default preference values.

With this patch, we only get default preference values with the SPI for system
WebKit on macOS. For all other cases, we use hardcoded values. So that
WebKit will always get the correct default preference values.

This patch also fixes a few mistakes in two preferences: "webm_webaudio" and "vp8_decoder".

* WebView/WebPreferencesDefaultValues.h:
* WebView/WebPreferencesDefaultValues.mm:
(WebKit::isFeatureFlagEnabled):
(WebKit::defaultIncrementalPDFEnabled):
(WebKit::defaultWebXREnabled):
(WebKit::defaultWebMParserEnabled):
(WebKit::defaultWebMWebAudioEnabled):
(WebKit::defaultVP8DecoderEnabled):
(WebKit::defaultVP9DecoderEnabled):

LayoutTests:

Update a mac-bigsur specific test expectation file because the test is passing now.

* platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Removed.
* platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacbigsurimportedw3cwebplatformtestsmediasourcemediasourceaddsourcebufferexpectedtxt">trunk/LayoutTests/platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitFeatureFlagsWebKitappletvosplist">trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist</a></li>
<li><a href="#trunkSourceWebKitFeatureFlagsWebKitiosplist">trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist</a></li>
<li><a href="#trunkSourceWebKitFeatureFlagsWebKitmacosplist">trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist</a></li>
<li><a href="#trunkSourceWebKitFeatureFlagsWebKitwatchosplist">trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist</a></li>
<li><a href="#trunkSourceWebKitSharedCocoaWebPreferencesDefaultValuesCocoamm">trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitSharedWebPreferencesDefaultValuescpp">trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedWebPreferencesDefaultValuesh">trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitLegacymacChangeLog">trunk/Source/WebKitLegacy/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferencesDefaultValuesh">trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferencesDefaultValuesmm">trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacimportedw3cwebplatformtestsmediasourcemediasourceaddsourcebufferexpectedtxt">trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/LayoutTests/ChangeLog 2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2021-08-06  Peng Liu  <peng.liu6@apple.com>
+
+        [macOS] Clean up Feature Flags related code
+        https://bugs.webkit.org/show_bug.cgi?id=228803
+        <rdar://problem/81142982>
+
+        Reviewed by Tim Horton.
+
+        Update a mac-bigsur specific test expectation file because the test is passing now.
+
+        * platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Removed.
+        * platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt:
+
</ins><span class="cx"> 2021-08-06  Antti Koivisto  <antti@apple.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r274038): Keyframe animation with top/left with percentages fails to animate
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacimportedw3cwebplatformtestsmediasourcemediasourceaddsourcebufferexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt     2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt        2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -1,12 +0,0 @@
</span><del>-
-PASS Test addSourceBuffer() in 'ended' state.
-PASS Test addSourceBuffer() with empty type
-PASS Test addSourceBuffer() with null
-PASS Test addSourceBuffer() with unsupported type
-FAIL Test addSourceBuffer() with Vorbis and VP8 assert_true: video/webm;codecs="vp8,vorbis" is supported expected true got false
-FAIL Test addSourceBuffer() with Vorbis and VP8 in separate SourceBuffers assert_true: video/webm;codecs="vp8" is supported expected true got false
-PASS Test addSourceBuffer() video only
-PASS Test addSourceBuffer() audio only
-PASS Test addSourceBuffer() with AAC and H.264
-PASS Test addSourceBuffer() with AAC and H.264 in separate SourceBuffers
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacbigsurimportedw3cwebplatformtestsmediasourcemediasourceaddsourcebufferexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt      2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/LayoutTests/platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt 2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -3,8 +3,8 @@
</span><span class="cx"> PASS Test addSourceBuffer() with empty type
</span><span class="cx"> PASS Test addSourceBuffer() with null
</span><span class="cx"> PASS Test addSourceBuffer() with unsupported type
</span><del>-FAIL Test addSourceBuffer() with Vorbis and VP8 assert_true: video/webm;codecs="vp8,vorbis" is supported expected true got false
-FAIL Test addSourceBuffer() with Vorbis and VP8 in separate SourceBuffers assert_true: audio/webm;codecs="vorbis" is supported expected true got false
</del><ins>+PASS Test addSourceBuffer() with Vorbis and VP8
+PASS Test addSourceBuffer() with Vorbis and VP8 in separate SourceBuffers
</ins><span class="cx"> PASS Test addSourceBuffer() video only
</span><span class="cx"> PASS Test addSourceBuffer() audio only
</span><span class="cx"> PASS Test addSourceBuffer() with AAC and H.264
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/ChangeLog       2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2021-08-06  Peng Liu  <peng.liu6@apple.com>
+
+        [macOS] Clean up Feature Flags related code
+        https://bugs.webkit.org/show_bug.cgi?id=228803
+        <rdar://problem/81142982>
+
+        Reviewed by Tim Horton.
+
+        On macOS, Safari Technology Preview or a local build WebKit/Safari will always
+        get the default preference values through the "Feature Flags" SPI. Unfortunately,
+        this approach won't work if the OS does not provide correct default preference values.
+
+        With this patch, we only get default preference values with the SPI for system
+        WebKit on macOS. For all other cases, we use hardcoded values. So that
+        WebKit will always get the correct default preference values.
+
+        This patch also fixes a few mistakes in two preferences: "webm_webaudio" and "vp8_decoder".
+
+        * FeatureFlags/WebKit-appletvos.plist:
+        * FeatureFlags/WebKit-ios.plist:
+        * FeatureFlags/WebKit-macos.plist:
+        * FeatureFlags/WebKit-watchos.plist:
+
+        * Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
+        (WebKit::isFeatureFlagEnabled):
+        * Shared/WebPreferencesDefaultValues.cpp:
+        (WebKit::isFeatureFlagEnabled):
+        (WebKit::defaultAsyncFrameAndOverflowScrollingEnabled):
+        (WebKit::defaultUseGPUProcessForCanvasRenderingEnabled):
+        (WebKit::defaultUseGPUProcessForDOMRenderingEnabled):
+        (WebKit::defaultUseGPUProcessForMediaEnabled):
+        (WebKit::defaultUseGPUProcessForWebGLEnabled):
+        (WebKit::defaultCaptureAudioInGPUProcessEnabled):
+        (WebKit::defaultCaptureVideoInGPUProcessEnabled):
+        (WebKit::defaultWebRTCCodecsInGPUProcess):
+        (WebKit::defaultIncrementalPDFEnabled):
+        (WebKit::defaultWebMFormatReaderEnabled):
+        (WebKit::defaultVP8DecoderEnabled):
+        (WebKit::defaultVP9DecoderEnabled):
+        (WebKit::defaultVP9SWDecoderEnabledOnBattery):
+        (WebKit::defaultWebMParserEnabled):
+        (WebKit::defaultWebMWebAudioEnabled):
+        (WebKit::defaultInAppBrowserPrivacy): Deleted.
+        * Shared/WebPreferencesDefaultValues.h:
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::creationParameters): Fix a typo.
+
</ins><span class="cx"> 2021-08-06  Jer Noble  <jer.noble@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [Cocoa] Remove support for AVAssetImageGenerator
</span></span></pre></div>
<a id="trunkSourceWebKitFeatureFlagsWebKitappletvosplist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist  2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist     2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -67,6 +67,11 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><ins>+       <key>vp8_decoder</key>
+       <dict>
+               <key>Enabled</key>
+               <true/>
+       </dict>
</ins><span class="cx">   <key>WebXR</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span><span class="lines">@@ -82,11 +87,6 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><del>-       <key>webm_webaudio</key>
-       <dict>
-               <key>Enabled</key>
-               <true/>
-       </dict>
</del><span class="cx">   <key>RB_full_manage_WK_jetsam</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span></span></pre></div>
<a id="trunkSourceWebKitFeatureFlagsWebKitiosplist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist        2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist   2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -67,6 +67,11 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><ins>+       <key>vp8_decoder</key>
+       <dict>
+               <key>Enabled</key>
+               <true/>
+       </dict>
</ins><span class="cx">   <key>WebXR</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span><span class="lines">@@ -82,11 +87,6 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><del>-       <key>webm_webaudio</key>
-       <dict>
-               <key>Enabled</key>
-               <true/>
-       </dict>
</del><span class="cx">   <key>RB_full_manage_WK_jetsam</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span></span></pre></div>
<a id="trunkSourceWebKitFeatureFlagsWebKitmacosplist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist      2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist 2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -67,6 +67,11 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><ins>+       <key>vp8_decoder</key>
+       <dict>
+               <key>Enabled</key>
+               <true/>
+       </dict>
</ins><span class="cx">   <key>WebXR</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span><span class="lines">@@ -85,7 +90,7 @@
</span><span class="cx">  <key>webm_webaudio</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span><del>-               <true/>
</del><ins>+                <false/>
</ins><span class="cx">   </dict>
</span><span class="cx">  <key>RB_full_manage_WK_jetsam</key>
</span><span class="cx">  <dict>
</span></span></pre></div>
<a id="trunkSourceWebKitFeatureFlagsWebKitwatchosplist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist    2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist       2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -67,6 +67,11 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><ins>+       <key>vp8_decoder</key>
+       <dict>
+               <key>Enabled</key>
+               <true/>
+       </dict>
</ins><span class="cx">   <key>WebXR</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span><span class="lines">@@ -82,11 +87,6 @@
</span><span class="cx">          <key>Enabled</key>
</span><span class="cx">          <true/>
</span><span class="cx">  </dict>
</span><del>-       <key>webm_webaudio</key>
-       <dict>
-               <key>Enabled</key>
-               <true/>
-       </dict>
</del><span class="cx">   <key>RB_full_manage_WK_jetsam</key>
</span><span class="cx">  <dict>
</span><span class="cx">          <key>Enabled</key>
</span></span></pre></div>
<a id="trunkSourceWebKitSharedCocoaWebPreferencesDefaultValuesCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm     2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm        2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "WebPreferencesDefaultValues.h"
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA) && HAVE(SYSTEM_FEATURE_FLAGS)
</del><ins>+#if PLATFORM(COCOA)
</ins><span class="cx"> 
</span><span class="cx"> #import <Foundation/NSBundle.h>
</span><span class="cx"> 
</span><span class="lines">@@ -38,22 +38,31 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> // Because of <rdar://problem/60608008>, WebKit has to parse the feature flags plist file
</span><del>-bool isFeatureFlagEnabled(const String& featureName)
</del><ins>+bool isFeatureFlagEnabled(const String& featureName, bool defaultValue)
</ins><span class="cx"> {
</span><del>-    static bool isWebKitBundleFromStagedFramework = [] {
-        NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")];
-        return [webkit2Bundle.bundlePath hasPrefix:@"/Library/Apple/System/Library/StagedFrameworks/Safari/"];
</del><ins>+#if HAVE(SYSTEM_FEATURE_FLAGS)
+
+#if PLATFORM(MAC)
+    static bool isSystemWebKit = [] {
+        NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")];
+        return [bundle.bundlePath hasPrefix:@"/System/"];
</ins><span class="cx">     }();
</span><span class="cx"> 
</span><del>-    if (!isWebKitBundleFromStagedFramework)
-        return _os_feature_enabled_impl("WebKit", (const char*)featureName.utf8().data());
</del><ins>+    if (isSystemWebKit)
+        return _os_feature_enabled_impl("WebKit", (const char*)featureName.characters8());
</ins><span class="cx"> 
</span><del>-    static NeverDestroyed<RetainPtr<NSDictionary>> dictionary = [NSDictionary dictionaryWithContentsOfFile:@"/Library/Apple/System/Library/FeatureFlags/Domain/WebKit.plist"];
</del><ins>+    return defaultValue;
+#else
+    UNUSED_PARAM(defaultValue);
+    return _os_feature_enabled_impl("WebKit", (const char*)featureName.characters8());
+#endif // PLATFORM(MAC)
</ins><span class="cx"> 
</span><del>-    if (![[dictionary.get() objectForKey:featureName] objectForKey:@"Enabled"])
-        return _os_feature_enabled_impl("WebKit", (const char*)featureName.characters8());
</del><ins>+#else
</ins><span class="cx"> 
</span><del>-    return [[[dictionary.get() objectForKey:featureName] objectForKey:@"Enabled"] isKindOfClass:[NSNumber class]] && [[[dictionary.get() objectForKey:featureName] objectForKey:@"Enabled"] boolValue];
</del><ins>+    UNUSED_PARAM(featureName);
+    return defaultValue;
+
+#endif // HAVE(SYSTEM_FEATURE_FLAGS)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPreferencesDefaultValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp       2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp  2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -41,6 +41,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(COCOA)
+bool isFeatureFlagEnabled(const String&, bool defaultValue)
+{
+    return defaultValue;
+}
+#endif
+
</ins><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx"> 
</span><span class="cx"> bool defaultPassiveTouchListenersAsDefaultOnDocument()
</span><span class="lines">@@ -108,15 +115,13 @@
</span><span class="cx">     return true;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("async_frame_and_overflow_scrolling");
-#endif
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>-    return true;
</del><ins>+    bool defaultValue = true;
+#else
+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return false;
</del><ins>+    return isFeatureFlagEnabled("async_frame_and_overflow_scrolling", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultAsyncFrameScrollingEnabled()
</span><span class="lines">@@ -150,49 +155,33 @@
</span><span class="cx"> bool defaultUseGPUProcessForCanvasRenderingEnabled()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(GPU_PROCESS_BY_DEFAULT)
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("gpu_process_canvas_rendering");
</del><ins>+    bool defaultValue = true;
</ins><span class="cx"> #else
</span><del>-    return true;
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-#else
-    return false;
</del><ins>+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><ins>+
+    return isFeatureFlagEnabled("gpu_process_canvas_rendering", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultUseGPUProcessForDOMRenderingEnabled()
</span><span class="cx"> {
</span><del>-#if ENABLE(GPU_PROCESS_BY_DEFAULT)
-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("gpu_process_dom_rendering");
-#else
-    return false;
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-#else
-    return false;
-#endif
</del><ins>+    return isFeatureFlagEnabled("gpu_process_dom_rendering", false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultUseGPUProcessForMediaEnabled()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(GPU_PROCESS_BY_DEFAULT)
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("gpu_process_media");
</del><ins>+    bool defaultValue = true;
</ins><span class="cx"> #else
</span><del>-    return true;
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-#else
-    return false;
</del><ins>+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><ins>+
+    return isFeatureFlagEnabled("gpu_process_media", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultUseGPUProcessForWebGLEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("gpu_process_webgl");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("gpu_process_webgl", false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(GPU_PROCESS)
</span><span class="lines">@@ -202,19 +191,17 @@
</span><span class="cx"> bool defaultCaptureAudioInGPUProcessEnabled()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(GPU_PROCESS_BY_DEFAULT)
</span><ins>+    bool defaultValue = true;
+#else
+    bool defaultValue = false;
+#endif
</ins><span class="cx"> 
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>-    return isFeatureFlagEnabled("gpu_process_webrtc");
</del><ins>+    return isFeatureFlagEnabled("gpu_process_webrtc", defaultValue);
</ins><span class="cx"> #elif PLATFORM(IOS_FAMILY)
</span><del>-    return isFeatureFlagEnabled("gpu_process_media");
-#endif
</del><ins>+    return isFeatureFlagEnabled("gpu_process_media", defaultValue);
</ins><span class="cx"> #else
</span><del>-    return true;
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-
-#else
-    return false;
</del><ins>+    return defaultValue;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -230,14 +217,12 @@
</span><span class="cx"> bool defaultCaptureVideoInGPUProcessEnabled()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(GPU_PROCESS_BY_DEFAULT)
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("gpu_process_webrtc");
</del><ins>+    bool defaultValue = true;
</ins><span class="cx"> #else
</span><del>-    return true;
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-#else
-    return false;
</del><ins>+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><ins>+
+    return isFeatureFlagEnabled("gpu_process_webrtc", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(MEDIA_STREAM)
</span><span class="lines">@@ -247,39 +232,26 @@
</span><span class="cx"> bool defaultWebRTCCodecsInGPUProcess()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(GPU_PROCESS_BY_DEFAULT)
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("gpu_process_webrtc");
</del><ins>+    bool defaultValue = true;
</ins><span class="cx"> #else
</span><del>-    return true;
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-#else
-    return false;
</del><ins>+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><ins>+
+    return isFeatureFlagEnabled("gpu_process_webrtc", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEB_RTC)
</span><span class="cx"> 
</span><del>-bool defaultInAppBrowserPrivacy()
-{
-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("InAppBrowserPrivacy");
-#endif
-
-    return false;
-}
-
</del><span class="cx"> #if HAVE(INCREMENTAL_PDF_APIS)
</span><span class="cx"> bool defaultIncrementalPDFEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("incremental_pdf");
-#endif
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>-    return true;
</del><ins>+    bool defaultValue = true;
</ins><span class="cx"> #else
</span><del>-    return false;
</del><ins>+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><ins>+
+    return isFeatureFlagEnabled("incremental_pdf", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -300,15 +272,13 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultWebMFormatReaderEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("webm_format_reader");
-#endif
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>-    return true;
</del><ins>+    bool defaultValue = true;
</ins><span class="cx"> #else
</span><del>-    return false;
</del><ins>+    bool defaultValue = false;
</ins><span class="cx"> #endif
</span><ins>+
+    return isFeatureFlagEnabled("webm_format_reader", defaultValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBM_FORMAT_READER)
</span><span class="lines">@@ -317,29 +287,17 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultVP8DecoderEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("vp8_decoder");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("vp8_decoder", true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultVP9DecoderEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("vp9_decoder");
-#endif
-
-    return true;
</del><ins>+    return isFeatureFlagEnabled("vp9_decoder", true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultVP9SWDecoderEnabledOnBattery()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("sw_vp9_decoder_on_battery");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("sw_vp9_decoder_on_battery", false);
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(VP9)
</span><span class="cx"> 
</span><span class="lines">@@ -347,20 +305,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultWebMParserEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("webm_parser");
-#endif
-
-    return true;
</del><ins>+    return isFeatureFlagEnabled("webm_parser", true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultWebMWebAudioEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("webm_webaudio");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("webm_webaudio", false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(MEDIA_SOURCE)
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPreferencesDefaultValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h    2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -35,9 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-bool isFeatureFlagEnabled(const String&);
-#endif
</del><ins>+bool isFeatureFlagEnabled(const String&, bool defaultValue = false);
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx"> bool defaultPassiveTouchListenersAsDefaultOnDocument();
</span><span class="lines">@@ -85,8 +83,6 @@
</span><span class="cx"> bool defaultWebRTCCodecsInGPUProcess();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool defaultInAppBrowserPrivacy();
-
</del><span class="cx"> #if HAVE(INCREMENTAL_PDF_APIS)
</span><span class="cx"> bool defaultIncrementalPDFEnabled();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -8239,7 +8239,7 @@
</span><span class="cx">     parameters.shouldEnableVP9Decoder = preferences().vp9DecoderEnabled();
</span><span class="cx"> #if ENABLE(VP9) && PLATFORM(COCOA)
</span><span class="cx">     // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
</span><del>-    parameters.shouldEnableVP8Decoder = preferences().vp9DecoderEnabled();
</del><ins>+    parameters.shouldEnableVP8Decoder = preferences().vp8DecoderEnabled();
</ins><span class="cx">     // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
</span><span class="cx">     parameters.shouldEnableVP9SWDecoder = preferences().vp9DecoderEnabled() && (!WebCore::systemHasBattery() || preferences().vp9SWDecoderEnabledOnBattery());
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/ChangeLog  2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog     2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2021-08-06  Peng Liu  <peng.liu6@apple.com>
+
+        [macOS] Clean up Feature Flags related code
+        https://bugs.webkit.org/show_bug.cgi?id=228803
+        <rdar://problem/81142982>
+
+        Reviewed by Tim Horton.
+
+        On macOS, Safari Technology Preview or a local build WebKit/Safari will always
+        get the default preference values through the "Feature Flags" SPI. Unfortunately,
+        this approach won't work if the OS does not provide correct default preference values.
+
+        With this patch, we only get default preference values with the SPI for system
+        WebKit on macOS. For all other cases, we use hardcoded values. So that
+        WebKit will always get the correct default preference values.
+
+        This patch also fixes a few mistakes in two preferences: "webm_webaudio" and "vp8_decoder".
+
+        * WebView/WebPreferencesDefaultValues.h:
+        * WebView/WebPreferencesDefaultValues.mm:
+        (WebKit::isFeatureFlagEnabled):
+        (WebKit::defaultIncrementalPDFEnabled):
+        (WebKit::defaultWebXREnabled):
+        (WebKit::defaultWebMParserEnabled):
+        (WebKit::defaultWebMWebAudioEnabled):
+        (WebKit::defaultVP8DecoderEnabled):
+        (WebKit::defaultVP9DecoderEnabled):
+
</ins><span class="cx"> 2021-08-05  Cameron McCormack  <heycam@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Stop tracking form elements with FormController
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferencesDefaultValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h      2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h 2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA) && HAVE(SYSTEM_FEATURE_FLAGS)
-bool isFeatureFlagEnabled(const String&);
</del><ins>+#if PLATFORM(COCOA)
+bool isFeatureFlagEnabled(const String&, bool defaultValue = false);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(INCREMENTAL_PDF_APIS)
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferencesDefaultValuesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (280725 => 280726)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm     2021-08-06 16:25:55 UTC (rev 280725)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm        2021-08-06 16:38:28 UTC (rev 280726)
</span><span class="lines">@@ -42,22 +42,34 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA) && HAVE(SYSTEM_FEATURE_FLAGS)
</del><ins>+#if PLATFORM(COCOA)
</ins><span class="cx"> 
</span><span class="cx"> // Because of <rdar://problem/60608008>, WebKit has to parse the feature flags plist file
</span><del>-bool isFeatureFlagEnabled(const String& featureName)
</del><ins>+bool isFeatureFlagEnabled(const String& featureName, bool defaultValue)
</ins><span class="cx"> {
</span><del>-    BOOL isWebKitBundleFromStagedFramework = [[[NSBundle mainBundle] bundlePath] hasPrefix:@"/Library/Apple/System/Library/StagedFrameworks/WebKit"];
</del><ins>+#if HAVE(SYSTEM_FEATURE_FLAGS)
</ins><span class="cx"> 
</span><del>-    if (!isWebKitBundleFromStagedFramework)
-        return _os_feature_enabled_impl("WebKit", (const char*)featureName.utf8().data());
</del><ins>+#if PLATFORM(MAC)
+    static bool isSystemWebKit = [] {
+        NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WebView")];
+        return [bundle.bundlePath hasPrefix:@"/System/"];
+    }();
</ins><span class="cx"> 
</span><del>-    static NeverDestroyed<RetainPtr<NSDictionary>> dictionary = [NSDictionary dictionaryWithContentsOfFile:@"/Library/Apple/System/Library/FeatureFlags/Domain/WebKit.plist"];
-
-    if (![[dictionary.get() objectForKey:featureName] objectForKey:@"Enabled"])
</del><ins>+    if (isSystemWebKit)
</ins><span class="cx">         return _os_feature_enabled_impl("WebKit", (const char*)featureName.characters8());
</span><span class="cx"> 
</span><del>-    return [[[dictionary.get() objectForKey:featureName] objectForKey:@"Enabled"] isKindOfClass:[NSNumber class]] && [[[dictionary.get() objectForKey:featureName] objectForKey:@"Enabled"] boolValue];
</del><ins>+    return defaultValue;
+#else
+    UNUSED_PARAM(defaultValue);
+    return _os_feature_enabled_impl("WebKit", (const char*)featureName.characters8());
+#endif // PLATFORM(MAC)
+
+#else
+
+    UNUSED_PARAM(featureName);
+    return defaultValue;
+
+#endif // HAVE(SYSTEM_FEATURE_FLAGS)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -66,11 +78,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultIncrementalPDFEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("incremental_pdf");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("incremental_pdf", false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -79,11 +87,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultWebXREnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("WebXR");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("WebXR", false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBXR)
</span><span class="lines">@@ -278,20 +282,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultWebMParserEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("webm_parser");
-#endif
-
-    return true;
</del><ins>+    return isFeatureFlagEnabled("webm_parser", true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultWebMWebAudioEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("webm_webaudio");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("webm_webaudio", false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(MEDIA_SOURCE)
</span><span class="lines">@@ -300,20 +296,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool defaultVP8DecoderEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("vp8_decoder");
-#endif
-
-    return false;
</del><ins>+    return isFeatureFlagEnabled("vp8_decoder", true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool defaultVP9DecoderEnabled()
</span><span class="cx"> {
</span><del>-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("vp9_decoder");
-#endif
-
-    return true;
</del><ins>+    return isFeatureFlagEnabled("vp9_decoder", true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(VP9)
</span></span></pre>
</div>
</div>

</body>
</html>