Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4d43216e1ba385baa7009dec90791314f7eb7e40 https://github.com/WebKit/WebKit/commit/4d43216e1ba385baa7009dec90791314f7eb7e40 Author: Simon Fraser <simon.fra...@apple.com> Date: 2024-07-16 (Tue, 16 Jul 2024)
Changed paths: M LayoutTests/fast/css/parsing-opacity-expected.txt M LayoutTests/fast/css/parsing-opacity.html M Source/WebCore/css/parser/CSSParserFastPaths.cpp M Source/WebCore/css/parser/CSSParserFastPaths.h M Source/WebCore/css/typedom/CSSUnitValue.cpp Log Message: ----------- Add support for opacity to the CSS parser fast-path https://bugs.webkit.org/show_bug.cgi?id=276646 rdar://131808782 Reviewed by Sam Weinig. Add support for parsing opacity to CSSParserFastPaths, supporting numeric and percentage forms. Rearrange CSSParserFastPaths::maybeParseValue() to switch on the propertyID; previously we we calling `parseSimpleTransform()` for things we knew were not a transform. Hoist the call to `isSimpleLengthPropertyID()` out of `parseSimpleLengthValue()`. The `isCSSViewportParsingEnabledForMode()` check there is obsolete and can probably be removed, since we don't support `@viewport`. For simple length properties, we still fall through to `parseKeywordValue()` for values like `auto`. Support the `none` display value. Remove `transformCanLikelyUseFastPath()` because it's faster to just call call `parseSimpleTransformList()`. * LayoutTests/fast/css/parsing-opacity-expected.txt: * LayoutTests/fast/css/parsing-opacity.html: * Source/WebCore/css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isSimpleLengthPropertyID): (WebCore::parseSimpleNumberOrPercentage): (WebCore::parseSimpleLengthValue): (WebCore::parseColorIntOrPercentage): (WebCore::parseHexColorInternal): (WebCore::parseNumericColor): (WebCore::parseSimpleTransformList): (WebCore::parseSimpleTransform): (WebCore::parseDisplay): (WebCore::parseOpacity): (WebCore::CSSParserFastPaths::maybeParseValue): (WebCore::transformCanLikelyUseFastPath): Deleted. * Source/WebCore/css/parser/CSSParserFastPaths.h: * Source/WebCore/css/typedom/CSSUnitValue.cpp: (WebCore::isValueOutOfRangeForProperty): Canonical link: https://commits.webkit.org/281010@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