Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f288ba390a623543c6177a84173c9d100bd31421
https://github.com/WebKit/WebKit/commit/f288ba390a623543c6177a84173c9d100bd31421
Author: Sam Weinig <[email protected]>
Date: 2025-10-22 (Wed, 22 Oct 2025)
Changed paths:
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/style/StyleExtractorConverter.h
M Source/WebCore/style/StyleExtractorCustom.h
M Source/WebCore/style/StyleExtractorSerializer.h
M
Source/WebCore/style/values/primitives/StylePrimitiveKeyword+ValueRepresentationNeeded.h
Log Message:
-----------
[Style] Deduplicate non-list, non-null returning, custom extractors
https://bugs.webkit.org/show_bug.cgi?id=301068
Reviewed by Antti Koivisto.
Replaces duplicated logic in StyleExtractorCustom due to having
both CSSValue and serialization extractors for each property with
new generic versions that implement both at once. This only currently
works for properties that:
- do not return nullptr / require an empty serialization
- do not use list
- do not call other top level extractor functions
To implement the generic logic, properties specialize `PropertyExtractorAdaptor`
and use the extractCSSValue/extractSerialization helper functions. In
a follow up, the code generator will remove the need for the explicit
use of extractCSSValue/extractSerialization. For logic needed by multiple
properties, "shared adaptors" are used to further adapt the value. For
example, all the margin edge properties use `MarginEdgeSharedAdaptor`.
To allow the cascade aliases `-webkit-ruby-position` and `-webkit-text-combine`
to be de-duplicated, they are converted to custom extractors.
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/style/StyleExtractorConverter.h:
* Source/WebCore/style/StyleExtractorCustom.h:
* Source/WebCore/style/StyleExtractorSerializer.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveKeyword+ValueRepresentationNeeded.h:
Canonical link: https://commits.webkit.org/301997@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications