Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0f32a7fa58d1fb4afe1652fe4ecd0f99fe8c84c8
      
https://github.com/WebKit/WebKit/commit/0f32a7fa58d1fb4afe1652fe4ecd0f99fe8c84c8
  Author: Sam Weinig <[email protected]>
  Date:   2024-11-24 (Sun, 24 Nov 2024)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+AngleDefinitions.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+FrequencyDefinitions.h
    M 
Source/WebCore/css/parser/CSSPropertyParserConsumer+ResolutionDefinitions.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+TimeDefinitions.h
    M Source/WebCore/css/values/CSSValueTypes.h
    M Source/WebCore/css/values/primitives/CSSPrimitiveNumericRange.h
    A 
Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.cpp
    A 
Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.h
    M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.cpp
    M Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.h
    M Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.cpp
    M Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.h
    M Source/WebCore/rendering/shapes/LayoutShape.cpp
    M Source/WebCore/style/values/images/StyleGradient.cpp
    M 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h
    A 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Calculation.h
    M 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h
    M 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Evaluation.h
    M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes.h
    M Source/WebCore/style/values/shapes/StyleShapeFunction.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Update Style numeric types to use double everywhere except Length
https://bugs.webkit.org/show_bug.cgi?id=283572

Reviewed by Darin Adler.

In preparation for moving transform to the new CSS/Style value types system,
update Style numeric types to use double everywhere except Length, which is
the most common expectation.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    - Add new files.

* Source/WebCore/css/parser/CSSPropertyParserConsumer+AngleDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+FrequencyDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+ResolutionDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+TimeDefinitions.h:
    - Call new canonicalization functions.

* Source/WebCore/css/values/CSSValueTypes.h:
    - Add non-accumulating collectComputedStyleDependencies() function that just
      returns the final result.

* Source/WebCore/css/values/primitives/CSSPrimitiveNumericRange.h:
    - Fix clamp to maintain the same input and output types. Previously, it was 
always
      returning float.

* 
Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.cpp:
 Added.
* 
Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.h:
 Added.
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.cpp:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes.h:
    - Move all raw canonicalization functions to a shared set of files. 
Currently these mostly
      delegate to CSSPrimitiveValue, but eventually that relationship will be 
flipped.

* Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.cpp:
* Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.h:
    - Remove any eager precision narrowing done here. Let callers narrow only 
if needed.

* Source/WebCore/rendering/shapes/LayoutShape.cpp:
    - Add explicit `float` type to make overload resolution happy.

* Source/WebCore/style/values/images/StyleGradient.cpp:
    - Add explicit precision narrowing for radii.

* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h:
    - Use functions on LengthPercentage<> rather than using the internal 
representation directly.

* 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Calculation.h:
 Added.
    - Move overloaded Calculation copying to its own file.

* 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h:
    - Move typed canonicalization here from StylePrimitiveNumericTypes.h
    - Add specialization of conversion operators for Length to handle zoom 
adjustments correctly,
      previously this was only happening for LengthPercentage which was the 
only kind of Length
      being exercised.

* 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Evaluation.h:
    - Add overloads for evaluation to double.

* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes.h:
    - Use double value types for all the primitives except Length.
    - Remove quirk bit from Length. This is only needed for margin values, and 
they
      will be handled separately.
    - Merge AnglePercentageValue and LengthPercentageValue into generic 
`PrimitiveDimensionPercentage`
      type that works for both.

* Source/WebCore/style/values/shapes/StyleShapeFunction.cpp:
    - Add explicit precision narrowing.

* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    - Update primitive value types to double where needed.

Canonical link: https://commits.webkit.org/287032@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to