Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c61c3004d66ab6e219241918cfa49ce12427ea4a https://github.com/WebKit/WebKit/commit/c61c3004d66ab6e219241918cfa49ce12427ea4a Author: Sam Weinig <wei...@apple.com> Date: 2024-04-22 (Mon, 22 Apr 2024)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-relative-color-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-rgb-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/relative-color-out-of-gamut-expected.txt M Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.cpp Log Message: ----------- Re-sync rgb()/rgba() implementation with the latest spec https://bugs.webkit.org/show_bug.cgi?id=272942 Reviewed by Darin Adler. The CSS Color specification has changed since rgb()/rgba() was last worked on. This updates things to support: - Modified parsing rules for the modern syntax which now allow mixed <number> and <percentage> values. - Changes to the types used by the r/g/b/alpha symbols used in the relative color form to always be CSS_NUMBER. - Requirement that the relative form serialize as `color(srgb )`. * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-relative-color-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-rgb-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/relative-color-out-of-gamut-expected.txt: Update another good chunk of tests to now pass. * Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.cpp: (WebCore::CSSPropertyParserHelpers::normalizeRGBFunctionComponent): (WebCore::CSSPropertyParserHelpers::normalizeRGBFunctionAlpha): (WebCore::CSSPropertyParserHelpers::normalizeRGBFunctionComponents): (WebCore::CSSPropertyParserHelpers::parseRelativeRGBParametersRaw): (WebCore::CSSPropertyParserHelpers::parseNonRelativeRGBParametersLegacyRaw): (WebCore::CSSPropertyParserHelpers::parseNonRelativeRGBParametersModernRaw): (WebCore::CSSPropertyParserHelpers::parseNonRelativeRGBParametersRaw): Work to separate parsing and normalization, allowing much of normalization to be reused for all the parsing paths. (WebCore::CSSPropertyParserHelpers::parseRGBParametersRaw): (WebCore::CSSPropertyParserHelpers::parseColorFunctionRaw): (WebCore::CSSPropertyParserHelpers::parseColorFunction): Remove distinction in parsing behavior between rgb() and rgba(). Canonical link: https://commits.webkit.org/277842@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes