[webkit-changes] [WebKit/WebKit] bad39b: Migrate CSS/Style value types off of CSSUnitType a...
Sam Weinig
noreply at github.com
Sun Jan 5 10:50:22 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bad39b1ccef9ee059c6f045f2efd81796fddb896
https://github.com/WebKit/WebKit/commit/bad39b1ccef9ee059c6f045f2efd81796fddb896
Author: Sam Weinig <sam at webkit.org>
Date: 2025-01-05 (Sun, 05 Jan 2025)
Changed paths:
M Source/WTF/wtf/CompactVariantOperations.h
M Source/WTF/wtf/StdLibExtras.h
M Source/WTF/wtf/VariantExtras.h
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSGradientValue.cpp
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSPrimitiveValue.h
M Source/WebCore/css/calc/CSSCalcTree+CalculationValue.cpp
M Source/WebCore/css/calc/CSSCalcTree+ComputedStyleDependencies.cpp
M Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp
M Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp
M Source/WebCore/css/calc/CSSCalcValue.cpp
M Source/WebCore/css/parser/CSSParserFastPaths.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+AngleDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+AnglePercentageDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+CSSPrimitiveValueResolver.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+FlexDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+FrequencyDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+IntegerDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentageDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaConsumer.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaConsumerDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+NumberDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+PercentageDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+ResolutionDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Shapes.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+TimeDefinitions.h
M Source/WebCore/css/parser/SizesAttributeParser.cpp
M Source/WebCore/css/parser/SizesAttributeParser.h
M Source/WebCore/css/parser/SizesCalcParser.cpp
M Source/WebCore/css/values/CSSValueAggregates.h
A Source/WebCore/css/values/CSSValueConcepts.h
M Source/WebCore/css/values/CSSValueTypes.h
M Source/WebCore/css/values/backgrounds/CSSBorderRadius.cpp
M Source/WebCore/css/values/backgrounds/CSSBorderRadius.h
M Source/WebCore/css/values/color/CSSColorConversion+Normalize.h
M Source/WebCore/css/values/color/CSSColorDescriptors.h
M Source/WebCore/css/values/filter-effects/CSSFilterFunctionDescriptor.h
M Source/WebCore/css/values/images/CSSGradient.cpp
M Source/WebCore/css/values/primitives/CSSPosition.cpp
M Source/WebCore/css/values/primitives/CSSPosition.h
A Source/WebCore/css/values/primitives/CSSPrimitiveNumericConcepts.h
A Source/WebCore/css/values/primitives/CSSPrimitiveNumericRaw.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+CSSValueCreation.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+CSSValueVisitation.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.cpp
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+ComputedStyleDependencies.cpp
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+ComputedStyleDependencies.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+EvaluateCalc.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Serialization.cpp
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Serialization.h
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+SymbolReplacement.h
R Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.cpp
M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.h
A Source/WebCore/css/values/primitives/CSSPrimitiveNumericUnits.cpp
A Source/WebCore/css/values/primitives/CSSPrimitiveNumericUnits.h
M Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.h
M Source/WebCore/css/values/shapes/CSSShapeFunction.cpp
M Source/WebCore/editing/FontAttributeChanges.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/page/PrintContext.cpp
M Source/WebCore/style/MatchedDeclarationsCache.cpp
M Source/WebCore/style/StyleBuilderConverter.h
M Source/WebCore/style/StyleResolveForFont.cpp
M Source/WebCore/style/values/StyleValueTypes.h
M Source/WebCore/style/values/images/StyleGradient.cpp
A Source/WebCore/style/values/primitives/StyleLengthResolution.cpp
A Source/WebCore/style/values/primitives/StyleLengthResolution.h
A Source/WebCore/style/values/primitives/StylePrimitiveNumericConcepts.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Calculation.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.cpp
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Evaluation.h
R Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Logging.cpp
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Logging.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes.h
M Source/WebCore/style/values/primitives/StyleUnevaluatedCalculation.h
Log Message:
-----------
Migrate CSS/Style value types off of CSSUnitType and onto type specific unit enums
https://bugs.webkit.org/show_bug.cgi?id=285269
Reviewed by Darin Adler.
Replaces use of CSSUnitType in the CSS/Style value types with
type specific unit enums (e.g. LengthUnit, AngleUnit, etc.)
This presents a good opportunity to start moving functionality
out of CSSPrimitiveValue.h/cpp. Here we move number and unit
serialization and length resolution out.
The use of type specific unit enums also means we can make
some initialization patterns a bit cleaner by avoid nested
type initialization for numeric types in most cases.
With unit types in place, we also now have literal syntax
for any CSS numeric value. For example, `50px` is:
50_css_px
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSGradientValue.cpp:
* Source/WebCore/css/CSSPrimitiveValue.cpp:
* Source/WebCore/css/CSSPrimitiveValue.h:
* Source/WebCore/css/calc/CSSCalcTree+CalculationValue.cpp:
* Source/WebCore/css/calc/CSSCalcTree+ComputedStyleDependencies.cpp:
* Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp:
* Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp:
* Source/WebCore/css/calc/CSSCalcValue.cpp:
* Source/WebCore/css/parser/CSSParserFastPaths.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+AngleDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+AnglePercentageDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+CSSPrimitiveValueResolver.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+FlexDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+FrequencyDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+IntegerDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentageDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaConsumerDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+NumberDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+PercentageDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+ResolutionDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Shapes.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+TimeDefinitions.h:
* Source/WebCore/css/parser/SizesAttributeParser.cpp:
* Source/WebCore/css/parser/SizesAttributeParser.h:
* Source/WebCore/css/parser/SizesCalcParser.cpp:
* Source/WebCore/css/values/backgrounds/CSSBorderRadius.cpp:
* Source/WebCore/css/values/backgrounds/CSSBorderRadius.h:
* Source/WebCore/css/values/color/CSSColorConversion+Normalize.h:
* Source/WebCore/css/values/color/CSSColorConversion+ToTypedColor.h:
* Source/WebCore/css/values/color/CSSColorDescriptors.h:
* Source/WebCore/css/values/filter-effects/CSSFilterFunctionDescriptor.h:
* Source/WebCore/css/values/images/CSSGradient.cpp:
* Source/WebCore/css/values/primitives/CSSPosition.cpp:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericConcepts.h: Added.
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericRaw.h: Added.
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+CSSValueCreation.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.cpp:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+ComputedStyleDependencies.cpp:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+ComputedStyleDependencies.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Serialization.cpp:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Serialization.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+SymbolReplacement.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.cpp: Removed.
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericUnits.cpp: Added.
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericUnits.h: Added.
* Source/WebCore/css/values/shapes/CSSShapeFunction.cpp:
* Source/WebCore/editing/FontAttributeChanges.cpp:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
* Source/WebCore/page/PrintContext.cpp:
* Source/WebCore/style/MatchedDeclarationsCache.cpp:
* Source/WebCore/style/StyleResolveForFont.cpp:
* Source/WebCore/style/values/images/StyleGradient.cpp:
* Source/WebCore/style/values/primitives/StyleLengthResolution.cpp: Added.
* Source/WebCore/style/values/primitives/StyleLengthResolution.h: Added.
* Source/WebCore/style/values/primitives/StylePrimitiveNumericConcepts.h: Added.
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.cpp:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Evaluation.h:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Logging.h:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes.h:
Canonical link: https://commits.webkit.org/288446@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