Skip to content

Commit

Permalink
[Lockdown Mode] Explicitly disable WebGPU
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=267416
<radar://121197420>

Reviewed by Tim Nguyen.

WebGPU is listed as experimental so this behavior exists today, but
specifically disable it when entering lockdown mode to avoid allowing
it enabled unintentionally when the feature is enabled.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::adjustSettingsForLockdownMode):

Canonical link: https://commits.webkit.org/278425@main
  • Loading branch information
mwyrzykowski committed May 6, 2024
1 parent 8b6db29 commit 47876c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/WebKit/WebProcess/WebPage/WebPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4597,6 +4597,9 @@ void WebPage::adjustSettingsForLockdownMode(Settings& settings, const WebPrefere
Settings::disableGlobalUnstableFeaturesForModernWebKit();

settings.setWebGLEnabled(false);
#if HAVE(WEBGPU_IMPLEMENTATION)
settings.setWebGPUEnabled(false);
#endif
#if ENABLE(GAMEPAD)
settings.setGamepadsEnabled(false);
#endif
Expand Down

0 comments on commit 47876c1

Please sign in to comment.