Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 27fa2a20b2901866b273cc5b2cbbca23637483a1 https://github.com/WebKit/WebKit/commit/27fa2a20b2901866b273cc5b2cbbca23637483a1 Author: Sam Weinig <s...@webkit.org> Date: 2025-03-06 (Thu, 06 Mar 2025)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/at-position-try-cssom-expected.txt M Source/WebCore/css/CSSProperties.json M Source/WebCore/css/parser/CSSParserFastPaths.cpp M Source/WebCore/css/parser/CSSPropertyParser.cpp M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.h M Source/WebCore/css/scripts/process-css-properties.py M Source/WebCore/css/scripts/test/TestCSSProperties.json M Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSPropertyNames.gperf M Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSPropertyNames.h M Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSPropertyParsing.cpp M Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSStyleDeclaration+PropertyNames.idl M Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleBuilderGenerated.cpp M Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleInterpolationWrapperMap.cpp Log Message: ----------- Add support for generating a consumer for CSS property's that require arbitrary numeric ranges https://bugs.webkit.org/show_bug.cgi?id=289170 Reviewed by Darin Adler. To support CSS properties like font-weight, which contains the production <number [1,1000]>, support for arbitrary numeric ranges is required in the code generator. This is done by replacing calls to dedicated consume{numeric type}(...) functions with direct use of CSSPrimitiveValueResolver. CSSPrimitiveValueResolver allows specifying an arbitrary strongly typed CSS value including any numeric range it specifies. * Source/WebCore/css/CSSProperties.json: - Make 'font-weight' use the code generator and export it for use in the font shorthand. * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::consumeFont): - Call new generated and exported function. * Source/WebCore/css/parser/CSSParserFastPaths.cpp: (WebCore::parseKeywordValue): - Remove unused support for fast path parsing of descriptors. When properties and descriptors share the same name (as is true with 'font-weight') but have different grammars, the fast path would be incorrect. * Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp: * Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.h: (WebCore::CSSPropertyParserHelpers::consumeFontWeight): Deleted. - Remove old hand written 'font-weight' consumer. * Source/WebCore/css/process-css-properties.py: - Remove mappings for range parameters and instead generate appropriate CSS::Range expressions for them. - Fix BNFLexer to support negative numeric tokens. * Source/WebCore/css/scripts/test/TestCSSProperties.json: - Add new test case with numeric ranges. * Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSPropertyNames.gperf: * Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSPropertyNames.h: * Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSPropertyParsing.cpp: * Source/WebCore/css/scripts/test/TestCSSPropertiesResults/CSSStyleDeclaration+PropertyNames.idl: * Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleBuilderGenerated.cpp: * Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleInterpolationWrapperMap.cpp: - Update results for new test case. Canonical link: https://commits.webkit.org/291734@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