Closed
Bug 1391120
Opened 7 years ago
Closed 7 years ago
stylo: Calc with negative values on the right side serializes with "+"
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: canova, Assigned: emilio)
References
()
Details
<div style="width: calc(2px - 100%)"></div>
<script>alert(document.querySelector('div').style.width)</script>
This testcase prints "calc(2px + -100%)" on stylo. Both firefox and chrome prints "calc(2px - 100%)". This is not wrong, it is valid calc value, but definitely weird. We should do the same with other browsers here.
Updated•7 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•7 years ago
|
||
Just for the record, this comes from bug 1390496 comment 6.
Updated•7 years ago
|
Priority: P3 → P2
Comment 2•7 years ago
|
||
With the fix in https://github.com/servo/servo/pull/18131 (which has been merged to m-c https://hg.mozilla.org/mozilla-central/rev/c7832d380dce), now the testcase in comment 0 prints "calc(-100% + 2px)" on stylo. Is this difference between stylo and other browsers is expected? If so, then we can resolve this bug.
Flags: needinfo?(emilio+bugs)
Assignee | ||
Comment 3•7 years ago
|
||
Yeah, it's intentional per the issue you linked.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(emilio+bugs)
Resolution: --- → FIXED
Updated•7 years ago
|
Assignee: nobody → emilio+bugs
Updated•7 years ago
|
status-firefox57:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•