Simplify Color's interface by removing isDark() and lightness()
Created attachment 403022 [details]
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]
View in context: https://bugs.webkit.org/attachment.cgi?id=403022&action=review
> + - Move Color::isDark to RenderThemeIOS.mm, it's one client and rename it
it's -> its
> +static bool useConvexGradient(const Color& backgroundColor)
Typically we try not to name functions that compute values with verbs. So we would name it shouldUseConvexGradient.
> + - 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]
Created attachment 403121 [details]
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].