Closed
Bug 1396045
Opened 8 years ago
Closed 8 years ago
stylo: Round down when dealing with relative units
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: manishearth, Assigned: manishearth)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
./layout/reftests/pixel-rounding/viewport-units-rounding-1.html
Gecko rounds viewport units downwards in case someone does something like five adjacent elements of width 20vw and it overflows. We should do the same.
| Assignee | ||
Updated•8 years ago
|
Blocks: stylo-reftest
Updated•8 years ago
|
Priority: -- → P2
| Assignee | ||
Comment 1•8 years ago
|
||
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8903811 [details]
Bug 1396045 - stylo: Update app_units ;
https://reviewboard.mozilla.org/r/175566/#review180666
Attachment #8903811 -
Flags: review?(emilio) → review+
Comment 5•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8903812 [details]
Bug 1396045 - stylo: Round down when computing viewport units;
https://reviewboard.mozilla.org/r/175568/#review180668
r=me, assuming it's tested.
::: servo/components/style/values/specified/length.rs:216
(Diff revision 1)
> ViewportPercentageLength::Vmin(length) =>
> - length * to_unit!(cmp::min(viewport_size.width, viewport_size.height)),
> + (length, cmp::min(viewport_size.width, viewport_size.height)),
> ViewportPercentageLength::Vmax(length) =>
> - length * to_unit!(cmp::max(viewport_size.width, viewport_size.height)),
> + (length, cmp::max(viewport_size.width, viewport_size.height)),
> };
> - Au::from_f32_px(value)
> +
trailing whitespace.
Attachment #8903812 -
Flags: review?(emilio) → review+
| Assignee | ||
Comment 6•8 years ago
|
||
This makes viewport-units-rounding-2.html fail, but only by a tiny bit :|
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 9•8 years ago
|
||
The failure was due to rounding instead of truncating. Fixed.
| Assignee | ||
Comment 10•8 years ago
|
||
The test is still fuzzy because of differing rounding between stylo and gecko, but this isn't the important rounding (it used to fail because the divs would overflow the container)
| Assignee | ||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Pushed by manishearth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4247bc5eed01
stylo: Round down when computing viewport units; r=emilio
Comment 13•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•