[webkit-changes] [WebKit/WebKit] b95f33: Factor out gradient code out into strongly typed C...
Sam Weinig
noreply at github.com
Fri Oct 11 14:07:39 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b95f33ec7bcec3053fe9f27e1872644e8db12bfd
https://github.com/WebKit/WebKit/commit/b95f33ec7bcec3053fe9f27e1872644e8db12bfd
Author: Sam Weinig <sam at webkit.org>
Date: 2024-10-11 (Fri, 11 Oct 2024)
Changed paths:
M Source/WTF/wtf/StdLibExtras.h
M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSFontFaceSet.cpp
M Source/WebCore/css/CSSGradientValue.cpp
M Source/WebCore/css/CSSGradientValue.h
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSValue.cpp
M Source/WebCore/css/CSSValue.h
A Source/WebCore/css/ComputedStyleDependencies.h
M Source/WebCore/css/calc/CSSCalcTree+ComputedStyleDependencies.cpp
M Source/WebCore/css/color/CSSAbsoluteColorResolver.h
M Source/WebCore/css/color/CSSRelativeColorResolver.h
M Source/WebCore/css/color/CSSUnresolvedColorMix.cpp
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp
A Source/WebCore/css/values/CSSGradient.cpp
A Source/WebCore/css/values/CSSGradient.h
M Source/WebCore/css/values/CSSPosition.cpp
M Source/WebCore/css/values/CSSPosition.h
A Source/WebCore/css/values/CSSPrimitiveNumericTypes+CSSValueVisitation.h
M Source/WebCore/css/values/CSSPrimitiveNumericTypes+ComputedStyleDependencies.cpp
M Source/WebCore/css/values/CSSPrimitiveNumericTypes+ComputedStyleDependencies.h
M Source/WebCore/css/values/CSSPrimitiveNumericTypes+EvaluateCalc.h
M Source/WebCore/css/values/CSSPrimitiveNumericTypes+Serialization.cpp
M Source/WebCore/css/values/CSSPrimitiveNumericTypes+Serialization.h
M Source/WebCore/css/values/CSSPrimitiveNumericTypes.h
M Source/WebCore/css/values/CSSUnevaluatedCalc.h
M Source/WebCore/css/values/CSSValueTypes.h
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/rendering/style/StyleGradientImage.cpp
M Source/WebCore/rendering/style/StyleGradientImage.h
M Source/WebCore/style/CustomPropertyRegistry.cpp
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/StyleBuilder.cpp
M Source/WebCore/style/StyleResolveForFont.cpp
A Source/WebCore/style/values/StyleGradient.cpp
A Source/WebCore/style/values/StyleGradient.h
M Source/WebCore/style/values/StylePosition.cpp
M Source/WebCore/style/values/StylePosition.h
M Source/WebCore/style/values/StylePrimitiveNumericTypes+Conversions.cpp
M Source/WebCore/style/values/StylePrimitiveNumericTypes+Conversions.h
M Source/WebCore/style/values/StyleValueTypes.h
Log Message:
-----------
Factor out gradient code out into strongly typed CSS/Style values
https://bugs.webkit.org/show_bug.cgi?id=280901
Reviewed by Darin Adler.
Factors CSS and Style gradient code into their own top level types,
retaining the existing CSSGradient*Value and StyleGradientImage types
as thin wrappers.
Transitions overload based customization points use for CSS/Style type
operations to instead use template specialization based customization
points. This allows for either to understand error messages and does not
require ADL wizardry to get right. It also allows us to separate the
signature of the customization point from the signature of the call that
invokes the customization point, making it easier for default values.
To reduce duplicate code, default implementations of some of the customization
points (VisitCSSValueChildren, ComputedStyleDependenciesCollector, conversions)
have default implementations for "tuple-like" types (those that implement the
"tuple-like" pseudo protocol). For the conversions, an additional step of
defining the mapping between the types is needed and a helper macro is provided.
* Source/WTF/wtf/StdLibExtras.h:
Add concept for "tuple-like".
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
- Add files.
* Source/WebCore/css/CSSFontFaceSet.cpp:
* Source/WebCore/css/CSSGradientValue.cpp:
* Source/WebCore/css/CSSGradientValue.h:
* Source/WebCore/css/color/CSSAbsoluteColorResolver.h:
* Source/WebCore/css/color/CSSUnresolvedColorMix.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp:
* Source/WebCore/css/values/CSSGradient.cpp: Added.
* Source/WebCore/css/values/CSSGradient.h: Added.
* Source/WebCore/css/values/CSSPosition.cpp:
* Source/WebCore/css/values/CSSPosition.h:
* Source/WebCore/css/values/CSSPrimitiveNumericTypes+CSSValueVisitation.h: Added.
* Source/WebCore/css/values/CSSPrimitiveNumericTypes+ComputedStyleDependencies.cpp:
* Source/WebCore/css/values/CSSPrimitiveNumericTypes+ComputedStyleDependencies.h:
* Source/WebCore/css/values/CSSPrimitiveNumericTypes+Serialization.cpp:
* Source/WebCore/css/values/CSSPrimitiveNumericTypes+Serialization.h:
* Source/WebCore/css/values/CSSPrimitiveNumericTypes.h:
* Source/WebCore/css/values/CSSUnevaluatedCalc.h:
* Source/WebCore/css/values/CSSValueTypes.h:
* Source/WebCore/html/HTMLInputElement.cpp:
* Source/WebCore/rendering/style/StyleGradientImage.cpp:
* Source/WebCore/rendering/style/StyleGradientImage.h:
* Source/WebCore/style/StyleResolveForFont.cpp:
* Source/WebCore/style/values/StyleGradient.cpp: Added.
* Source/WebCore/style/values/StyleGradient.h: Added.
* Source/WebCore/style/values/StylePosition.cpp:
* Source/WebCore/style/values/StylePosition.h:
* Source/WebCore/style/values/StylePrimitiveNumericTypes+Conversions.cpp:
* Source/WebCore/style/values/StylePrimitiveNumericTypes+Conversions.h:
* Source/WebCore/style/values/StyleValueTypes.h:
Canonical link: https://commits.webkit.org/285038@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list