[webkit-changes] [WebKit/WebKit] c4ae09: [CSS-Typed-OM] Cannot set `z-index` property to -3.14

Chris Dumez noreply at github.com
Thu Dec 22 15:58:32 PST 2022


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

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/background-size-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-weight-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/order-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/z-index-expected.txt
    M Source/WebCore/css/CSSToStyleMap.cpp
    M Source/WebCore/css/calc/CSSCalcValue.cpp
    M Source/WebCore/css/calc/CSSCalcValue.h
    M Source/WebCore/css/typedom/CSSUnitValue.cpp

  Log Message:
  -----------
  [CSS-Typed-OM] Cannot set `z-index` property to -3.14
https://bugs.webkit.org/show_bug.cgi?id=249788

Reviewed by Antti Koivisto.

We couldn't set the `z-index` property to -3.14 using the CSS Typed OM API. We
would expect -3 as computed value, however, WebKit was returning 0.

* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/background-size-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-weight-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/order-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/z-index-expected.txt:
Rebaseline WPT tests now that more checks are passing.

* Source/WebCore/css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationDuration):
Make sure we clamp the duration to [0, inf] to avoid hitting an assertion later
on. We can end up with a negative duration when using calc().

* Source/WebCore/css/calc/CSSCalcValue.h:
Fix confusingly named parameter. It did the exact opposite of that it claimed.

* Source/WebCore/css/typedom/CSSUnitValue.cpp:
(WebCore::CSSUnitValue::toCSSValueWithProperty const):
When we wrap the out of range value in a calc(), make sure we allow negative
values, like we were trying to do (but the parameter's name didn't match the
actual behavior).

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




More information about the webkit-changes mailing list