Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0cc0ee17c5bd07f5621236b66ac7df2bc5fb728a
https://github.com/WebKit/WebKit/commit/0cc0ee17c5bd07f5621236b66ac7df2bc5fb728a
Author: Sam Weinig <[email protected]>
Date: 2026-06-14 (Sun, 14 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt
M Source/WebCore/Headers.cmake
M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M
Source/WebCore/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp
M Source/WebCore/animation/ViewTimeline.cpp
M Source/WebCore/css/values/backgrounds/CSSBorderImageWidth.h
M Source/WebCore/css/values/masking/CSSMaskBorderWidth.h
M Source/WebCore/editing/Editor.cpp
M Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLevelBoxInlines.h
M Source/WebCore/layout/integration/LayoutIntegrationBoxGeometryUpdater.cpp
M Source/WebCore/page/IntersectionObserver.cpp
M Source/WebCore/page/IntersectionObserverMarginBox.h
M Source/WebCore/rendering/AutoTableLayout.cpp
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
M Source/WebCore/rendering/PathOperation.cpp
M Source/WebCore/rendering/PositionedLayoutConstraints.h
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderBoxModelObjectInlines.h
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderReplaced.cpp
M Source/WebCore/rendering/RenderScrollbarPart.cpp
M Source/WebCore/rendering/RenderTable.cpp
M Source/WebCore/rendering/RenderTableCell.cpp
M Source/WebCore/rendering/RenderTableCellInlines.h
M Source/WebCore/rendering/RenderTextInlines.h
M Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
M Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StyleExtractorCustom.h
M Source/WebCore/style/StyleInterpolationFunctions.h
M Source/WebCore/style/computed/data/StyleBoxData.cpp
M Source/WebCore/style/values/align/StyleGapGutter.h
M Source/WebCore/style/values/animations/StyleSingleAnimationRange.cpp
M Source/WebCore/style/values/animations/StyleSingleAnimationRange.h
M Source/WebCore/style/values/backgrounds/StyleBackgroundSize.cpp
M Source/WebCore/style/values/backgrounds/StyleBackgroundSize.h
M Source/WebCore/style/values/backgrounds/StyleBorderImageWidth.cpp
M Source/WebCore/style/values/backgrounds/StyleBorderImageWidth.h
M Source/WebCore/style/values/box/StyleMargin.h
M Source/WebCore/style/values/box/StylePadding.h
M Source/WebCore/style/values/fill-stroke/StyleStrokeWidth.cpp
M Source/WebCore/style/values/fill-stroke/StyleStrokeWidth.h
M Source/WebCore/style/values/flexbox/StyleFlexBasis.h
M Source/WebCore/style/values/grid/StyleFlowTolerance.h
M Source/WebCore/style/values/grid/StyleGridTrackBreadth.cpp
M Source/WebCore/style/values/grid/StyleGridTrackBreadth.h
M Source/WebCore/style/values/grid/StyleGridTrackSize.cpp
M Source/WebCore/style/values/grid/StyleGridTrackSize.h
M Source/WebCore/style/values/images/StyleGradient.cpp
M Source/WebCore/style/values/inline/StyleLineHeight.cpp
M Source/WebCore/style/values/inline/StyleLineHeight.h
M Source/WebCore/style/values/inline/StyleVerticalAlign.cpp
M Source/WebCore/style/values/inline/StyleVerticalAlign.h
M Source/WebCore/style/values/masking/StyleMaskBorderWidth.cpp
M Source/WebCore/style/values/masking/StyleMaskBorderWidth.h
M Source/WebCore/style/values/motion/StyleOffsetAnchor.cpp
A Source/WebCore/style/values/motion/StyleOffsetDistance.cpp
M Source/WebCore/style/values/motion/StyleOffsetDistance.h
M Source/WebCore/style/values/motion/StyleOffsetPosition.cpp
M Source/WebCore/style/values/non-standard/StyleWebKitBoxReflect.cpp
M Source/WebCore/style/values/non-standard/StyleWebKitBoxReflect.h
M Source/WebCore/style/values/non-standard/StyleWebKitMarqueeIncrement.h
M Source/WebCore/style/values/position/StyleInset.h
R Source/WebCore/style/values/primitives/StyleLengthWrapper+Blending.h
R
Source/WebCore/style/values/primitives/StyleLengthWrapper+CSSValueConversion.h
R
Source/WebCore/style/values/primitives/StyleLengthWrapper+DeprecatedCSSValueConversion.h
R Source/WebCore/style/values/primitives/StyleLengthWrapper.h
R Source/WebCore/style/values/primitives/StyleLengthWrapperData.cpp
R Source/WebCore/style/values/primitives/StyleLengthWrapperData.h
M Source/WebCore/style/values/primitives/StylePosition.h
A Source/WebCore/style/values/primitives/StylePrimitiveData.cpp
A Source/WebCore/style/values/primitives/StylePrimitiveData.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumeric.h
A
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+Blending.h
A
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+CSSValueConversion.h
R
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+Conversions.h
A
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+DeprecatedCSSValueConversion.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword.h
M
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h
M
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h
M
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+DeprecatedCSSValueConversion.h
M
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+DeprecatedConversions.h
M
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Evaluation.h
A
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+EvaluationMinimum.h
M Source/WebCore/style/values/scroll-animations/StyleViewFunction.cpp
M
Source/WebCore/style/values/scroll-animations/StyleViewTimelineInsetItem.cpp
M Source/WebCore/style/values/scroll-animations/StyleViewTimelineInsetItem.h
M Source/WebCore/style/values/scroll-snap/StyleScrollPadding.h
M Source/WebCore/style/values/shapes/StyleCircleFunction.cpp
M Source/WebCore/style/values/shapes/StyleEllipseFunction.cpp
M Source/WebCore/style/values/shapes/StyleShapeFunction.cpp
M Source/WebCore/style/values/shapes/StyleShapeImageThreshold.h
M Source/WebCore/style/values/shapes/StyleShapeMargin.h
M Source/WebCore/style/values/sizing/StyleMaximumSize.h
M Source/WebCore/style/values/sizing/StyleMinimumSize.h
M Source/WebCore/style/values/sizing/StylePreferredSize.h
M Source/WebCore/style/values/svg/StyleSVGBaselineShift.cpp
M Source/WebCore/style/values/svg/StyleSVGBaselineShift.h
M Source/WebCore/style/values/svg/StyleSVGCenterCoordinateComponent.h
M Source/WebCore/style/values/svg/StyleSVGCoordinateComponent.h
M Source/WebCore/style/values/svg/StyleSVGRadius.h
M Source/WebCore/style/values/svg/StyleSVGRadiusComponent.h
M Source/WebCore/style/values/svg/StyleSVGStrokeDasharray.cpp
M Source/WebCore/style/values/svg/StyleSVGStrokeDasharray.h
M Source/WebCore/style/values/svg/StyleSVGStrokeDashoffset.cpp
M Source/WebCore/style/values/svg/StyleSVGStrokeDashoffset.h
M
Source/WebCore/style/values/text-decoration/StyleTextDecorationThickness.cpp
M Source/WebCore/style/values/text-decoration/StyleTextDecorationThickness.h
M Source/WebCore/style/values/text-decoration/StyleTextUnderlineOffset.h
M Source/WebCore/style/values/text/StyleLetterSpacing.cpp
M Source/WebCore/style/values/text/StyleLetterSpacing.h
M Source/WebCore/style/values/text/StyleTabSize.h
M Source/WebCore/style/values/text/StyleTextIndent.cpp
M Source/WebCore/style/values/text/StyleTextIndent.h
M Source/WebCore/style/values/text/StyleWordSpacing.cpp
M Source/WebCore/style/values/text/StyleWordSpacing.h
M Source/WebCore/style/values/transforms/StyleTransformFunction.cpp
M Source/WebCore/style/values/transforms/StyleTranslate.cpp
M
Source/WebCore/style/values/transforms/functions/StyleTranslateTransformFunction.cpp
M
Source/WebCore/style/values/transforms/functions/StyleTranslateTransformFunction.h
Log Message:
-----------
[Style] Replace Style::LengthWrapperBase
https://bugs.webkit.org/show_bug.cgi?id=317055
Reviewed by Darin Adler.
Replaces current mechanism for modeling <length-percentage> and
<length-percentage> + keywords,
Style::LengthWrapperBase, with direct usage of Style::LengthPercentage<> and a
new implementation
of Style::PrimitiveNumericOrKeyword.
This new approach means that simple cases, like when a <length-percentage> is
used nested in
a larger type, can use Style::LengthPercentage<> directly, removing the need to
define a
new type. See StyleTextDecorationThickness.h for an example of this.
For slightly more complicated cases, like when the <length-percentage> is the
root type,
and a distinct, forward declarable type is wanted, a new
DEFINE_PRIMITIVE_NUMERIC_TYPE_WRAPPER
macro can be used or the PrimitiveNumericWrapperBase<> type, the macro utilizes
can be used
if more control is needed. See StyleShapeMargin.h for an example of the macro,
and StyleLetterSpacing.h
for an example of using deriving from PrimitiveNumericWrapperBase<> to allow
adding a bespoke
constructor.
For the case of <length-percentage> + keywords, the
Style::PrimitiveNumericOrKeyword<> type
can be used. This identical to the old Style::LengthWrapperBase, but is
positioned to allow
expansion to non-LengthPercentage numeric types in the future. See
StyleMargin.h for an example
of this.
To make this work without any performance change, both
Style::LengthPercentage<> and
Style::PrimitiveNumericOrKeyword<> are implemented using the same underlying
data structure,
Style::PrimitiveData (formerly called Style::LengthWrapperData). Both types
have the same
index encoding for <length-percentage> values (length=0, percentage=1, calc=2),
allowing
for efficient conversion from one to the other. The only difference between the
two types
is that Style::PrimitiveNumericOrKeyword<> uses indices greater than 2 to
represent the
keywords it supports.
There is one test progression caused by a slight difference in the blend
implementations
for LengthPercentage<> and LengthWrapperBase (a missing !to.percentage() check
in the
blendMixedTypes functions). Now there is only a single implementation and it
contains
the missing check.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/ViewTimeline.cpp:
* Source/WebCore/editing/Editor.cpp:
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineLevelBoxInlines.h:
* Source/WebCore/layout/integration/LayoutIntegrationBoxGeometryUpdater.cpp:
* Source/WebCore/page/IntersectionObserver.cpp:
* Source/WebCore/page/IntersectionObserverMarginBox.h:
* Source/WebCore/rendering/AutoTableLayout.cpp:
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
* Source/WebCore/rendering/PathOperation.cpp:
* Source/WebCore/rendering/PositionedLayoutConstraints.h:
* Source/WebCore/rendering/RenderBlock.cpp:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
* Source/WebCore/rendering/RenderBox.cpp:
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
* Source/WebCore/rendering/RenderBoxModelObjectInlines.h:
* Source/WebCore/rendering/RenderLayer.cpp:
* Source/WebCore/rendering/RenderReplaced.cpp:
* Source/WebCore/rendering/RenderScrollbarPart.cpp:
* Source/WebCore/rendering/RenderTable.cpp:
* Source/WebCore/rendering/RenderTableCell.cpp:
* Source/WebCore/rendering/RenderTableCellInlines.h:
* Source/WebCore/rendering/RenderTextInlines.h:
* Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:
* Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp:
* Source/WebCore/style/StyleBuilderCustom.h:
* Source/WebCore/style/StyleExtractorCustom.h:
* Source/WebCore/style/StyleInterpolationFunctions.h:
* Source/WebCore/style/computed/data/StyleBoxData.cpp:
* Source/WebCore/style/values/align/StyleGapGutter.h:
* Source/WebCore/style/values/animations/StyleSingleAnimationRange.cpp:
* Source/WebCore/style/values/animations/StyleSingleAnimationRange.h:
* Source/WebCore/style/values/backgrounds/StyleBackgroundSize.cpp:
* Source/WebCore/style/values/backgrounds/StyleBackgroundSize.h:
* Source/WebCore/style/values/backgrounds/StyleBorderImageWidth.cpp:
* Source/WebCore/style/values/backgrounds/StyleBorderImageWidth.h:
* Source/WebCore/style/values/box/StyleMargin.h:
* Source/WebCore/style/values/box/StylePadding.h:
* Source/WebCore/style/values/fill-stroke/StyleStrokeWidth.cpp:
* Source/WebCore/style/values/fill-stroke/StyleStrokeWidth.h:
* Source/WebCore/style/values/flexbox/StyleFlexBasis.h:
* Source/WebCore/style/values/grid/StyleFlowTolerance.h:
* Source/WebCore/style/values/grid/StyleGridTrackBreadth.cpp:
* Source/WebCore/style/values/grid/StyleGridTrackBreadth.h:
* Source/WebCore/style/values/grid/StyleGridTrackSize.cpp:
* Source/WebCore/style/values/grid/StyleGridTrackSize.h:
* Source/WebCore/style/values/images/StyleGradient.cpp:
* Source/WebCore/style/values/inline/StyleLineHeight.cpp:
* Source/WebCore/style/values/inline/StyleLineHeight.h:
* Source/WebCore/style/values/inline/StyleVerticalAlign.cpp:
* Source/WebCore/style/values/inline/StyleVerticalAlign.h:
* Source/WebCore/style/values/masking/StyleMaskBorderWidth.cpp:
* Source/WebCore/style/values/masking/StyleMaskBorderWidth.h:
* Source/WebCore/style/values/motion/StyleOffsetAnchor.cpp:
* Source/WebCore/style/values/motion/StyleOffsetDistance.cpp: Added.
* Source/WebCore/style/values/motion/StyleOffsetDistance.h:
* Source/WebCore/style/values/motion/StyleOffsetPosition.cpp:
* Source/WebCore/style/values/non-standard/StyleWebKitBoxReflect.cpp:
* Source/WebCore/style/values/non-standard/StyleWebKitBoxReflect.h:
* Source/WebCore/style/values/non-standard/StyleWebKitMarqueeIncrement.h:
* Source/WebCore/style/values/position/StyleInset.h:
* Source/WebCore/style/values/primitives/StyleLengthWrapper.h: Removed.
* Source/WebCore/style/values/primitives/StyleLengthWrapperData.h: Removed.
* Source/WebCore/style/values/primitives/StylePosition.h:
* Source/WebCore/style/values/primitives/StylePrimitiveData.cpp: Renamed from
Source/WebCore/style/values/primitives/StyleLengthWrapperData.cpp.
* Source/WebCore/style/values/primitives/StylePrimitiveData.h: Renamed from
Source/WebCore/style/values/primitives/StyleLengthWrapperData.h.
* Source/WebCore/style/values/primitives/StylePrimitiveNumeric.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+Blending.h:
Renamed from
Source/WebCore/style/values/primitives/StyleLengthWrapper+Blending.h.
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+CSSValueConversion.h:
Renamed from
Source/WebCore/style/values/primitives/StyleLengthWrapper+CSSValueConversion.h.
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+Conversions.h:
Removed.
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword+DeprecatedCSSValueConversion.h:
Renamed from
Source/WebCore/style/values/primitives/StyleLengthWrapper+DeprecatedCSSValueConversion.h.
* Source/WebCore/style/values/primitives/StylePrimitiveNumericOrKeyword.h:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+DeprecatedCSSValueConversion.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+DeprecatedConversions.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Evaluation.h:
*
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+EvaluationMinimum.h:
Added.
* Source/WebCore/style/values/scroll-animations/StyleViewFunction.cpp:
* Source/WebCore/style/values/scroll-animations/StyleViewTimelineInsetItem.cpp:
* Source/WebCore/style/values/scroll-animations/StyleViewTimelineInsetItem.h:
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.h:
* Source/WebCore/style/values/shapes/StyleCircleFunction.cpp:
* Source/WebCore/style/values/shapes/StyleEllipseFunction.cpp:
* Source/WebCore/style/values/shapes/StyleShapeFunction.cpp:
* Source/WebCore/style/values/shapes/StyleShapeImageThreshold.h:
* Source/WebCore/style/values/shapes/StyleShapeMargin.h:
* Source/WebCore/style/values/sizing/StyleMaximumSize.h:
* Source/WebCore/style/values/sizing/StyleMinimumSize.h:
* Source/WebCore/style/values/sizing/StylePreferredSize.h:
* Source/WebCore/style/values/svg/StyleSVGBaselineShift.cpp:
* Source/WebCore/style/values/svg/StyleSVGBaselineShift.h:
* Source/WebCore/style/values/svg/StyleSVGCenterCoordinateComponent.h:
* Source/WebCore/style/values/svg/StyleSVGCoordinateComponent.h:
* Source/WebCore/style/values/svg/StyleSVGRadius.h:
* Source/WebCore/style/values/svg/StyleSVGRadiusComponent.h:
* Source/WebCore/style/values/svg/StyleSVGStrokeDasharray.cpp:
* Source/WebCore/style/values/svg/StyleSVGStrokeDasharray.h:
* Source/WebCore/style/values/svg/StyleSVGStrokeDashoffset.cpp:
* Source/WebCore/style/values/svg/StyleSVGStrokeDashoffset.h:
* Source/WebCore/style/values/text-decoration/StyleTextDecorationThickness.cpp:
* Source/WebCore/style/values/text-decoration/StyleTextDecorationThickness.h:
* Source/WebCore/style/values/text-decoration/StyleTextUnderlineOffset.h:
* Source/WebCore/style/values/text/StyleLetterSpacing.cpp:
* Source/WebCore/style/values/text/StyleLetterSpacing.h:
* Source/WebCore/style/values/text/StyleTabSize.h:
* Source/WebCore/style/values/text/StyleTextIndent.cpp:
* Source/WebCore/style/values/text/StyleTextIndent.h:
* Source/WebCore/style/values/text/StyleWordSpacing.cpp:
* Source/WebCore/style/values/text/StyleWordSpacing.h:
* Source/WebCore/style/values/transforms/StyleTransformFunction.cpp:
* Source/WebCore/style/values/transforms/StyleTranslate.cpp:
*
Source/WebCore/style/values/transforms/functions/StyleTranslateTransformFunction.cpp:
*
Source/WebCore/style/values/transforms/functions/StyleTranslateTransformFunction.h:
Canonical link: https://commits.webkit.org/315191@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications