[webkit-changes] [WebKit/WebKit] 9b4b2a: [Screen Time Refactoring] macOS support for URL do...

Jessica Cheung noreply at github.com
Tue Dec 10 15:19:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b4b2aab8589840de71c3f65035c20b10057ce66
      https://github.com/WebKit/WebKit/commit/9b4b2aab8589840de71c3f65035c20b10057ce66
  Author: Jessica Cheung <jcheung23 at apple.com>
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
    M Source/WebCore/PAL/pal/PlatformMac.cmake
    A Source/WebCore/PAL/pal/cocoa/ScreenTimeSoftLink.h
    A Source/WebCore/PAL/pal/cocoa/ScreenTimeSoftLink.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/mac/PageClientImplMac.h
    M Source/WebKit/UIProcess/mac/PageClientImplMac.mm

  Log Message:
  -----------
  [Screen Time Refactoring] macOS support for URL donations
https://bugs.webkit.org/show_bug.cgi?id=283944
rdar://140438800

Reviewed by Aditya Keerthi and Tim Horton.

Add a flag/preference to enable Screen Time donation.
Implemented Screen Time donation for loaded pages.
Installed Screen Time shield view to block web content when needed.
Halts media playback when web content is blocked
and shield is shown (not supported for PIP yet).

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/PlatformMac.cmake:
* Source/WebCore/PAL/pal/cocoa/ScreenTimeSoftLink.h: Added.
* Source/WebCore/PAL/pal/cocoa/ScreenTimeSoftLink.mm: Added.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _installScreenTimeWebpageController]):
(-[WKWebView _uninstallScreenTimeWebpageController]):
(-[WKWebView observeValueForKeyPath:ofObject:change:context:]):
(-[WKWebView dealloc]):
(-[WKWebView _screenTimeWebpageController]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::installScreenTimeWebpageController):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::prepareToLoadWebPage):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::installScreenTimeWebpageController):
(WebKit::updateScreenTimeWebpageControllerURL):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list