[webkit-reviews] review granted: [Bug 224512] Use range-for loop in target contrast selection to simplify/improve code readability : [Attachment 425939] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 13 18:16:09 PDT 2021
Darin Adler <darin at apple.com> has granted Sam Weinig <sam at webkit.org>'s request
for review:
Bug 224512: Use range-for loop in target contrast selection to simplify/improve
code readability
https://bugs.webkit.org/show_bug.cgi?id=224512
Attachment 425939: Patch
https://bugs.webkit.org/attachment.cgi?id=425939&action=review
--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 425939
--> https://bugs.webkit.org/attachment.cgi?id=425939
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=425939&action=review
> Source/WebCore/rendering/TextPaintStyle.cpp:66
> // Uses the WCAG 2.0 definition of legibility: a contrast ratio of 4.5:1
or greater.
> // https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
> - return Color::contrastRatio(textColor, backgroundColor) > 4.5;
> + return contrastRatio(textColor, backgroundColor) > 4.5;
Comment says >=, code still says just >. I know this is floating point, so the
difference is infinitesimal, but still ...
More information about the webkit-reviews
mailing list