REGRESSION (r258949): Dynamic user accent color changes are not respected by WKWebView
Created attachment 400790 [details] Patch
<rdar://problem/63436275>
Created attachment 400796 [details] Patch
Comment on attachment 400796 [details] Patch Thanks for fixing this! R=me.
https://trac.webkit.org/changeset/262427/webkit
Comment on attachment 400796 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400796&action=review > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:926 > +static const WTF::String& userAccentColorPreferenceKey() > +{ > + static NeverDestroyed<WTF::String> userAccentColorPreferenceKey(MAKE_STATIC_STRING_IMPL("AppleAccentColor")); > + return userAccentColorPreferenceKey; > +} Possible future tidying step. Seems like this could return a const char* or an ASCIILiteral instead. No need for a NeverDestroyed, and comparing a WTF::String is not faster with another WTF::String than it is with a const char*. Or this could be userAccentColorPreferenceKey() instead.
(In reply to Darin Adler from comment #6) > Comment on attachment 400796 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=400796&action=review > > > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:926 > > +static const WTF::String& userAccentColorPreferenceKey() > > +{ > > + static NeverDestroyed<WTF::String> userAccentColorPreferenceKey(MAKE_STATIC_STRING_IMPL("AppleAccentColor")); > > + return userAccentColorPreferenceKey; > > +} > > Possible future tidying step. Seems like this could return a const char* or > an ASCIILiteral instead. No need for a NeverDestroyed, and comparing a > WTF::String is not faster with another WTF::String than it is with a const > char*. > > Or this could be userAccentColorPreferenceKey() instead. Heh, I followed what we did with all of our generated preference keys. OK! This is good to know.