Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2302a8a6064a27a03cb9921a2131780768dab35f
https://github.com/WebKit/WebKit/commit/2302a8a6064a27a03cb9921a2131780768dab35f
Author: Jessica Cheung <[email protected]>
Date: 2025-04-28 (Mon, 28 Apr 2025)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ScreenTime.mm
Log Message:
-----------
[Screen Time Refactoring] Apps glitch due to ScreenTimeWebExtension
https://bugs.webkit.org/show_bug.cgi?id=292019
rdar://149961063
Reviewed by Aditya Keerthi.
Currently, we call STWebpageController's loadView and
add the subview to the WKWebView regardless of the type of URL.
Some apps may be using a WKWebView for purposes other than
displaying web content. In those cases, Screen Time
functionality is not used and we shouldn't
call STWebpageController's loadView, add the subview or
install the controller in general since it is not
needed unless we are actually loading an http/https URL.
Add an API test to ensure we only install the STWebpageController
for http/https URLs. Additionally, alter some other API tests
to request valid http/https URLs due to this change.
Rename API test URLIsPictureInPictureMacos to
URLIsPictureInPicture.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _installScreenTimeWebpageControllerIfNeeded]):
(-[WKWebView _updateScreenTimeBasedOnWindowVisibility]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ScreenTime.mm:
(testSuppressUsageRecordingWithDataStore):
(testShowsSystemScreenTimeBlockingView):
(testWebContentIsNotClickableShowingSystemScreenTimeBlockingView):
(TEST(ScreenTime, IsBlockedByScreenTimeTrue)):
(TEST(ScreenTime, IsBlockedByScreenTimeFalse)):
(TEST(ScreenTime, IsBlockedByScreenTimeMultiple)):
(TEST(ScreenTime, IsBlockedByScreenTimeKVO)):
(TEST(ScreenTime, IdentifierNil)):
(TEST(ScreenTime, IdentifierString)):
(TEST(ScreenTime, URLIsPlayingVideo)):
(TEST(ScreenTime, URLIsPictureInPicture)):
(TEST(ScreenTime, RemoveDataWithTimeInterval)):
(TEST(ScreenTime, OffscreenSystemScreenTimeBlockingView)):
(TEST(ScreenTime, OffscreenBlurredScreenTimeBlockingView)):
(TEST(ScreenTime, DoNotDonateURLsInOccludedWebView)):
(TEST(ScreenTime, CreateControllerAfterOffscreenWebViewBecomesInWindow)):
(TEST(ScreenTime,
ScreenTimeControllerSetsURLWhenOffscreenWebViewBecomesInWindow)):
(TEST(ScreenTime, ScreenTimeControllerInstalledAfterRestoreFromSessionState)):
(TEST(ScreenTime, ScreenTimeControllerViewOnlyInstalledForHTTPFamily)):
(TEST(ScreenTime, URLIsPictureInPictureMacos)): Deleted.
Canonical link: https://commits.webkit.org/294226@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