Closed
Bug 1396045
Opened 6 years ago
Closed 6 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•6 years ago
|
Blocks: stylo-reftest
Updated•6 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•6 years ago
|
||
Needs https://github.com/servo/app_units/pull/34
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 4•6 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•6 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•6 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•6 years ago
|
||
The failure was due to rounding instead of truncating. Fixed.
Assignee | ||
Comment 10•6 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•6 years ago
|
||
https://github.com/servo/servo/pull/18448
Comment 12•6 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•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4247bc5eed01
Status: ASSIGNED → RESOLVED
Closed: 6 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
•