Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e574cf07e45c7955a3f7955240a2d8f479076c34
https://github.com/WebKit/WebKit/commit/e574cf07e45c7955a3f7955240a2d8f479076c34
Author: Sam Weinig <[email protected]>
Date: 2025-05-14 (Wed, 14 May 2025)
Changed paths:
M LayoutTests/fast/css/computed-clip-with-auto-rect-expected.txt
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations
M
Source/WebCore/SaferCPPExpectations/NoUncheckedPtrMemberCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M
Source/WebCore/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/WebAnimation.cpp
M Source/WebCore/css/CSSComputedStyleDeclaration.cpp
M Source/WebCore/css/CSSComputedStyleDeclaration.h
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSPrimitiveValueMappings.h
M Source/WebCore/css/CSSProperties.json
R Source/WebCore/css/ComputedStyleExtractor.cpp
R Source/WebCore/css/ComputedStyleExtractor.h
M Source/WebCore/css/ShorthandSerializer.cpp
M Source/WebCore/css/ShorthandSerializer.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/CSSStyleProperties+PropertyNames.idl
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleBuilderGenerated.cpp
A
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleExtractorGenerated.cpp
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleInterpolationWrapperMap.cpp
M Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp
M Source/WebCore/css/typedom/color/CSSRGB.cpp
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/ViewTransition.cpp
M Source/WebCore/editing/ApplyStyleCommand.cpp
M Source/WebCore/editing/EditingStyle.cpp
M Source/WebCore/editing/EditingStyle.h
M Source/WebCore/editing/ReplaceSelectionCommand.cpp
M Source/WebCore/editing/cocoa/HTMLConverter.mm
M Source/WebCore/html/CustomPaintImage.cpp
M Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp
M Source/WebCore/platform/animation/Animation.h
M Source/WebCore/rendering/BorderPainter.cpp
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderObject.cpp
M Source/WebCore/rendering/RenderTheme.cpp
M Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
M Source/WebCore/rendering/style/BorderValue.cpp
M Source/WebCore/rendering/style/BorderValue.h
M Source/WebCore/rendering/style/OutlineValue.h
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/RenderStyleConstants.h
M Source/WebCore/rendering/style/RenderStyleInlines.h
M Source/WebCore/rendering/style/RenderStyleSetters.h
M Source/WebCore/rendering/style/StyleFilterImage.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
M Source/WebCore/style/StyleBuilderConverter.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StyleBuilderGenerated.h
A Source/WebCore/style/StyleExtractor.cpp
A Source/WebCore/style/StyleExtractor.h
A Source/WebCore/style/StyleExtractorConverter.h
A Source/WebCore/style/StyleExtractorCustom.h
A Source/WebCore/style/StyleExtractorGenerated.h
A Source/WebCore/style/StyleExtractorState.h
M Source/WebCore/style/values/images/StyleGradient.cpp
M Source/WebCore/style/values/scroll-snap/StyleScrollMargin.cpp
M Source/WebCore/style/values/scroll-snap/StyleScrollMargin.h
M Source/WebCore/style/values/scroll-snap/StyleScrollPadding.cpp
M Source/WebCore/style/values/scroll-snap/StyleScrollPadding.h
M Source/WebCore/svg/SVGElement.cpp
M Source/WebCore/svg/properties/SVGPropertyAnimator.h
M Tools/Scripts/webkitpy/style/checkers/jsonchecker.py
Log Message:
-----------
[Computed Style Gen] Autogenerate computed style extractor
https://bugs.webkit.org/show_bug.cgi?id=292797
Reviewed by Darin Adler.
Converts computed style extraction to use autogeneration.
The basic pattern mirrors `Style::Builder`:
- The class `ComputedStyleExtractor` is renamed to `Style::Extractor`.
- `CSSPropertyID` dispatch, that used to be in `ComputedStyleExtractor`
is now generated in a new class `Style::ExtractorGenerated`.
- Individual property extractions that can be generated are done
along with `Style::ExtractorGenerated` as static functions in a
generated struct called `Style::ExtractorFunctions` (mirroring
`Style::BuilderGenerated` and `Style::BuilderFunctions`).
- Properties that need completely custom extraction are implemented
as static functions in a `Style::ExtractorCustom` struct (mirroring
`Style::BuilderCustom`).
- Shared value conversion from style types to CSSValue are implemented
as static functions in a `Style::ExtractorConverter` struct (mirroring
`Style::BuilderConverter`).
Generation of the extractors in `Style::ExtractorFunctions` uses new
fields in CSSProperties.json to determine what can be generated.
- `skip-style-extractor` replaces and extends the `computable` field
telling the generator no extractor should be generated at all (mirroring
`skip-style-builder`).
- `style-extractor-converter` is used to indicate the suffix for a
converter in `Style::ExtractorConverter` to use (mirroring
`style-builder-converter`).
- Where possible, the names of the converters used the builder and
extractor should be the same. In these cases, instead of specifying
both `style-builder-converter` and `style-extractor-converter` to
the same value, and single `style-converter` field can be used.
- `style-extractor-custom` is used to indicate the that a completely
custom converter is needed (mirroring `style-builder-custom`).
- `shorthand-pattern` is used to indicate which standard shorthand
pattern should be used. This does not mirror anything in style
builder, as shorthands are not relevant to building, but has been
named in such a way that it should be useable for generating
additional parser functions.
* LayoutTests/fast/css/computed-clip-with-auto-rect-expected.txt:
- Update results for correct clip() computed value. There was a typo in
776f9cc2
that made it compute to auto if only the right and bottom sides were
auto, but
really it should have been checking all four sides.
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/style/StyleExtractor.cpp: Added.
* Source/WebCore/style/StyleExtractor.h: Added.
* Source/WebCore/style/StyleExtractorConverter.h: Added.
* Source/WebCore/style/StyleExtractorCustom.h: Added.
* Source/WebCore/style/StyleExtractorGenerated.h: Added..
* Source/WebCore/style/StyleExtractorState.h: Added.
* Source/WebCore/css/ComputedStyleExtractor.cpp: Removed.
* Source/WebCore/css/ComputedStyleExtractor.h: Removed.
- Add/remove files.
* Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/NoUncheckedPtrMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
*
Source/WebCore/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations:
- Add expectations for moved implementations.
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
* Source/WebCore/rendering/BorderPainter.cpp:
* Source/WebCore/rendering/RenderBlock.cpp:
* Source/WebCore/rendering/RenderElement.cpp:
* Source/WebCore/rendering/RenderInline.cpp:
* Source/WebCore/rendering/RenderObject.cpp:
* Source/WebCore/rendering/RenderTheme.cpp:
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm:
* Source/WebCore/rendering/style/BorderValue.cpp:
* Source/WebCore/rendering/style/BorderValue.h:
* Source/WebCore/rendering/style/OutlineValue.h:
* Source/WebCore/rendering/style/RenderStyle.cpp:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
* Source/WebCore/rendering/style/RenderStyleSetters.h:
* Source/WebCore/rendering/updating/RenderTreeBuilder.cpp:
- Removed OutlineIsAuto in favor of matching other RenderStyle properties
using a standard `hasAutoOutlineStyle()` function. This allows it to act
like all the other "auto-functions" for generation.
* Source/WebCore/platform/animation/Animation.h:
- Adds isNameFilled() which always returns false to make it work
work with the generator.
* Source/WebCore/css/CSSProperties.json:
- Add additional fields needed for new generator.
* Source/WebCore/css/scripts/process-css-properties.py:
- Implement new generator.
* Source/WebCore/style/StyleBuilderConverter.h:
- Update names where they needed to be tweaked to work with both generators.
* Source/WebCore/css/scripts/test/TestCSSProperties.json:
*
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/CSSStyleProperties+PropertyNames.idl:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleBuilderGenerated.cpp:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleExtractorGenerated.cpp:
Added.
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleInterpolationWrapperMap.cpp:
- Add new tests and update test results for new generated file.
* Source/WebCore/animation/KeyframeEffect.cpp:
* Source/WebCore/animation/WebAnimation.cpp:
* Source/WebCore/css/CSSComputedStyleDeclaration.cpp:
* Source/WebCore/css/CSSComputedStyleDeclaration.h:
* Source/WebCore/css/CSSCustomPropertyValue.cpp:
* Source/WebCore/css/ShorthandSerializer.cpp:
* Source/WebCore/css/ShorthandSerializer.h:
* Source/WebCore/css/StyleSheetContents.cpp:
* Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:
* Source/WebCore/dom/Element.cpp:
* Source/WebCore/dom/ViewTransition.cpp:
* Source/WebCore/editing/ApplyStyleCommand.cpp:
* Source/WebCore/editing/EditingStyle.cpp:
* Source/WebCore/editing/EditingStyle.h:
* Source/WebCore/editing/ReplaceSelectionCommand.cpp:
* Source/WebCore/editing/cocoa/HTMLConverter.mm:
* Source/WebCore/html/CustomPaintImage.cpp:
* Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp:
* Source/WebCore/rendering/style/StyleFilterImage.cpp:
* Source/WebCore/style/StyleBuilderCustom.h:
* Source/WebCore/style/StyleBuilderGenerated.h:
* Source/WebCore/style/values/images/StyleGradient.cpp:
* Source/WebCore/style/values/scroll-snap/StyleScrollMargin.cpp:
* Source/WebCore/style/values/scroll-snap/StyleScrollMargin.h:
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.cpp:
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.h:
* Source/WebCore/svg/SVGElement.cpp:
* Source/WebCore/svg/properties/SVGPropertyAnimator.h:
- Update for renames.
* Tools/Scripts/webkitpy/style/checkers/jsonchecker.py:
- Update checker for added/removed fields.
Canonical link: https://commits.webkit.org/294902@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes