Closed
Bug 366865
Opened 18 years ago
Closed 18 years ago
width distribution of spanning cells suffers from rounding error
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Keywords: autotest-issue, Whiteboard: [patch])
Attachments
(1 file, 1 obsolete file)
16.43 KB,
patch
|
bernd_mozilla
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Width distribution of column-spanning cells suffers from rounding error since we distribute each cell using the same math operations. We should instead cumulatively rebuild the ratios after each distribution to a column so that we don't end up a pixel or two off after the cumulative rounding error for each column.
This breaks my first reftest for bug 363329 at some DPI/font metrics combinations.
Updated•18 years ago
|
Flags: blocking1.9?
Assignee | ||
Comment 1•18 years ago
|
||
There's something wrong with the ComputeColumnIntrinsicWidths changes here that I haven't figured out yet...
Assignee | ||
Comment 2•18 years ago
|
||
It took way too long to figure out what was wrong with the first loop, because gdb was lying to me about the state of the variables when I hit the assertion. It turned out it was the assertion that was wrong.
Attachment #253844 -
Attachment is obsolete: true
Assignee | ||
Comment 3•18 years ago
|
||
Comment on attachment 253875 [details] [diff] [review]
patch
This looks somewhat complicated but really isn't all that bad. It's modifying two loops whose purpose is to distribute widths among columns based on the ratio of some parameter(s) of the columns. It's modifying those so that instead of computing the ratio once at the beginning of the loop, we recompute it each time based on only the remaining columns so that we don't accumulate rounding error. This means we will distribute exactly the amount we were asked to distribute, whereas in the old code we sometimes distributed a little more or less.
Attachment #253875 -
Flags: superreview?(roc)
Attachment #253875 -
Flags: review?(bernd_mozilla)
Assignee | ||
Comment 4•18 years ago
|
||
And reftests pass (module the one test from bug 1156 that's been failing for me).
Assignee | ||
Updated•18 years ago
|
OS: Linux → All
Hardware: PC → All
Whiteboard: [patch]
Attachment #253875 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Updated•18 years ago
|
Keywords: autotest-issue
sorry for the delay, the review is now my top priority will do it over the weekend
Attachment #253875 -
Flags: review?(bernd_mozilla) → review+
Assignee | ||
Comment 6•18 years ago
|
||
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 7•18 years ago
|
||
Already tested by the failing tests which triggered the filing of this bug.
Flags: in-testsuite-
Updated•18 years ago
|
Flags: blocking1.9?
You need to log in
before you can comment on or make changes to this bug.
Description
•