This bug is addressing blocking the backboardd service "com.apple.backboard.hid.services".
<rdar://problem/48726709>
Created attachment 364076 [details] Patch
Created attachment 364081 [details] Patch
In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphoneos/DerivedSources/WebKit2/unified-sources/UnifiedSource31-mm.mm:7: /Volumes/Data/EWS/WebKit/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:405:134: error: use of undeclared identifier 'UIBacklightLevelChangedNotification' CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce); ^ /Volumes/Data/EWS/WebKit/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:457:104: error: use of undeclared identifier 'UIBacklightLevelChangedNotification' CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, (CFStringRef)UIBacklightLevelChangedNotification, nullptr);
Comment on attachment 364081 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=364081&action=review > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:403 > + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce); You might need to forward declare UIBacklightLevelChangedNotification, perhaps in an SPI file. Or you might just be missing a relevant include.
Created attachment 364275 [details] Patch
(In reply to Brent Fulgham from comment #5) > Comment on attachment 364081 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=364081&action=review > > > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:403 > > + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce); > > You might need to forward declare UIBacklightLevelChangedNotification, > perhaps in an SPI file. Or you might just be missing a relevant include. Thanks! I have updated the patch.
Comment on attachment 364275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=364275&action=review > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:711 > + I think you should have a FIXME comment referencing the radar where the relevant backlight code will be improved in the future so we don't have to do this silly swizzling.
Created attachment 364284 [details] Patch
(In reply to Brent Fulgham from comment #8) > Comment on attachment 364275 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=364275&action=review > > > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:711 > > + > > I think you should have a FIXME comment referencing the radar where the > relevant backlight code will be improved in the future so we don't have to > do this silly swizzling. Done. Thanks for reviewing!
Comment on attachment 364284 [details] Patch Clearing flags on attachment: 364284 Committed r242745: <https://trac.webkit.org/changeset/242745>
Rolled out in https://trac.webkit.org/r242775 because it broke internal builds. Details in radar.
Created attachment 364411 [details] Patch
Comment on attachment 364411 [details] Patch Clearing flags on attachment: 364411 Committed r242807: <https://trac.webkit.org/changeset/242807>