RESOLVED CONFIGURATION CHANGED 13213
"overflow: hidden" does not correctly overflow for elements with "white-space: nowrap" in tables
https://bugs.webkit.org/show_bug.cgi?id=13213
Summary "overflow: hidden" does not correctly overflow for elements with "white-space...
Lucas Newman
Reported 2007-03-27 20:05:31 PDT
"overflow: hidden" does not correctly overflow for elements with "white-space: nowrap" inside table columns. The expected behavior is for an element to clip to the viewport and not display the overflow. However, instead, it expands the viewport to be as large as the full element and adds a scrollbar to the window. I've put up a sample page which illustrates the problem. The sample correctly clips the first element to the viewport with hidden overflow in Firefox 2.0.0.3 and IE 7. <radr://problem/5093711> WebKit does not hide overflow for elements with "white-space: nowrap" in tables
Attachments
Reduced testcase showing the behavior. (1.82 KB, text/html)
2007-03-30 22:06 PDT, Lucas Newman
no flags
David Kilzer (:ddkilzer)
Comment 1 2007-03-27 21:34:44 PDT
Confirmed with a local debug build of WebKit r20544 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).
Lucas Newman
Comment 2 2007-03-27 21:56:53 PDT
A workaround is to set "display: block" on the table.
Lucas Newman
Comment 3 2007-03-27 22:01:40 PDT
Sorry, the workaround is actually: "table, tbody, tr, td { display: block; }"
Lucas Newman
Comment 4 2007-03-30 22:04:59 PDT
That workaround doesn't actually fix all cases. I have updated the reduced testcase to take out the table border spacing, so the boxes on the top and bottom can be directly compared (they should be identical).
Lucas Newman
Comment 5 2007-03-30 22:06:58 PDT
Created attachment 13900 [details] Reduced testcase showing the behavior.
Maxwell Terpstra
Comment 6 2010-06-17 19:29:13 PDT
This is not a bug. The first part of the test case involves a table using auto layout mode. In this mode, the width of the table is determined by the width of the cell content. The width of the cell content must be calculated using a "shrink-to-fit" algorithm, since the normal algorithm depends on the width of the containing block being pre-determined. The shrink-to-fit algorithm never results in overflow. The second part of the test case does not use the shrink-to-fit width algorithm. Instead, its width is determined solely by the width of its containing block (the viewport), irrespective of its content. The calculated width ends up being less than the intrinsic width of the content, so overflow occurs. If you want to prevent this kind of "overflow" (actually just width ballooning) in a table, use the fixed table layout mode.
Ahmad Saleem
Comment 7 2024-04-06 10:34:37 PDT
I am getting same rendering across Safari 17.4.1, Chrome Canary 125 and Firefox Nightly 126, I think we can mark this as 'RESOLVED CONFIGURATION CHANGED'. @Karl - any input?
Karl Dubost
Comment 8 2024-04-07 17:44:12 PDT
confirmed.
Note You need to log in before you can comment on or make changes to this bug.