Simplify Color's interface by removing isDark() and lightness()
Created attachment 403022 [details] Patch
Not a huge surprise that paste-dark-mode-color-filtered.html is failing, as the heuristic is changing. Need to see if the new results are acceptable.
Comment on attachment 403022 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403022&action=review > Source/WebCore/ChangeLog:8 > + - Move Color::isDark to RenderThemeIOS.mm, it's one client and rename it it's -> its > Source/WebCore/rendering/RenderThemeIOS.mm:1055 > +static bool useConvexGradient(const Color& backgroundColor) Typically we try not to name functions that compute values with verbs. So we would name it shouldUseConvexGradient. > Source/WebKit/ChangeLog:10 > + - Remove WebCore::lightness() and Color::lightness(), and replace with > + Color::luminance(), which is almost the same, but likely to be more > + in line with perceptual lightness people had in mind. Maybe do the behavior change, the switch to luminance, first in a patch that doesn’t also refactor or remove.
Created attachment 403120 [details] Patch
Created attachment 403121 [details] Patch
Just going to do the isDark change in this one. Leave the lightness() for separate change.
Committed r263713: <https://trac.webkit.org/changeset/263713> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403121 [details].
<rdar://problem/64917999>