Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 17ba481400a9fdbb8e35184f2fcbffc58ce51cad
https://github.com/WebKit/WebKit/commit/17ba481400a9fdbb8e35184f2fcbffc58ce51cad
Author: Sam Weinig <[email protected]>
Date: 2026-06-17 (Wed, 17 Jun 2026)
Changed paths:
M Source/WebCore/css/scripts/process-css-properties.py
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties.h
Log Message:
-----------
Refactor Style::ComputedStyleProperties generation
https://bugs.webkit.org/show_bug.cgi?id=317100
Reviewed by Antti Koivisto.
Refactors the generation of Style::ComputedStyleProperties to make it easier to
move
around the various different functions each property or logical property group
might
need. Specifically, each function prototype now has its own class which knows
all the
defaults about it including:
- its signature
- its dependencies (what files need to be included for the definition to
compile)
- if it should be inline or not (so that we know if its definition should be
inline in a header, or if it can be in the cpp file)
This will let us move these functions around more easily going forward, allowing
experimentation with out-of-lining more of them easier.
The change includes support for fine-grained includes for each function type,
but
in this refactor, they are not used. This means we need now have a hardcoded
mapping of the computed style container path components to filenames. This is
necessary because CSSProperties.json only includes the variable names like:
"computed-style-storage-path": ["m_nonInheritedData", "miscData"]
so a mapping from something like "miscData" to "StyleNonInheritedMiscData.h" is
needed. In the future, we should consider making the filenames match a strict
pattern or find a way to encode this mapping directly in CSSProperties.json.
Additional mappings were needed for getting the filenames for some values of
the "computed-style-type" key. The majority of types were mappable by removing
the in "::" string and adding a .h (e.g. Style::Color maps to StyleColor.h)
but a few special cases were needed. These should be resolved in the future
by adding files for all the special cases.
The one small change to the test output is due to a more consistent ordering
of logical property group getters.
* Source/WebCore/css/scripts/process-css-properties.py:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties.h:
Canonical link: https://commits.webkit.org/315378@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications