[webkit-changes] [WebKit/WebKit] c895bf: [iOS] Screen Wake Lock API doesn't work
Chris Dumez
noreply at github.com
Mon Nov 7 14:06:11 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c895bf811b89c58942a1f6bc541f0e4d95bec7f7
https://github.com/WebKit/WebKit/commit/c895bf811b89c58942a1f6bc541f0e4d95bec7f7
Author: Chris Dumez <cdumez at apple.com>
Date: 2022-11-07 (Mon, 07 Nov 2022)
Changed paths:
M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
M Source/WebCore/PAL/pal/system/cocoa/SleepDisablerCocoa.cpp
M Source/WebCore/PAL/pal/system/cocoa/SleepDisablerCocoa.h
A Source/WebCore/PAL/pal/system/ios/SleepDisablerIOS.mm
Log Message:
-----------
[iOS] Screen Wake Lock API doesn't work
https://bugs.webkit.org/show_bug.cgi?id=247573
rdar://101561575
Reviewed by Jer Noble.
`IOPMAssertionCreateWithDescription(kIOPMAssertionTypePreventUserIdleDisplaySleep)`
only works on macOS to prevent display from sleeping. On iOS, we now rely on the
`UIApplication.sharedApplication.idleTimerDisabled` API instead:
- https://developer.apple.com/documentation/uikit/uiapplication/1623070-idletimerdisabled?language=objc
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/system/cocoa/SleepDisablerCocoa.cpp:
(PAL::SleepDisablerCocoa::SleepDisablerCocoa):
(PAL::SleepDisablerCocoa::~SleepDisablerCocoa):
(PAL::SleepDisablerCocoa::takeScreenSleepDisablingAssertion):
(PAL::SleepDisablerCocoa::takeSystemSleepDisablingAssertion):
* Source/WebCore/PAL/pal/system/cocoa/SleepDisablerCocoa.h:
* Source/WebCore/PAL/pal/system/ios/SleepDisablerIOS.mm: Added.
(PAL::ScreenSleepDisabler::shared):
(PAL::ScreenSleepDisabler::takeAssertion):
(PAL::ScreenSleepDisabler::ScreenSleepDisabler):
(PAL::ScreenSleepDisabler::updateState):
(PAL::SleepDisablerCocoa::takeScreenSleepDisablingAssertion):
Canonical link: https://commits.webkit.org/256426@main
More information about the webkit-changes
mailing list