calc() function and tab-size
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | affected |
People
(Reporter: bugzilla, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
Test
http://www.gtalbot.org/BrowserBugsSection/CSS3Values/calc-numbers-temp.html
Actual result
Firefox 60.5.0 ESR and Firefox 67.0a1 buildID=20190131093752 fail the 10 tab-size sub-tests.
Notes
- Chromium 71.0.3578.80 passes the 10 tab-size sub-tests.
- Epiphany passes 9 tab-size sub-tests out of 10.
- The original test is
- I searched for a duplicate bug report and did not find any.
- I use Linux Debian 9.7 , 64bits.
| Reporter | ||
Comment 1•7 years ago
|
||
That's Epiphany version 3.22.7 (WebKit 2.18.6).
Comment 2•7 years ago
|
||
We don't support unprefixed tab-size, apparently. Using -moz-tab-size the tests should pass, so this is not related to calc() at all.
Jonathan, any reason to not unprefix -moz-tab-size?
Comment 3•7 years ago
|
||
That's bug 737785, see discussion there for current status.
| Reporter | ||
Comment 4•7 years ago
|
||
We don't support unprefixed tab-size,
I totally miss the prefix thing.
apparently. Using
-moz-tab-sizethe tests should pass,
The -moz-tab-size: calc(2 * -4) sub-test fails in
http://www.gtalbot.org/BrowserBugsSection/CSS3Values/calc-numbers-temp-with-moz.html
Comment 5•7 years ago
|
||
I think that test is wrong. Per https://drafts.csswg.org/css-values/#calc-range:
Parse-time range-checking of values is not performed within math functions, and therefore out-of-range values do not cause the declaration to become invalid. However, the value resulting from an expression must be clamped to the range allowed in the target context. Clamping is performed on computed values to the extent possible, and also on used values if computation was unable to sufficiently simplify the expression to allow range-checking. (Clamping is not performed on specified values.)
Which means that calc(2 * -4) should not be invalid, and should compute to 0.
| Reporter | ||
Comment 6•7 years ago
|
||
Good catch, Emilio! I missed that too!
Now, I need to edit the test to take into account this important piece of information.
Comment 7•7 years ago
|
||
Ok, great, thanks! :)
So then I think there's nothing style-system-related to fix here. Just unprefixing -moz-tab-size which is bug 737785.
Description
•