RESOLVED FIXED4874
Table with absolute bottom positioning is positioned incorrectly
https://bugs.webkit.org/show_bug.cgi?id=4874
Summary Table with absolute bottom positioning is positioned incorrectly
Arthur Langereis
Reported 2005-09-07 07:52:08 PDT
See the URL. Giving a table the following styles: position: absolute; bottom: 0; will result in its _top_ coordinate being aligned with its containing element's bottom, causing it to appear below the P in this example. Other browsers (IE, FF, Opera) place the P and the table at the same height, Safari doesn't. Tested in 2.0 and ToT from around Sep. 1.
Attachments
testcase (408 bytes, text/html)
2005-09-07 15:43 PDT, mitz
no flags
testcase (1.42 KB, text/html)
2005-09-07 15:44 PDT, mitz
no flags
suggested patch (1.87 KB, patch)
2005-09-07 15:59 PDT, mitz
hyatt: review-
updated patch (62.68 KB, patch)
2006-06-21 16:23 PDT, Sam Weinig
hyatt: review+
mitz
Comment 1 2005-09-07 15:43:26 PDT
Created attachment 3802 [details] testcase Extended testcase
mitz
Comment 2 2005-09-07 15:44:54 PDT
Created attachment 3803 [details] testcase previously uploaded the wrong file
mitz
Comment 3 2005-09-07 15:59:15 PDT
Created attachment 3804 [details] suggested patch
Mark Rowe (bdash)
Comment 4 2005-09-07 19:30:31 PDT
Confirmed that the bug occurs with WebKit 412.7 and ToT. Haven't tried with Mitz's patch.
Mark Rowe (bdash)
Comment 5 2005-09-07 20:09:48 PDT
I've tested with the patch and it resolves the problem and leaves all layout tests passing.
Maciej Stachowiak
Comment 6 2005-09-08 23:36:46 PDT
Looks like a good fix to me.
Dave Hyatt
Comment 7 2005-09-09 02:51:46 PDT
This does not seem right to me. I need to mull this over.
Dave Hyatt
Comment 8 2005-09-09 13:12:35 PDT
This piece of the patch confused me in particular: - if (isTable() && height.isVariable()) + if (isTable() && (height.isVariable() || isPositioned())) // Height is never unsolved for tables. "auto" means shrink to fit. Use our // height instead.
mitz
Comment 9 2005-09-09 13:52:36 PDT
Because of the change in RenderTable, calcAbsoluteVerticalValues() gets called for a position table *after* height calculation, so it should not force a smaller height. If it does, the "Short table" in the testcase gets squeezed.
mitz
Comment 10 2005-09-09 13:54:11 PDT
meant to say "a positioned table" of course
mitz
Comment 11 2005-09-22 07:45:03 PDT
Comment on attachment 3804 [details] suggested patch I can't see what's wrong with the patch as it is. See my previous comment.
Dave Hyatt
Comment 12 2005-09-27 13:48:17 PDT
Comment on attachment 3804 [details] suggested patch calcAbsoluteVerticalValue is only called for positioned elements. Therefore as far as I can tell, this line: + if (isTable() && (height.isVariable() || isPositioned())) just reduces to + if (isTable()) I am not yet convinced that positioned tables under all circumstances are supposed to shrink-to-fit.
Sam Weinig
Comment 13 2006-06-21 16:23:03 PDT
Created attachment 8957 [details] updated patch This is an updated version of mitz's patch, applying hyatt's suggestions and updating it to the current code base. It still causes no regressions in the test suite. Hyatt, have you come to a conclusion yet?
Dave Hyatt
Comment 14 2006-06-27 15:00:51 PDT
Comment on attachment 8957 [details] updated patch I'll say r=me. This patch still makes me nervous, since I'm not convinced we have enough tests yet to understand what the correct behavior is in all cases.
Dave Hyatt
Comment 15 2006-06-27 15:01:27 PDT
Whoever commits this be sure to run the layout tests, since the mozilla table test suite was added to our regression suite since this patch was last worked on.
David Kilzer (:ddkilzer)
Comment 16 2006-06-29 23:31:47 PDT
Committed revision 15105. I ran all of the layout tests, and there were no failures.
mitz
Comment 17 2006-12-19 11:17:03 PST
*** Bug 7699 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.