[webkit-changes] [WebKit/WebKit] 98b6a2: [css-values] Rounding of <integer> type should rou...

Tim Nguyen noreply at github.com
Sun Aug 27 22:28:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98b6a2103ec09522e2ff5b3f5264355b8ee1dad8
      https://github.com/WebKit/WebKit/commit/98b6a2103ec09522e2ff5b3f5264355b8ee1dad8
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-z-index-fractions-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-z-index-fractions-001.html
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp

  Log Message:
  -----------
  [css-values] Rounding of <integer> type should round half towards positive infinity
https://bugs.webkit.org/show_bug.cgi?id=260777
rdar://114532926

Reviewed by Darin Adler.

https://drafts.csswg.org/css-values-4/#integers
Rounding to the nearest integer requires rounding in the direction of +∞ when the fractional portion is exactly 0.5.

-1.5 should round to -1, not -2.

* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-z-index-fractions-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-z-index-fractions-001.html:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::IntegerTypeRawKnownTokenTypeFunctionConsumer::consume):

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




More information about the webkit-changes mailing list