Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ffd54a4cd72465e4df689b2fe66b82d01bde9048
      
https://github.com/WebKit/WebKit/commit/ffd54a4cd72465e4df689b2fe66b82d01bde9048
  Author: Sam Weinig <[email protected]>
  Date:   2024-12-18 (Wed, 18 Dec 2024)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/CSSPrimitiveValue.cpp
    M Source/WebCore/css/calc/CSSCalcValue.cpp
    M Source/WebCore/css/calc/CSSCalcValue.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Angle.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+AnglePercentage.cpp
    R 
Source/WebCore/css/parser/CSSPropertyParserConsumer+CSSPrimitiveValueResolver.cpp
    M 
Source/WebCore/css/parser/CSSPropertyParserConsumer+CSSPrimitiveValueResolver.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Integer.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Length.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentage.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaResolver.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Number.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Percentage.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Resolution.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Time.cpp
    A Source/WebCore/css/values/CSSNoConversionDataRequiredToken.h
    M Source/WebCore/css/values/color/CSSAbsoluteColor.h
    M Source/WebCore/css/values/color/CSSAbsoluteColorResolver.h
    M Source/WebCore/css/values/color/CSSColorDescriptors.h
    M Source/WebCore/css/values/color/CSSRelativeColor.h
    M Source/WebCore/css/values/color/CSSRelativeColorResolver.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+EvaluateCalc.h
    M Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.cpp
    M Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.h
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/values/StyleValueTypes.h
    M Source/WebCore/style/values/backgrounds/StyleBorderRadius.cpp
    M Source/WebCore/style/values/backgrounds/StyleBorderRadius.h
    M Source/WebCore/style/values/backgrounds/StyleBoxShadow.cpp
    M Source/WebCore/style/values/backgrounds/StyleBoxShadow.h
    M Source/WebCore/style/values/color/StyleColor.cpp
    M Source/WebCore/style/values/color/StyleColor.h
    M Source/WebCore/style/values/images/StyleGradient.cpp
    M Source/WebCore/style/values/images/StyleGradient.h
    M Source/WebCore/style/values/primitives/StyleNone.h
    M Source/WebCore/style/values/primitives/StylePosition.cpp
    M Source/WebCore/style/values/primitives/StylePosition.h
    M 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h
    M Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes.h
    M Source/WebCore/style/values/shapes/StyleBasicShape.cpp
    M Source/WebCore/style/values/shapes/StyleBasicShape.h
    M Source/WebCore/style/values/shapes/StylePathFunction.cpp
    M Source/WebCore/style/values/shapes/StylePathFunction.h
    M Source/WebCore/style/values/shapes/StyleRectFunction.cpp
    M Source/WebCore/style/values/shapes/StyleRectFunction.h
    M Source/WebCore/style/values/shapes/StyleXywhFunction.cpp
    M Source/WebCore/style/values/shapes/StyleXywhFunction.h
    M Source/WebCore/style/values/text-decoration/StyleTextShadow.cpp
    M Source/WebCore/style/values/text-decoration/StyleTextShadow.h

  Log Message:
  -----------
  Generalize arguments in ToStyle<> interface functions
https://bugs.webkit.org/show_bug.cgi?id=284796

Reviewed by Darin Adler.

Now that Color has been incorporated into the new value type system, it is
clear the symbol table is not needed generally, and is confined to a very
specific pattern. This means that most specializations of the ToStyle<>
interface don't need to include CSSCalcSymbolTable.

Removing CSSCalcSymbolTable from the specializations highlighted a further
simplification for the generic partial specializations, namely, that we
can usually just implement a single overload and use a variadic parameter
pack to forward any additional arguments on. The only real obstacle was
the lack of an overload of Style::toStyle() that took a 
`NoConversionDataRequiredToken`,
which was easily added. By continuing the pattern of using the token to
indicate "no conversion data" the numeric primitives were dramatically
simplified as well.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSPrimitiveValue.cpp:
* Source/WebCore/css/calc/CSSCalcValue.cpp:
* Source/WebCore/css/calc/CSSCalcValue.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Angle.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+AnglePercentage.cpp:
* 
Source/WebCore/css/parser/CSSPropertyParserConsumer+CSSPrimitiveValueResolver.cpp:
* 
Source/WebCore/css/parser/CSSPropertyParserConsumer+CSSPrimitiveValueResolver.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Integer.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Length.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentage.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaResolver.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Number.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Percentage.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Resolution.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Time.cpp:
* Source/WebCore/css/values/CSSNoConversionDataRequiredToken.h: Added.
* Source/WebCore/css/values/color/CSSRelativeColorResolver.h:
* 
Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.cpp:
* 
Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+Canonicalization.h:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericTypes+EvaluateCalc.h:
* Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.cpp:
* Source/WebCore/style/values/StyleValueTypes.h:
* Source/WebCore/style/values/backgrounds/StyleBorderRadius.cpp:
* Source/WebCore/style/values/backgrounds/StyleBorderRadius.h:
* Source/WebCore/style/values/backgrounds/StyleBoxShadow.cpp:
* Source/WebCore/style/values/backgrounds/StyleBoxShadow.h:
* Source/WebCore/style/values/color/StyleColor.cpp:
* Source/WebCore/style/values/color/StyleColor.h:
* Source/WebCore/style/values/images/StyleGradient.cpp:
* Source/WebCore/style/values/images/StyleGradient.h:
* Source/WebCore/style/values/primitives/StyleNone.h:
* Source/WebCore/style/values/primitives/StylePosition.cpp:
* Source/WebCore/style/values/primitives/StylePosition.h:
* 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes.h:
* Source/WebCore/style/values/shapes/StyleBasicShape.cpp:
* Source/WebCore/style/values/shapes/StyleBasicShape.h:
* Source/WebCore/style/values/shapes/StylePathFunction.cpp:
* Source/WebCore/style/values/shapes/StylePathFunction.h:
* Source/WebCore/style/values/shapes/StyleRectFunction.cpp:
* Source/WebCore/style/values/shapes/StyleRectFunction.h:
* Source/WebCore/style/values/shapes/StyleXywhFunction.cpp:
* Source/WebCore/style/values/shapes/StyleXywhFunction.h:
* Source/WebCore/style/values/text-decoration/StyleTextShadow.cpp:
* Source/WebCore/style/values/text-decoration/StyleTextShadow.h:

Canonical link: https://commits.webkit.org/288005@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