[wpt-sync] Sync PR 31153 - Do not calc() range check and clamping at parse time.
Categories
(Core :: Layout: Positioned, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 31153 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/31153
Details from upstream follow.
Joonghun Park <pjh0718@gmail.com> wrote:
Do not calc() range check and clamping at parse time.
According to https://drafts.csswg.org/css-values-4/#calc-range,
we should not do range check and clamping for calc at parse time.The specified value can be a calc which results in a negative values,
and values are clamped to the range allowed in the target context
at used value time(i.e. when building ComputedStyle).So CSSMathFunctionValue doesn't need to have IsInt(), IsNegative(),
and CSSMathExpressionNode doesn't have to keep track of whether its value is an integer.As a result of the change above, we don't IsInt() check at parse time anymore,
so naturally we do the following behavior specified in the spec."Additionally, if a math function that resolves to \<number> is used somewhere
that only accepts \<integer>, the computed value and used value are rounded
to the nearest integer, in the same manner as clamping, above."After this change, serialization of simple calc simplification is regressed,
but it should be addressed by making Blink to comply with the spec,
https://drafts.csswg.org/css-values-4/#calc-simplification.
It will be handled in the bug 1253162.Bug: 982425, 931216
Change-Id: Icacc08a91d346103307d7200eeb94c9ca8554d75
Reviewed-on: https://chromium-review.googlesource.com/3199156
WPT-Export-Revision: a75815c48ec5a1521c169d4afd1543fd1f78050b
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
| Assignee | ||
Comment 3•4 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 4 subtests
Status Summary
Firefox
OK : 1
PASS: 4
Chrome
OK : 1
PASS: 4
Safari
OK : 1
PASS: 4
Links
Comment 5•4 years ago
|
||
| bugherder | ||
Description
•