-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-values] Rounding of <integer> type should round half towards pos…
…itive 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
- Loading branch information
Showing
3 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
...ts/imported/w3c/web-platform-tests/css/css-values/calc-z-index-fractions-001-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
|
||
PASS testing z-index: calc(2.5 / 2) | ||
PASS testing z-index: calc(3 / 2) | ||
FAIL testing z-index: calc(-3 / 2) assert_equals: expected "-1" but got "-2" | ||
PASS testing z-index: calc(3.5 / 2) | ||
PASS testing z-index: calc(-2.5 / 2) | ||
PASS testing z-index: calc(-3 / 2) | ||
PASS testing z-index: calc(-3.5 / 2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters