Closed
Bug 4098
Opened 26 years ago
Closed 26 years ago
Fractions of pixels should round *down*, not to nearest integer
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
WONTFIX
People
(Reporter: ian, Assigned: peterl-retired)
References
()
Details
NGLayout, build of 1999-03-20, fails the half-size box acid test, although it
passes both the normal and double size versions.
Apparent problems are mainly the placement of elements. The size and color of
elements seems to be ok.
[ ccing Todd. I hope that's what you want, Todd... sorry about the spam. :-) ]
Reporter | ||
Updated•26 years ago
|
Severity: normal → trivial
Reporter | ||
Comment 1•26 years ago
|
||
The problem is that the widths of the left floated elements are being rounded
up so that they just exceed the available width, and so the floats are moving
down. In other words, NGLayout is technically speaking acting correctly, since
the spec does not define rounding behaviour.
I would suggest, however, that this could be 'fixed' by always rounding _down_,
instead of rounding to the nearest integer number of pixels. That way, 50%+50%
could never add up to more than 100%.
(If rounding-to-nearest-integer is used, then 50%+50% of 3px is 4px, because
the first 50% of 3 is 1.5 which rounds to 2px.)
[ reducing severity as this really is a trivial problem ]
Reporter | ||
Updated•26 years ago
|
Summary: NGLayout fails the boxacidtest - dramatically → Fractions of pixels should round *down*, not to nearest integer
Reporter | ||
Comment 2•26 years ago
|
||
Changing summary to a more accurate description of the problem.
peter and ian can argue this one out; if something definitive comes of it, then
assign specific bugs to specific code. thanks.
Assignee | ||
Comment 4•26 years ago
|
||
Sorry, we really need to round up as well as down, there are too many cases
where cumulative rounding errors would be too great otherwise. By rounding both
ways, rounding errors at least tend to cancel each other out...
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WONTFIX
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 5•26 years ago
|
||
The half-size boxacidtest is a bit funny because the dl's computed width comes
out to either 234 or 236 px, because its padding is 2.5px.
I think NGLayout's rounding methods are legitimate. The other two versions of
the boxacidtest always assume that the UA will round up, and therefore use
numbers that are slightly low.
As long as nothing can happen with repeated use of the same units to fill a
space, I think you're OK.
Comment 7•25 years ago
|
||
This actually looks fixed now, despite being marked WONTFIX.
You need to log in
before you can comment on or make changes to this bug.
Description
•