This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
[CSS Math Functions] Correct mod() evaluation
https://bugs.webkit.org/show_bug.cgi?id=259690 rdar://113213059 Reviewed by Simon Fraser. According to https://drafts.csswg.org/css-values/#round-func : Their behavior diverges if the A value and the B step are on opposite sides of zero: mod() (short for “modulus”) continues to choose the integer multiple of B that puts the value between zero and B, as above (guaranteeing that the result will either be zero or share the sign of B, not A), while rem() (short for "remainder") chooses the integer multiple of B that puts the value between zero and -B, avoiding changing the sign of the value. * LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt: * Source/WebCore/platform/calc/CalcOperator.h: (WebCore::evaluateCalcExpression): Canonical link: https://commits.webkit.org/266485@main
- Loading branch information
Showing 2 changed files with 12 additions and 5 deletions.