RESOLVED FIXED 15010
REGRESSION (r25000-r25065): Table rendering broken by a recent nightly
https://bugs.webkit.org/show_bug.cgi?id=15010
Summary REGRESSION (r25000-r25065): Table rendering broken by a recent nightly
Andrew
Reported 2007-08-19 12:25:22 PDT
If you visit the site it should be pretty clear what the problem is, it appears the table is not being rendered to it's complete length. It renders incorrectly in r25145 I believe, but can't be 100% sure, that this regression was introduced in the last week or so.
Attachments
Partial reduction (851 bytes, text/html)
2007-08-19 13:02 PDT, mitz
no flags
Use floating point arithmetic for max widths and add a cap (17.94 KB, patch)
2007-08-21 07:19 PDT, mitz
darin: review+
mitz
Comment 1 2007-08-19 12:29:29 PDT
mitz
Comment 2 2007-08-19 13:02:26 PDT
Created attachment 16024 [details] Partial reduction When the browser window is sufficiently wide, the innermost table suddenly collapses.
mitz
Comment 3 2007-08-19 14:26:02 PDT
The problem is that as a result of r25011, there are some huge max widths involved in various computations in AutoTableLayout.cpp and when computing integer ratios such as available * m_layoutStruct[i].effMaxWidth / totalAuto or maxNonPercent * 100 * percentScaleFactor / max(remainingPercent, epsilon) the intermediate products overflow and you get negative numbers. Not sure exactly how to fix it.
Geoffrey Garen
Comment 4 2007-08-20 16:00:25 PDT
Silly idea: perform the division before the multiplication? Another silly idea: enforce a "max max width?"
Geoffrey Garen
Comment 5 2007-08-20 16:00:47 PDT
mitz
Comment 6 2007-08-20 16:17:08 PDT
(In reply to comment #4) > Silly idea: perform the division before the multiplication? That will introduce huge errors in many cases due to rounding. > Another silly idea: enforce a "max max width?" Possible, but may reintroduce the bug fixed by r25011. I also thought of - using a 'long long' for the intermediate product, but I don't know if that's guaranteed to work (that is, allow for bigger values) in all platforms; - using floating-point math to compute the scaling factors.
Darin Adler
Comment 7 2007-08-20 16:33:11 PDT
(In reply to comment #0) > If you visit the site What site?
Matt Lilek
Comment 8 2007-08-20 16:49:12 PDT
(In reply to comment #7) > (In reply to comment #0) > > If you visit the site > > What site? > I believe <http://community.nethosted.co.uk/>. For some reason it was cleared from the URL field.
Maciej Stachowiak
Comment 9 2007-08-20 22:14:27 PDT
floating point math would probably give the best rounding behavior. And it would be easy to check for overflowing the range of an int once at the end.
mitz
Comment 10 2007-08-21 07:19:16 PDT
Created attachment 16052 [details] Use floating point arithmetic for max widths and add a cap
Darin Adler
Comment 11 2007-08-21 10:35:49 PDT
Comment on attachment 16052 [details] Use floating point arithmetic for max widths and add a cap r=me
Adele Peterson
Comment 12 2007-08-21 11:07:27 PDT
Committed revision 25171.
Note You need to log in before you can comment on or make changes to this bug.