You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update color-contrast() to support a target contrast ratio
https://bugs.webkit.org/show_bug.cgi?id=224411
Reviewed by Antti Koivisto.
Source/WebCore:
Updated fast/css/parsing-color-contrast.html with new test cases.
* css/CSSValueKeywords.in:
Add new keywords, AA and AA-large which are constants for contrast ratios of 4.5
and 3.0 respectively.
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Remove now incorrect comment about adding support for fallback as fallback
has been removed from the spec.
(WebCore::CSSPropertyParserHelpers::selectFirstColorThatMeetsOrExceedsTargetContrast):
(WebCore::CSSPropertyParserHelpers::selectFirstColorWithHighestContrast):
(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):
Add support for the new optional target contrast ratio in color-contrast() that was
recently added to CSS Color 5.
LayoutTests:
Add tests and update results for target contrast ratios in color-contrast().
* fast/css/parsing-color-contrast-expected.txt:
* fast/css/parsing-color-contrast.html:
Canonical link: https://commits.webkit.org/236396@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments