| 1 | /* |
| 2 | * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. |
| 3 | * |
| 4 | * Copyright (C) 2017 Apple Inc. All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions |
| 8 | * are met: |
| 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * 2. Redistributions in binary form must reproduce the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer in the |
| 13 | * documentation and/or other materials provided with the distribution. |
| 14 | * |
| 15 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 17 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 18 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 19 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 25 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #include "config.h" |
| 29 | #include "WebPreferences.h" |
| 30 | |
| 31 | #include "WebPreferencesKeys.h" |
| 32 | |
| 33 | namespace WebKit { |
| 34 | |
| 35 | void WebPreferences::setAccessibilityObjectModelEnabled(const bool& value) |
| 36 | { |
| 37 | if (!m_store.setBoolValueForKey(WebPreferencesKey::accessibilityObjectModelEnabledKey(), value)) |
| 38 | return; |
| 39 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::accessibilityObjectModelEnabledKey(), value); |
| 40 | } |
| 41 | |
| 42 | bool WebPreferences::accessibilityObjectModelEnabled() const |
| 43 | { |
| 44 | return m_store.getBoolValueForKey(WebPreferencesKey::accessibilityObjectModelEnabledKey()); |
| 45 | } |
| 46 | |
| 47 | void WebPreferences::setAdClickAttributionDebugModeEnabled(const bool& value) |
| 48 | { |
| 49 | if (!m_store.setBoolValueForKey(WebPreferencesKey::adClickAttributionDebugModeEnabledKey(), value)) |
| 50 | return; |
| 51 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::adClickAttributionDebugModeEnabledKey(), value); |
| 52 | } |
| 53 | |
| 54 | bool WebPreferences::adClickAttributionDebugModeEnabled() const |
| 55 | { |
| 56 | return m_store.getBoolValueForKey(WebPreferencesKey::adClickAttributionDebugModeEnabledKey()); |
| 57 | } |
| 58 | |
| 59 | void WebPreferences::setAdClickAttributionEnabled(const bool& value) |
| 60 | { |
| 61 | if (!m_store.setBoolValueForKey(WebPreferencesKey::adClickAttributionEnabledKey(), value)) |
| 62 | return; |
| 63 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::adClickAttributionEnabledKey(), value); |
| 64 | } |
| 65 | |
| 66 | bool WebPreferences::adClickAttributionEnabled() const |
| 67 | { |
| 68 | return m_store.getBoolValueForKey(WebPreferencesKey::adClickAttributionEnabledKey()); |
| 69 | } |
| 70 | |
| 71 | void WebPreferences::setBlankAnchorTargetImpliesNoOpenerEnabled(const bool& value) |
| 72 | { |
| 73 | if (!m_store.setBoolValueForKey(WebPreferencesKey::blankAnchorTargetImpliesNoOpenerEnabledKey(), value)) |
| 74 | return; |
| 75 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::blankAnchorTargetImpliesNoOpenerEnabledKey(), value); |
| 76 | } |
| 77 | |
| 78 | bool WebPreferences::blankAnchorTargetImpliesNoOpenerEnabled() const |
| 79 | { |
| 80 | return m_store.getBoolValueForKey(WebPreferencesKey::blankAnchorTargetImpliesNoOpenerEnabledKey()); |
| 81 | } |
| 82 | |
| 83 | void WebPreferences::setCSSCustomPropertiesAndValuesEnabled(const bool& value) |
| 84 | { |
| 85 | if (!m_store.setBoolValueForKey(WebPreferencesKey::cssCustomPropertiesAndValuesEnabledKey(), value)) |
| 86 | return; |
| 87 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::cssCustomPropertiesAndValuesEnabledKey(), value); |
| 88 | } |
| 89 | |
| 90 | bool WebPreferences::cssCustomPropertiesAndValuesEnabled() const |
| 91 | { |
| 92 | return m_store.getBoolValueForKey(WebPreferencesKey::cssCustomPropertiesAndValuesEnabledKey()); |
| 93 | } |
| 94 | |
| 95 | void WebPreferences::setCSSPaintingAPIEnabled(const bool& value) |
| 96 | { |
| 97 | if (!m_store.setBoolValueForKey(WebPreferencesKey::cssPaintingAPIEnabledKey(), value)) |
| 98 | return; |
| 99 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::cssPaintingAPIEnabledKey(), value); |
| 100 | } |
| 101 | |
| 102 | bool WebPreferences::cssPaintingAPIEnabled() const |
| 103 | { |
| 104 | return m_store.getBoolValueForKey(WebPreferencesKey::cssPaintingAPIEnabledKey()); |
| 105 | } |
| 106 | |
| 107 | void WebPreferences::setCSSTypedOMEnabled(const bool& value) |
| 108 | { |
| 109 | if (!m_store.setBoolValueForKey(WebPreferencesKey::cssTypedOMEnabledKey(), value)) |
| 110 | return; |
| 111 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::cssTypedOMEnabledKey(), value); |
| 112 | } |
| 113 | |
| 114 | bool WebPreferences::cssTypedOMEnabled() const |
| 115 | { |
| 116 | return m_store.getBoolValueForKey(WebPreferencesKey::cssTypedOMEnabledKey()); |
| 117 | } |
| 118 | |
| 119 | void WebPreferences::setCoreMathMLEnabled(const bool& value) |
| 120 | { |
| 121 | if (!m_store.setBoolValueForKey(WebPreferencesKey::coreMathMLEnabledKey(), value)) |
| 122 | return; |
| 123 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::coreMathMLEnabledKey(), value); |
| 124 | } |
| 125 | |
| 126 | bool WebPreferences::coreMathMLEnabled() const |
| 127 | { |
| 128 | return m_store.getBoolValueForKey(WebPreferencesKey::coreMathMLEnabledKey()); |
| 129 | } |
| 130 | |
| 131 | void WebPreferences::setDarkModeCSSEnabled(const bool& value) |
| 132 | { |
| 133 | if (!m_store.setBoolValueForKey(WebPreferencesKey::darkModeCSSEnabledKey(), value)) |
| 134 | return; |
| 135 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::darkModeCSSEnabledKey(), value); |
| 136 | } |
| 137 | |
| 138 | bool WebPreferences::darkModeCSSEnabled() const |
| 139 | { |
| 140 | return m_store.getBoolValueForKey(WebPreferencesKey::darkModeCSSEnabledKey()); |
| 141 | } |
| 142 | |
| 143 | void WebPreferences::setFetchAPIKeepAliveEnabled(const bool& value) |
| 144 | { |
| 145 | if (!m_store.setBoolValueForKey(WebPreferencesKey::fetchAPIKeepAliveEnabledKey(), value)) |
| 146 | return; |
| 147 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::fetchAPIKeepAliveEnabledKey(), value); |
| 148 | } |
| 149 | |
| 150 | bool WebPreferences::fetchAPIKeepAliveEnabled() const |
| 151 | { |
| 152 | return m_store.getBoolValueForKey(WebPreferencesKey::fetchAPIKeepAliveEnabledKey()); |
| 153 | } |
| 154 | |
| 155 | void WebPreferences::setHTTPSUpgradeEnabled(const bool& value) |
| 156 | { |
| 157 | if (!m_store.setBoolValueForKey(WebPreferencesKey::httpSUpgradeEnabledKey(), value)) |
| 158 | return; |
| 159 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::httpSUpgradeEnabledKey(), value); |
| 160 | } |
| 161 | |
| 162 | bool WebPreferences::httpSUpgradeEnabled() const |
| 163 | { |
| 164 | return m_store.getBoolValueForKey(WebPreferencesKey::httpSUpgradeEnabledKey()); |
| 165 | } |
| 166 | |
| 167 | void WebPreferences::setImageBitmapOffscreenCanvasEnabled(const bool& value) |
| 168 | { |
| 169 | if (!m_store.setBoolValueForKey(WebPreferencesKey::imageBitmapOffscreenCanvasEnabledKey(), value)) |
| 170 | return; |
| 171 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::imageBitmapOffscreenCanvasEnabledKey(), value); |
| 172 | } |
| 173 | |
| 174 | bool WebPreferences::imageBitmapOffscreenCanvasEnabled() const |
| 175 | { |
| 176 | return m_store.getBoolValueForKey(WebPreferencesKey::imageBitmapOffscreenCanvasEnabledKey()); |
| 177 | } |
| 178 | |
| 179 | void WebPreferences::setIntersectionObserverEnabled(const bool& value) |
| 180 | { |
| 181 | if (!m_store.setBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey(), value)) |
| 182 | return; |
| 183 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::intersectionObserverEnabledKey(), value); |
| 184 | } |
| 185 | |
| 186 | bool WebPreferences::intersectionObserverEnabled() const |
| 187 | { |
| 188 | return m_store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()); |
| 189 | } |
| 190 | |
| 191 | void WebPreferences::setIsITPFirstPartyWebsiteDataRemovalEnabled(const bool& value) |
| 192 | { |
| 193 | if (!m_store.setBoolValueForKey(WebPreferencesKey::isITPFirstPartyWebsiteDataRemovalEnabledKey(), value)) |
| 194 | return; |
| 195 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::isITPFirstPartyWebsiteDataRemovalEnabledKey(), value); |
| 196 | } |
| 197 | |
| 198 | bool WebPreferences::isITPFirstPartyWebsiteDataRemovalEnabled() const |
| 199 | { |
| 200 | return m_store.getBoolValueForKey(WebPreferencesKey::isITPFirstPartyWebsiteDataRemovalEnabledKey()); |
| 201 | } |
| 202 | |
| 203 | void WebPreferences::setLinkPrefetchEnabled(const bool& value) |
| 204 | { |
| 205 | if (!m_store.setBoolValueForKey(WebPreferencesKey::linkPrefetchEnabledKey(), value)) |
| 206 | return; |
| 207 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::linkPrefetchEnabledKey(), value); |
| 208 | } |
| 209 | |
| 210 | bool WebPreferences::linkPrefetchEnabled() const |
| 211 | { |
| 212 | return m_store.getBoolValueForKey(WebPreferencesKey::linkPrefetchEnabledKey()); |
| 213 | } |
| 214 | |
| 215 | void WebPreferences::setMediaCapabilitiesExtensionsEnabled(const bool& value) |
| 216 | { |
| 217 | if (!m_store.setBoolValueForKey(WebPreferencesKey::mediaCapabilitiesExtensionsEnabledKey(), value)) |
| 218 | return; |
| 219 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::mediaCapabilitiesExtensionsEnabledKey(), value); |
| 220 | } |
| 221 | |
| 222 | bool WebPreferences::mediaCapabilitiesExtensionsEnabled() const |
| 223 | { |
| 224 | return m_store.getBoolValueForKey(WebPreferencesKey::mediaCapabilitiesExtensionsEnabledKey()); |
| 225 | } |
| 226 | |
| 227 | void WebPreferences::setMediaRecorderEnabled(const bool& value) |
| 228 | { |
| 229 | if (!m_store.setBoolValueForKey(WebPreferencesKey::mediaRecorderEnabledKey(), value)) |
| 230 | return; |
| 231 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::mediaRecorderEnabledKey(), value); |
| 232 | } |
| 233 | |
| 234 | bool WebPreferences::mediaRecorderEnabled() const |
| 235 | { |
| 236 | return m_store.getBoolValueForKey(WebPreferencesKey::mediaRecorderEnabledKey()); |
| 237 | } |
| 238 | |
| 239 | void WebPreferences::setPageAtRuleSupportEnabled(const bool& value) |
| 240 | { |
| 241 | if (!m_store.setBoolValueForKey(WebPreferencesKey::pageAtRuleSupportEnabledKey(), value)) |
| 242 | return; |
| 243 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::pageAtRuleSupportEnabledKey(), value); |
| 244 | } |
| 245 | |
| 246 | bool WebPreferences::pageAtRuleSupportEnabled() const |
| 247 | { |
| 248 | return m_store.getBoolValueForKey(WebPreferencesKey::pageAtRuleSupportEnabledKey()); |
| 249 | } |
| 250 | |
| 251 | void WebPreferences::setPointerEventsEnabled(const bool& value) |
| 252 | { |
| 253 | if (!m_store.setBoolValueForKey(WebPreferencesKey::pointerEventsEnabledKey(), value)) |
| 254 | return; |
| 255 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::pointerEventsEnabledKey(), value); |
| 256 | } |
| 257 | |
| 258 | bool WebPreferences::pointerEventsEnabled() const |
| 259 | { |
| 260 | return m_store.getBoolValueForKey(WebPreferencesKey::pointerEventsEnabledKey()); |
| 261 | } |
| 262 | |
| 263 | void WebPreferences::setProcessSwapOnCrossSiteNavigationEnabled(const bool& value) |
| 264 | { |
| 265 | if (!m_store.setBoolValueForKey(WebPreferencesKey::processSwapOnCrossSiteNavigationEnabledKey(), value)) |
| 266 | return; |
| 267 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::processSwapOnCrossSiteNavigationEnabledKey(), value); |
| 268 | } |
| 269 | |
| 270 | bool WebPreferences::processSwapOnCrossSiteNavigationEnabled() const |
| 271 | { |
| 272 | return m_store.getBoolValueForKey(WebPreferencesKey::processSwapOnCrossSiteNavigationEnabledKey()); |
| 273 | } |
| 274 | |
| 275 | void WebPreferences::setReferrerPolicyAttributeEnabled(const bool& value) |
| 276 | { |
| 277 | if (!m_store.setBoolValueForKey(WebPreferencesKey::referrerPolicyAttributeEnabledKey(), value)) |
| 278 | return; |
| 279 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::referrerPolicyAttributeEnabledKey(), value); |
| 280 | } |
| 281 | |
| 282 | bool WebPreferences::referrerPolicyAttributeEnabled() const |
| 283 | { |
| 284 | return m_store.getBoolValueForKey(WebPreferencesKey::referrerPolicyAttributeEnabledKey()); |
| 285 | } |
| 286 | |
| 287 | void WebPreferences::setResizeObserverEnabled(const bool& value) |
| 288 | { |
| 289 | if (!m_store.setBoolValueForKey(WebPreferencesKey::resizeObserverEnabledKey(), value)) |
| 290 | return; |
| 291 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::resizeObserverEnabledKey(), value); |
| 292 | } |
| 293 | |
| 294 | bool WebPreferences::resizeObserverEnabled() const |
| 295 | { |
| 296 | return m_store.getBoolValueForKey(WebPreferencesKey::resizeObserverEnabledKey()); |
| 297 | } |
| 298 | |
| 299 | void WebPreferences::setScreenCaptureEnabled(const bool& value) |
| 300 | { |
| 301 | if (!m_store.setBoolValueForKey(WebPreferencesKey::screenCaptureEnabledKey(), value)) |
| 302 | return; |
| 303 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::screenCaptureEnabledKey(), value); |
| 304 | } |
| 305 | |
| 306 | bool WebPreferences::screenCaptureEnabled() const |
| 307 | { |
| 308 | return m_store.getBoolValueForKey(WebPreferencesKey::screenCaptureEnabledKey()); |
| 309 | } |
| 310 | |
| 311 | void WebPreferences::setServerTimingEnabled(const bool& value) |
| 312 | { |
| 313 | if (!m_store.setBoolValueForKey(WebPreferencesKey::serverTimingEnabledKey(), value)) |
| 314 | return; |
| 315 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::serverTimingEnabledKey(), value); |
| 316 | } |
| 317 | |
| 318 | bool WebPreferences::serverTimingEnabled() const |
| 319 | { |
| 320 | return m_store.getBoolValueForKey(WebPreferencesKey::serverTimingEnabledKey()); |
| 321 | } |
| 322 | |
| 323 | void WebPreferences::setSpringTimingFunctionEnabled(const bool& value) |
| 324 | { |
| 325 | if (!m_store.setBoolValueForKey(WebPreferencesKey::springTimingFunctionEnabledKey(), value)) |
| 326 | return; |
| 327 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::springTimingFunctionEnabledKey(), value); |
| 328 | } |
| 329 | |
| 330 | bool WebPreferences::springTimingFunctionEnabled() const |
| 331 | { |
| 332 | return m_store.getBoolValueForKey(WebPreferencesKey::springTimingFunctionEnabledKey()); |
| 333 | } |
| 334 | |
| 335 | void WebPreferences::setThirdPartyIframeRedirectBlockingEnabled(const bool& value) |
| 336 | { |
| 337 | if (!m_store.setBoolValueForKey(WebPreferencesKey::thirdPartyIframeRedirectBlockingEnabledKey(), value)) |
| 338 | return; |
| 339 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::thirdPartyIframeRedirectBlockingEnabledKey(), value); |
| 340 | } |
| 341 | |
| 342 | bool WebPreferences::thirdPartyIframeRedirectBlockingEnabled() const |
| 343 | { |
| 344 | return m_store.getBoolValueForKey(WebPreferencesKey::thirdPartyIframeRedirectBlockingEnabledKey()); |
| 345 | } |
| 346 | |
| 347 | void WebPreferences::setVisualViewportAPIEnabled(const bool& value) |
| 348 | { |
| 349 | if (!m_store.setBoolValueForKey(WebPreferencesKey::visualViewportAPIEnabledKey(), value)) |
| 350 | return; |
| 351 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::visualViewportAPIEnabledKey(), value); |
| 352 | } |
| 353 | |
| 354 | bool WebPreferences::visualViewportAPIEnabled() const |
| 355 | { |
| 356 | return m_store.getBoolValueForKey(WebPreferencesKey::visualViewportAPIEnabledKey()); |
| 357 | } |
| 358 | |
| 359 | void WebPreferences::setWebAnimationsCSSIntegrationEnabled(const bool& value) |
| 360 | { |
| 361 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webAnimationsCSSIntegrationEnabledKey(), value)) |
| 362 | return; |
| 363 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webAnimationsCSSIntegrationEnabledKey(), value); |
| 364 | } |
| 365 | |
| 366 | bool WebPreferences::webAnimationsCSSIntegrationEnabled() const |
| 367 | { |
| 368 | return m_store.getBoolValueForKey(WebPreferencesKey::webAnimationsCSSIntegrationEnabledKey()); |
| 369 | } |
| 370 | |
| 371 | void WebPreferences::setWebAnimationsEnabled(const bool& value) |
| 372 | { |
| 373 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webAnimationsEnabledKey(), value)) |
| 374 | return; |
| 375 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webAnimationsEnabledKey(), value); |
| 376 | } |
| 377 | |
| 378 | bool WebPreferences::webAnimationsEnabled() const |
| 379 | { |
| 380 | return m_store.getBoolValueForKey(WebPreferencesKey::webAnimationsEnabledKey()); |
| 381 | } |
| 382 | |
| 383 | void WebPreferences::setWebAuthenticationEnabled(const bool& value) |
| 384 | { |
| 385 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webAuthenticationEnabledKey(), value)) |
| 386 | return; |
| 387 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webAuthenticationEnabledKey(), value); |
| 388 | } |
| 389 | |
| 390 | bool WebPreferences::webAuthenticationEnabled() const |
| 391 | { |
| 392 | return m_store.getBoolValueForKey(WebPreferencesKey::webAuthenticationEnabledKey()); |
| 393 | } |
| 394 | |
| 395 | void WebPreferences::setWebGL2Enabled(const bool& value) |
| 396 | { |
| 397 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webGL2EnabledKey(), value)) |
| 398 | return; |
| 399 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webGL2EnabledKey(), value); |
| 400 | } |
| 401 | |
| 402 | bool WebPreferences::webGL2Enabled() const |
| 403 | { |
| 404 | return m_store.getBoolValueForKey(WebPreferencesKey::webGL2EnabledKey()); |
| 405 | } |
| 406 | |
| 407 | void WebPreferences::setWebGPUEnabled(const bool& value) |
| 408 | { |
| 409 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webGPUEnabledKey(), value)) |
| 410 | return; |
| 411 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webGPUEnabledKey(), value); |
| 412 | } |
| 413 | |
| 414 | bool WebPreferences::webGPUEnabled() const |
| 415 | { |
| 416 | return m_store.getBoolValueForKey(WebPreferencesKey::webGPUEnabledKey()); |
| 417 | } |
| 418 | |
| 419 | void WebPreferences::setWebRTCH264SimulcastEnabled(const bool& value) |
| 420 | { |
| 421 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webRTCH264SimulcastEnabledKey(), value)) |
| 422 | return; |
| 423 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webRTCH264SimulcastEnabledKey(), value); |
| 424 | } |
| 425 | |
| 426 | bool WebPreferences::webRTCH264SimulcastEnabled() const |
| 427 | { |
| 428 | return m_store.getBoolValueForKey(WebPreferencesKey::webRTCH264SimulcastEnabledKey()); |
| 429 | } |
| 430 | |
| 431 | void WebPreferences::setWebRTCMDNSICECandidatesEnabled(const bool& value) |
| 432 | { |
| 433 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webRTCMDNSICECandidatesEnabledKey(), value)) |
| 434 | return; |
| 435 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webRTCMDNSICECandidatesEnabledKey(), value); |
| 436 | } |
| 437 | |
| 438 | bool WebPreferences::webRTCMDNSICECandidatesEnabled() const |
| 439 | { |
| 440 | return m_store.getBoolValueForKey(WebPreferencesKey::webRTCMDNSICECandidatesEnabledKey()); |
| 441 | } |
| 442 | |
| 443 | void WebPreferences::setWebRTCUnifiedPlanEnabled(const bool& value) |
| 444 | { |
| 445 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webRTCUnifiedPlanEnabledKey(), value)) |
| 446 | return; |
| 447 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webRTCUnifiedPlanEnabledKey(), value); |
| 448 | } |
| 449 | |
| 450 | bool WebPreferences::webRTCUnifiedPlanEnabled() const |
| 451 | { |
| 452 | return m_store.getBoolValueForKey(WebPreferencesKey::webRTCUnifiedPlanEnabledKey()); |
| 453 | } |
| 454 | |
| 455 | void WebPreferences::setWebRTCVP8CodecEnabled(const bool& value) |
| 456 | { |
| 457 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webRTCVP8CodecEnabledKey(), value)) |
| 458 | return; |
| 459 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webRTCVP8CodecEnabledKey(), value); |
| 460 | } |
| 461 | |
| 462 | bool WebPreferences::webRTCVP8CodecEnabled() const |
| 463 | { |
| 464 | return m_store.getBoolValueForKey(WebPreferencesKey::webRTCVP8CodecEnabledKey()); |
| 465 | } |
| 466 | |
| 467 | void WebPreferences::setWebSQLDisabled(const bool& value) |
| 468 | { |
| 469 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webSQLDisabledKey(), value)) |
| 470 | return; |
| 471 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webSQLDisabledKey(), value); |
| 472 | } |
| 473 | |
| 474 | bool WebPreferences::webSQLDisabled() const |
| 475 | { |
| 476 | return m_store.getBoolValueForKey(WebPreferencesKey::webSQLDisabledKey()); |
| 477 | } |
| 478 | |
| 479 | void WebPreferences::setWebVREnabled(const bool& value) |
| 480 | { |
| 481 | if (!m_store.setBoolValueForKey(WebPreferencesKey::webVREnabledKey(), value)) |
| 482 | return; |
| 483 | updateBoolValueForExperimentalFeatureKey(WebPreferencesKey::webVREnabledKey(), value); |
| 484 | } |
| 485 | |
| 486 | bool WebPreferences::webVREnabled() const |
| 487 | { |
| 488 | return m_store.getBoolValueForKey(WebPreferencesKey::webVREnabledKey()); |
| 489 | } |
| 490 | |
| 491 | const Vector<RefPtr<API::Object>>& WebPreferences::experimentalFeatures() |
| 492 | { |
| 493 | static NeverDestroyed<Vector<RefPtr<API::Object>>> features(std::initializer_list<RefPtr<API::Object>> { |
| 494 | API::ExperimentalFeature::create("Accessibility Object Model" , "AccessibilityObjectModelEnabled" , "Accessibility Object Model support" , false, false), |
| 495 | API::ExperimentalFeature::create("Ad Click Attribution Debug Mode" , "AdClickAttributionDebugModeEnabled" , "Enable Ad Click Attribution Debug Mode" , false, false), |
| 496 | API::ExperimentalFeature::create("Ad Click Attribution" , "AdClickAttributionEnabled" , "Enable Ad Click Attribution for Cross-Site Link Navigations" , false, false), |
| 497 | API::ExperimentalFeature::create("Blank anchor target implies rel=noopener" , "BlankAnchorTargetImpliesNoOpenerEnabled" , "target=_blank on anchor elements implies rel=noopener" , true, false), |
| 498 | API::ExperimentalFeature::create("CSS Custom Properties and Values API" , "CSSCustomPropertiesAndValuesEnabled" , "Enable CSS Custom Properties and Values API" , false, false), |
| 499 | #if ENABLE(CSS_PAINTING_API) |
| 500 | API::ExperimentalFeature::create("CSS Painting API" , "CSSPaintingAPIEnabled" , "Enable the CSS Painting API" , false, false), |
| 501 | #endif |
| 502 | #if ENABLE(CSS_TYPED_OM) |
| 503 | API::ExperimentalFeature::create("CSS Typed OM" , "CSSTypedOMEnabled" , "Enable the CSS Typed OM" , false, false), |
| 504 | #endif |
| 505 | API::ExperimentalFeature::create("MathML Core" , "CoreMathMLEnabled" , "Disable features removed from the MathML Core spec." , DEFAULT_CORE_MATHML_ENABLED, false), |
| 506 | #if ENABLE(DARK_MODE_CSS) |
| 507 | API::ExperimentalFeature::create("Dark Mode CSS Support" , "DarkModeCSSEnabled" , "Enable Dark Mode CSS Support" , true, false), |
| 508 | #endif |
| 509 | API::ExperimentalFeature::create("Fetch API Request KeepAlive" , "FetchAPIKeepAliveEnabled" , "Enable Fetch API Request KeepAlive" , true, false), |
| 510 | API::ExperimentalFeature::create("Automatic HTTPS upgrade" , "HTTPSUpgradeEnabled" , "Automatic HTTPS upgrade for known supported sites" , false, false), |
| 511 | API::ExperimentalFeature::create("ImageBitmap and OffscreenCanvas" , "ImageBitmapOffscreenCanvasEnabled" , "Support for the ImageBitmap and OffscreenCanvas APIs" , DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, false), |
| 512 | #if ENABLE(INTERSECTION_OBSERVER) |
| 513 | API::ExperimentalFeature::create("Intersection Observer" , "IntersectionObserverEnabled" , "Enable Intersection Observer support" , true, false), |
| 514 | #endif |
| 515 | API::ExperimentalFeature::create("ITP First Party Website Data Removal" , "IsITPFirstPartyWebsiteDataRemovalEnabled" , "Enable Intelligent Tracking Prevention First Party Website Data Removal" , true, false), |
| 516 | API::ExperimentalFeature::create("LinkPrefetch" , "LinkPrefetchEnabled" , "Enable LinkedPrefetch" , false, false), |
| 517 | API::ExperimentalFeature::create("Media Capabilities Extensions" , "MediaCapabilitiesExtensionsEnabled" , "Media Capabilities Extensions" , true, false), |
| 518 | #if ENABLE(MEDIA_STREAM) |
| 519 | API::ExperimentalFeature::create("MediaRecorder" , "MediaRecorderEnabled" , "MediaRecorder" , false, false), |
| 520 | #endif |
| 521 | API::ExperimentalFeature::create("@page CSS at-rule support" , "PageAtRuleSupportEnabled" , "Enable @page support" , false, false), |
| 522 | API::ExperimentalFeature::create("Pointer Events" , "PointerEventsEnabled" , "Enable Pointer Events" , true, false), |
| 523 | API::ExperimentalFeature::create("Swap Processes on Cross-Site Navigation" , "ProcessSwapOnCrossSiteNavigationEnabled" , "Swap WebContent processes on cross-site navigations" , DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED, false), |
| 524 | API::ExperimentalFeature::create("Referrer Policy attribute" , "ReferrerPolicyAttributeEnabled" , "Enable Referrer Policy attribute" , false, false), |
| 525 | #if ENABLE(RESIZE_OBSERVER) |
| 526 | API::ExperimentalFeature::create("Resize Observer" , "ResizeObserverEnabled" , "Enable Resize Observer support" , false, false), |
| 527 | #endif |
| 528 | #if ENABLE(MEDIA_STREAM) && PLATFORM(MAC) |
| 529 | API::ExperimentalFeature::create("ScreenCapture" , "ScreenCaptureEnabled" , "Enable ScreenCapture" , true, false), |
| 530 | #endif |
| 531 | API::ExperimentalFeature::create("Server Timing" , "ServerTimingEnabled" , "Enable Server Timing API" , false, false), |
| 532 | API::ExperimentalFeature::create("CSS Spring Animations" , "SpringTimingFunctionEnabled" , "CSS Spring Animation prototype" , DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, false), |
| 533 | API::ExperimentalFeature::create("Block top-level redirects by third-party iframes" , "ThirdPartyIframeRedirectBlockingEnabled" , "Block top-level redirects by third-party iframes" , true, false), |
| 534 | API::ExperimentalFeature::create("Visual Viewport API" , "VisualViewportAPIEnabled" , "Enable Visual Viewport API" , true, false), |
| 535 | API::ExperimentalFeature::create("CSS Animations via Web Animations" , "WebAnimationsCSSIntegrationEnabled" , "Expose CSS Animations and CSS Transitions through getAnimations()" , false, false), |
| 536 | API::ExperimentalFeature::create("Web Animations" , "WebAnimationsEnabled" , "Web Animations prototype" , DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, false), |
| 537 | #if ENABLE(WEB_AUTHN) |
| 538 | API::ExperimentalFeature::create("Web Authentication" , "WebAuthenticationEnabled" , "Enable Web Authentication support" , true, false), |
| 539 | #endif |
| 540 | #if ENABLE(WEBGL2) |
| 541 | API::ExperimentalFeature::create("WebGL 2.0" , "WebGL2Enabled" , "WebGL 2 prototype" , false, false), |
| 542 | #endif |
| 543 | #if ENABLE(WEBGPU) |
| 544 | API::ExperimentalFeature::create("WebGPU" , "WebGPUEnabled" , "WebGPU Sketch prototype" , false, false), |
| 545 | #endif |
| 546 | #if ENABLE(WEB_RTC) |
| 547 | API::ExperimentalFeature::create("WebRTC H264 Simulcast" , "WebRTCH264SimulcastEnabled" , "Enable WebRTC H264 Simulcast" , true, false), |
| 548 | #endif |
| 549 | #if ENABLE(WEB_RTC) |
| 550 | API::ExperimentalFeature::create("WebRTC mDNS ICE candidates" , "WebRTCMDNSICECandidatesEnabled" , "Enable WebRTC mDNS ICE candidates" , true, false), |
| 551 | #endif |
| 552 | #if ENABLE(WEB_RTC) |
| 553 | API::ExperimentalFeature::create("WebRTC Unified Plan" , "WebRTCUnifiedPlanEnabled" , "Use WebRTC Unified Plan" , true, false), |
| 554 | #endif |
| 555 | #if ENABLE(WEB_RTC) |
| 556 | API::ExperimentalFeature::create("WebRTC VP8 codec" , "WebRTCVP8CodecEnabled" , "Enable WebRTC VP8 codec" , true, false), |
| 557 | #endif |
| 558 | API::ExperimentalFeature::create("Disable Web SQL" , "WebSQLDisabled" , "Disable Web SQL" , true, false), |
| 559 | #if PLATFORM(GTK) || PLATFORM(WPE) |
| 560 | API::ExperimentalFeature::create("WebVR" , "WebVREnabled" , "WebVR Module support" , DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, false), |
| 561 | #endif |
| 562 | }); |
| 563 | |
| 564 | return features; |
| 565 | } |
| 566 | |
| 567 | bool WebPreferences::isFeatureEnabled(const API::ExperimentalFeature& feature) const |
| 568 | { |
| 569 | struct FeatureGetterMapping { |
| 570 | const char* name; |
| 571 | bool (WebPreferences::*function) () const; |
| 572 | }; |
| 573 | |
| 574 | static FeatureGetterMapping getters[] = { |
| 575 | { "AccessibilityObjectModelEnabled" , &WebPreferences::accessibilityObjectModelEnabled }, |
| 576 | { "AdClickAttributionDebugModeEnabled" , &WebPreferences::adClickAttributionDebugModeEnabled }, |
| 577 | { "AdClickAttributionEnabled" , &WebPreferences::adClickAttributionEnabled }, |
| 578 | { "BlankAnchorTargetImpliesNoOpenerEnabled" , &WebPreferences::blankAnchorTargetImpliesNoOpenerEnabled }, |
| 579 | { "CSSCustomPropertiesAndValuesEnabled" , &WebPreferences::cssCustomPropertiesAndValuesEnabled }, |
| 580 | #if ENABLE(CSS_PAINTING_API) |
| 581 | { "CSSPaintingAPIEnabled" , &WebPreferences::cssPaintingAPIEnabled }, |
| 582 | #endif |
| 583 | #if ENABLE(CSS_TYPED_OM) |
| 584 | { "CSSTypedOMEnabled" , &WebPreferences::cssTypedOMEnabled }, |
| 585 | #endif |
| 586 | { "CoreMathMLEnabled" , &WebPreferences::coreMathMLEnabled }, |
| 587 | #if ENABLE(DARK_MODE_CSS) |
| 588 | { "DarkModeCSSEnabled" , &WebPreferences::darkModeCSSEnabled }, |
| 589 | #endif |
| 590 | { "FetchAPIKeepAliveEnabled" , &WebPreferences::fetchAPIKeepAliveEnabled }, |
| 591 | { "HTTPSUpgradeEnabled" , &WebPreferences::httpSUpgradeEnabled }, |
| 592 | { "ImageBitmapOffscreenCanvasEnabled" , &WebPreferences::imageBitmapOffscreenCanvasEnabled }, |
| 593 | #if ENABLE(INTERSECTION_OBSERVER) |
| 594 | { "IntersectionObserverEnabled" , &WebPreferences::intersectionObserverEnabled }, |
| 595 | #endif |
| 596 | { "IsITPFirstPartyWebsiteDataRemovalEnabled" , &WebPreferences::isITPFirstPartyWebsiteDataRemovalEnabled }, |
| 597 | { "LinkPrefetchEnabled" , &WebPreferences::linkPrefetchEnabled }, |
| 598 | { "MediaCapabilitiesExtensionsEnabled" , &WebPreferences::mediaCapabilitiesExtensionsEnabled }, |
| 599 | #if ENABLE(MEDIA_STREAM) |
| 600 | { "MediaRecorderEnabled" , &WebPreferences::mediaRecorderEnabled }, |
| 601 | #endif |
| 602 | { "PageAtRuleSupportEnabled" , &WebPreferences::pageAtRuleSupportEnabled }, |
| 603 | { "PointerEventsEnabled" , &WebPreferences::pointerEventsEnabled }, |
| 604 | { "ProcessSwapOnCrossSiteNavigationEnabled" , &WebPreferences::processSwapOnCrossSiteNavigationEnabled }, |
| 605 | { "ReferrerPolicyAttributeEnabled" , &WebPreferences::referrerPolicyAttributeEnabled }, |
| 606 | #if ENABLE(RESIZE_OBSERVER) |
| 607 | { "ResizeObserverEnabled" , &WebPreferences::resizeObserverEnabled }, |
| 608 | #endif |
| 609 | #if ENABLE(MEDIA_STREAM) && PLATFORM(MAC) |
| 610 | { "ScreenCaptureEnabled" , &WebPreferences::screenCaptureEnabled }, |
| 611 | #endif |
| 612 | { "ServerTimingEnabled" , &WebPreferences::serverTimingEnabled }, |
| 613 | { "SpringTimingFunctionEnabled" , &WebPreferences::springTimingFunctionEnabled }, |
| 614 | { "ThirdPartyIframeRedirectBlockingEnabled" , &WebPreferences::thirdPartyIframeRedirectBlockingEnabled }, |
| 615 | { "VisualViewportAPIEnabled" , &WebPreferences::visualViewportAPIEnabled }, |
| 616 | { "WebAnimationsCSSIntegrationEnabled" , &WebPreferences::webAnimationsCSSIntegrationEnabled }, |
| 617 | { "WebAnimationsEnabled" , &WebPreferences::webAnimationsEnabled }, |
| 618 | #if ENABLE(WEB_AUTHN) |
| 619 | { "WebAuthenticationEnabled" , &WebPreferences::webAuthenticationEnabled }, |
| 620 | #endif |
| 621 | #if ENABLE(WEBGL2) |
| 622 | { "WebGL2Enabled" , &WebPreferences::webGL2Enabled }, |
| 623 | #endif |
| 624 | #if ENABLE(WEBGPU) |
| 625 | { "WebGPUEnabled" , &WebPreferences::webGPUEnabled }, |
| 626 | #endif |
| 627 | #if ENABLE(WEB_RTC) |
| 628 | { "WebRTCH264SimulcastEnabled" , &WebPreferences::webRTCH264SimulcastEnabled }, |
| 629 | #endif |
| 630 | #if ENABLE(WEB_RTC) |
| 631 | { "WebRTCMDNSICECandidatesEnabled" , &WebPreferences::webRTCMDNSICECandidatesEnabled }, |
| 632 | #endif |
| 633 | #if ENABLE(WEB_RTC) |
| 634 | { "WebRTCUnifiedPlanEnabled" , &WebPreferences::webRTCUnifiedPlanEnabled }, |
| 635 | #endif |
| 636 | #if ENABLE(WEB_RTC) |
| 637 | { "WebRTCVP8CodecEnabled" , &WebPreferences::webRTCVP8CodecEnabled }, |
| 638 | #endif |
| 639 | { "WebSQLDisabled" , &WebPreferences::webSQLDisabled }, |
| 640 | #if PLATFORM(GTK) || PLATFORM(WPE) |
| 641 | { "WebVREnabled" , &WebPreferences::webVREnabled }, |
| 642 | #endif |
| 643 | }; |
| 644 | |
| 645 | const String& key = feature.key(); |
| 646 | |
| 647 | for (auto& getter : getters) { |
| 648 | if (key == getter.name) |
| 649 | return (this->*getter.function)(); |
| 650 | } |
| 651 | |
| 652 | return false; |
| 653 | } |
| 654 | |
| 655 | void WebPreferences::setFeatureEnabled(const API::ExperimentalFeature& feature, bool value) |
| 656 | { |
| 657 | setExperimentalFeatureEnabledForKey(feature.key(), value); |
| 658 | } |
| 659 | |
| 660 | void WebPreferences::setExperimentalFeatureEnabledForKey(const String& key, bool value) |
| 661 | { |
| 662 | struct FeatureSetterMapping { |
| 663 | const char* name; |
| 664 | void (WebPreferences::*function) (const bool&); |
| 665 | }; |
| 666 | |
| 667 | static FeatureSetterMapping setters[] = { |
| 668 | { "AccessibilityObjectModelEnabled" , &WebPreferences::setAccessibilityObjectModelEnabled }, |
| 669 | { "AdClickAttributionDebugModeEnabled" , &WebPreferences::setAdClickAttributionDebugModeEnabled }, |
| 670 | { "AdClickAttributionEnabled" , &WebPreferences::setAdClickAttributionEnabled }, |
| 671 | { "BlankAnchorTargetImpliesNoOpenerEnabled" , &WebPreferences::setBlankAnchorTargetImpliesNoOpenerEnabled }, |
| 672 | { "CSSCustomPropertiesAndValuesEnabled" , &WebPreferences::setCSSCustomPropertiesAndValuesEnabled }, |
| 673 | #if ENABLE(CSS_PAINTING_API) |
| 674 | { "CSSPaintingAPIEnabled" , &WebPreferences::setCSSPaintingAPIEnabled }, |
| 675 | #endif |
| 676 | #if ENABLE(CSS_TYPED_OM) |
| 677 | { "CSSTypedOMEnabled" , &WebPreferences::setCSSTypedOMEnabled }, |
| 678 | #endif |
| 679 | { "CoreMathMLEnabled" , &WebPreferences::setCoreMathMLEnabled }, |
| 680 | #if ENABLE(DARK_MODE_CSS) |
| 681 | { "DarkModeCSSEnabled" , &WebPreferences::setDarkModeCSSEnabled }, |
| 682 | #endif |
| 683 | { "FetchAPIKeepAliveEnabled" , &WebPreferences::setFetchAPIKeepAliveEnabled }, |
| 684 | { "HTTPSUpgradeEnabled" , &WebPreferences::setHTTPSUpgradeEnabled }, |
| 685 | { "ImageBitmapOffscreenCanvasEnabled" , &WebPreferences::setImageBitmapOffscreenCanvasEnabled }, |
| 686 | #if ENABLE(INTERSECTION_OBSERVER) |
| 687 | { "IntersectionObserverEnabled" , &WebPreferences::setIntersectionObserverEnabled }, |
| 688 | #endif |
| 689 | { "IsITPFirstPartyWebsiteDataRemovalEnabled" , &WebPreferences::setIsITPFirstPartyWebsiteDataRemovalEnabled }, |
| 690 | { "LinkPrefetchEnabled" , &WebPreferences::setLinkPrefetchEnabled }, |
| 691 | { "MediaCapabilitiesExtensionsEnabled" , &WebPreferences::setMediaCapabilitiesExtensionsEnabled }, |
| 692 | #if ENABLE(MEDIA_STREAM) |
| 693 | { "MediaRecorderEnabled" , &WebPreferences::setMediaRecorderEnabled }, |
| 694 | #endif |
| 695 | { "PageAtRuleSupportEnabled" , &WebPreferences::setPageAtRuleSupportEnabled }, |
| 696 | { "PointerEventsEnabled" , &WebPreferences::setPointerEventsEnabled }, |
| 697 | { "ProcessSwapOnCrossSiteNavigationEnabled" , &WebPreferences::setProcessSwapOnCrossSiteNavigationEnabled }, |
| 698 | { "ReferrerPolicyAttributeEnabled" , &WebPreferences::setReferrerPolicyAttributeEnabled }, |
| 699 | #if ENABLE(RESIZE_OBSERVER) |
| 700 | { "ResizeObserverEnabled" , &WebPreferences::setResizeObserverEnabled }, |
| 701 | #endif |
| 702 | #if ENABLE(MEDIA_STREAM) && PLATFORM(MAC) |
| 703 | { "ScreenCaptureEnabled" , &WebPreferences::setScreenCaptureEnabled }, |
| 704 | #endif |
| 705 | { "ServerTimingEnabled" , &WebPreferences::setServerTimingEnabled }, |
| 706 | { "SpringTimingFunctionEnabled" , &WebPreferences::setSpringTimingFunctionEnabled }, |
| 707 | { "ThirdPartyIframeRedirectBlockingEnabled" , &WebPreferences::setThirdPartyIframeRedirectBlockingEnabled }, |
| 708 | { "VisualViewportAPIEnabled" , &WebPreferences::setVisualViewportAPIEnabled }, |
| 709 | { "WebAnimationsCSSIntegrationEnabled" , &WebPreferences::setWebAnimationsCSSIntegrationEnabled }, |
| 710 | { "WebAnimationsEnabled" , &WebPreferences::setWebAnimationsEnabled }, |
| 711 | #if ENABLE(WEB_AUTHN) |
| 712 | { "WebAuthenticationEnabled" , &WebPreferences::setWebAuthenticationEnabled }, |
| 713 | #endif |
| 714 | #if ENABLE(WEBGL2) |
| 715 | { "WebGL2Enabled" , &WebPreferences::setWebGL2Enabled }, |
| 716 | #endif |
| 717 | #if ENABLE(WEBGPU) |
| 718 | { "WebGPUEnabled" , &WebPreferences::setWebGPUEnabled }, |
| 719 | #endif |
| 720 | #if ENABLE(WEB_RTC) |
| 721 | { "WebRTCH264SimulcastEnabled" , &WebPreferences::setWebRTCH264SimulcastEnabled }, |
| 722 | #endif |
| 723 | #if ENABLE(WEB_RTC) |
| 724 | { "WebRTCMDNSICECandidatesEnabled" , &WebPreferences::setWebRTCMDNSICECandidatesEnabled }, |
| 725 | #endif |
| 726 | #if ENABLE(WEB_RTC) |
| 727 | { "WebRTCUnifiedPlanEnabled" , &WebPreferences::setWebRTCUnifiedPlanEnabled }, |
| 728 | #endif |
| 729 | #if ENABLE(WEB_RTC) |
| 730 | { "WebRTCVP8CodecEnabled" , &WebPreferences::setWebRTCVP8CodecEnabled }, |
| 731 | #endif |
| 732 | { "WebSQLDisabled" , &WebPreferences::setWebSQLDisabled }, |
| 733 | #if PLATFORM(GTK) || PLATFORM(WPE) |
| 734 | { "WebVREnabled" , &WebPreferences::setWebVREnabled }, |
| 735 | #endif |
| 736 | }; |
| 737 | |
| 738 | for (auto& setter : setters) { |
| 739 | if (key == setter.name) { |
| 740 | (this->*setter.function)(value); |
| 741 | return; |
| 742 | } |
| 743 | } |
| 744 | } |
| 745 | |
| 746 | void WebPreferences::enableAllExperimentalFeatures() |
| 747 | { |
| 748 | setAccessibilityObjectModelEnabled(true); |
| 749 | setAdClickAttributionDebugModeEnabled(true); |
| 750 | setAdClickAttributionEnabled(true); |
| 751 | setBlankAnchorTargetImpliesNoOpenerEnabled(true); |
| 752 | setCSSCustomPropertiesAndValuesEnabled(true); |
| 753 | #if ENABLE(CSS_PAINTING_API) |
| 754 | setCSSPaintingAPIEnabled(true); |
| 755 | #endif |
| 756 | #if ENABLE(CSS_TYPED_OM) |
| 757 | setCSSTypedOMEnabled(true); |
| 758 | #endif |
| 759 | setCoreMathMLEnabled(true); |
| 760 | #if ENABLE(DARK_MODE_CSS) |
| 761 | setDarkModeCSSEnabled(true); |
| 762 | #endif |
| 763 | setFetchAPIKeepAliveEnabled(true); |
| 764 | setHTTPSUpgradeEnabled(true); |
| 765 | setImageBitmapOffscreenCanvasEnabled(true); |
| 766 | #if ENABLE(INTERSECTION_OBSERVER) |
| 767 | setIntersectionObserverEnabled(true); |
| 768 | #endif |
| 769 | setIsITPFirstPartyWebsiteDataRemovalEnabled(true); |
| 770 | setLinkPrefetchEnabled(true); |
| 771 | setMediaCapabilitiesExtensionsEnabled(true); |
| 772 | #if ENABLE(MEDIA_STREAM) |
| 773 | setMediaRecorderEnabled(true); |
| 774 | #endif |
| 775 | setPageAtRuleSupportEnabled(true); |
| 776 | setPointerEventsEnabled(true); |
| 777 | setProcessSwapOnCrossSiteNavigationEnabled(true); |
| 778 | setReferrerPolicyAttributeEnabled(true); |
| 779 | #if ENABLE(RESIZE_OBSERVER) |
| 780 | setResizeObserverEnabled(true); |
| 781 | #endif |
| 782 | #if ENABLE(MEDIA_STREAM) && PLATFORM(MAC) |
| 783 | setScreenCaptureEnabled(true); |
| 784 | #endif |
| 785 | setServerTimingEnabled(true); |
| 786 | setSpringTimingFunctionEnabled(true); |
| 787 | setThirdPartyIframeRedirectBlockingEnabled(true); |
| 788 | setVisualViewportAPIEnabled(true); |
| 789 | setWebAnimationsCSSIntegrationEnabled(true); |
| 790 | setWebAnimationsEnabled(true); |
| 791 | #if ENABLE(WEB_AUTHN) |
| 792 | setWebAuthenticationEnabled(true); |
| 793 | #endif |
| 794 | #if ENABLE(WEBGL2) |
| 795 | setWebGL2Enabled(true); |
| 796 | #endif |
| 797 | #if ENABLE(WEBGPU) |
| 798 | setWebGPUEnabled(true); |
| 799 | #endif |
| 800 | #if ENABLE(WEB_RTC) |
| 801 | setWebRTCH264SimulcastEnabled(true); |
| 802 | #endif |
| 803 | #if ENABLE(WEB_RTC) |
| 804 | setWebRTCMDNSICECandidatesEnabled(true); |
| 805 | #endif |
| 806 | #if ENABLE(WEB_RTC) |
| 807 | setWebRTCUnifiedPlanEnabled(true); |
| 808 | #endif |
| 809 | #if ENABLE(WEB_RTC) |
| 810 | setWebRTCVP8CodecEnabled(true); |
| 811 | #endif |
| 812 | setWebSQLDisabled(true); |
| 813 | #if PLATFORM(GTK) || PLATFORM(WPE) |
| 814 | setWebVREnabled(true); |
| 815 | #endif |
| 816 | } |
| 817 | |
| 818 | } |
| 819 | |