Bug 10610
Summary: | Unprecise column width in CSS formatted table | ||
---|---|---|---|
Product: | WebKit | Reporter: | Rüdiger Cordes <rc> |
Component: | Tables | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, rniwa, webkit |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac (PowerPC) | ||
OS: | OS X 10.4 | ||
URL: | https://macshot.de/table-error.html |
Rüdiger Cordes
The error is dependent of order of rows.
In the reduced example the upper table is with error, the lower table is correct.
ri = right, fa = false
Its just one pixel but shows there is something wrong and maybe this little error generates more and difficult to find errors.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Robert Blaut
Using Webkit r30153 both tables have the same width. Is it correct according to you? Description of the problem isn't clear.
Rüdiger Cordes
Hello,
I thought the small code would stand for itself, but yes, I can say something more to it.
The table is set fix to 226 px width. The columns are set to 56, 57, 56 and 57px width.
So in the bottom table everything is fine. But when I change the order of the rows -
second row with first row, resulting in the top table - second and third column have a
wrong width.
The grafic shows it in magnification.
So there must be an error in column width calculation influenced by combined fields.
Third and fourth table have no width specified for the whole table but for the columns
as above to see how the border effects the width (box modell) when table width is not set.
There is no difference between them in column width. So the error is forced with limited
width for the table. Not easy to find in the code but present ;-)
Rüdiger Cordes
Here are more tables to see and test: https://macshot.de/table-error2.html
Table 7 and 8 are very different, but the difference is only that first and second have changed their positions.
Rüdiger Cordes
On the second page in tables 5 and 6:
column 1 is one pixel thinner than column 3 and column 2 is one pixel thinner than column 4.
Because the width of the table is divideable through 4 (648) there is no need to that.
Making a smaller table with only two columns and half the table width (red tables 9 and 10) shows:
the tables have the set width of 324px. Tables 5 and 6 are just dubbled in column number and should have 324 px width for the first two and the last two columns too.
Table 7 has four columns width identical width ignoring the different (56 and 57px column width).
Rüdiger Cordes
Green tables 11 and 12 shows when more columns are created:
the left two together are 1px too thin, the middle ones have correct 324px width and the right two are 1px too thick.
Rüdiger Cordes
(In reply to comment #1)
> Using Webkit r30153 both tables have the same width.
> Is it correct according to you? Description of the problem isn't clear.
Yes, they have. But I am talking about column widths.
And even with r30218 of today the problem still persists.
I have looked into other browsers too and Safari like all others has
problems with it.
Just changing the order of two rows in a table shouldnt affect the look of a table, or?
Kind regards, Rüdiger
Ahmad Saleem
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 using test case from URL field, I zoomed into the specific place as test case show to look for misalignment but I don't get it on macOS 12.5 at least. Is it could be platform specific due to Cairo or other rendering library being used. Just wanted to share updated results, further all other browsers (Chrome Canary 106 and Firefox Nightly 105) also don't have any misalignment. Thanks!
Ryosuke Niwa
This is perfectly aligned now.