[webkit-changes] [WebKit/WebKit] f53b8b: Calling StylePropertyMap.set() with a `calc()` end...

Chris Dumez noreply at github.com
Fri Dec 2 10:14:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f53b8be5211fa670849428e727ab301fe42f1720
      https://github.com/WebKit/WebKit/commit/f53b8be5211fa670849428e727ab301fe42f1720
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    A LayoutTests/fast/css/css-typed-om/style-property-map-set-CSSMathSum-value-expected.txt
    A LayoutTests/fast/css/css-typed-om/style-property-map-set-CSSMathSum-value.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/animation-delay-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/baseline-shift-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/bottom-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/center-coordinate-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/coordinate-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/fill-opacity-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flood-opacity-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/left-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/logical-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/margin-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-distance-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/opacity-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/outline-offset-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/right-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-margin-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/shape-image-threshold-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/stop-opacity-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/stroke-dashoffset-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/stroke-opacity-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-thickness-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-indent-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-underline-offset-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/top-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/transition-delay-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/vertical-align-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/word-spacing-expected.txt
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/css/typedom/CSSNumericValue.cpp
    M Source/WebCore/css/typedom/numeric/CSSMathValue.h

  Log Message:
  -----------
  Calling StylePropertyMap.set() with a `calc()` ends up dropping the calc
https://bugs.webkit.org/show_bug.cgi?id=248559

Reviewed by Geoffrey Garen.

When calling StylePropertyMap.set() with a CSSMathValue, we would call
CSSMathValue::toCSSValue() to convert it to a CSSValue. We would expect to get
a CSSCalcValue as a result. However, our implementation was trying to resolve
the `calc()` and would return a CSSPrimitiveValue instead.

* LayoutTests/fast/css/css-typed-om/style-property-map-set-CSSMathSum-value-expected.txt: Added.
* LayoutTests/fast/css/css-typed-om/style-property-map-set-CSSMathSum-value.html: Added.
* Source/WebCore/css/typedom/numeric/CSSMathValue.h:

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




More information about the webkit-changes mailing list