Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 69431ee5773488ddff588de2776df095f0ba6ed5
      
https://github.com/WebKit/WebKit/commit/69431ee5773488ddff588de2776df095f0ba6ed5
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
    A Source/WebCore/PAL/pal/cocoa/LockdownModeCocoa.h
    A Source/WebCore/PAL/pal/cocoa/LockdownModeCocoa.mm
    R Source/WebCore/PAL/pal/cocoa/LockdownModeSoftLink.h
    R Source/WebCore/PAL/pal/cocoa/LockdownModeSoftLink.mm
    M Source/WebCore/platform/graphics/cg/UTIRegistry.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.mm
    M Source/WebKit/WebProcess/WebProcess.cpp

  Log Message:
  -----------
  REGRESSION(289593@main): Images are still restricted even after opting out 
pages from Lockdown Mode
https://bugs.webkit.org/show_bug.cgi?id=291614#
rdar://147500578

Reviewed by Tim Horton.

In 289593@main we made UTIRegistry call PAL::isLockdownModeEnabled() to detect
whether the Lockdown Mode is enabled. But this function ends up calling the 
system
LockdownModeLibrary. This does not take into consideration the opted out pages.
So this causes the restricted images to be always restricted in Lockdown Mode.

The fix is to used WebProcess::isLockdownModeEnabled() instead because this will
return false when opting out the page. To propagate this to WebCore a getter and
a setter for isLockdownModeEnabledForCurrentProcess will be added in PAL.

UTIRegistry will call PAL::isLockdownModeEnabledForCurrentProcess() instead.

* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/cocoa/LockdownModeCocoa.h: Renamed from 
Source/WebCore/PAL/pal/cocoa/LockdownModeSoftLink.h.
* Source/WebCore/PAL/pal/cocoa/LockdownModeCocoa.mm: Renamed from 
Source/WebCore/PAL/pal/cocoa/LockdownModeSoftLink.mm.
(PAL::isLockdownModeEnabled):
(PAL::isLockdownModeEnabledForCurrentProcessCached):
(PAL::isLockdownModeEnabledForCurrentProcess):
(PAL::setLockdownModeEnabledForCurrentProcess):
* Source/WebCore/platform/graphics/cg/UTIRegistry.mm:
(WebCore::supportedImageTypes):
(WebCore::setAdditionalSupportedImageTypes):
(WebCore::allowableSupportedImageTypes):
(WebCore::isLockdownModeEnabled): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.mm:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Canonical link: https://commits.webkit.org/293755@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to