[webkit-reviews] review granted: [Bug 221096] [macOS] Observe color preference changes in the UI process : [Attachment 418666] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 1 09:47:34 PST 2021

Brent Fulgham <bfulgham at webkit.org> has granted Per Arne Vollan
<pvollan at apple.com>'s request for review:
Bug 221096: [macOS] Observe color preference changes in the UI process

Attachment 418666: Patch


--- Comment #5 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 418666
  --> https://bugs.webkit.org/attachment.cgi?id=418666

View in context: https://bugs.webkit.org/attachment.cgi?id=418666&action=review


>>> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:107
>>> +static CFStringRef AppleColorPreferencesChangedNotification =
>> Should this be in one of our PAL SPI files?
> The constant has not been assigned an official name in the system. Even so,
should we add this to an SPI file?

No, not if it's our own thing.

>>> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:595
>>> +	 auto* pool = reinterpret_cast<WebProcessPool*>(observer);
>> Could pool be null (perhaps during launch or shutdown)? Maybe this should
>> if (auto* pool = ....)
>>     pool->sendToAllProcesses
>> This might apply to the 'backlightLevelDidChangeCallback', too.
> That is a good point. In this particular case it seems pool cannot be null,
since it is being initialized with 'this' in
this, colorPreferencesDidChangeCallback,
AppleColorPreferencesChangedNotification, nullptr,

Makes sense.

More information about the webkit-reviews mailing list