When WebKit renders a table for which both border-collapse: collapse; and overflow: hidden; are set via CSS the rendering of my tables with 1px border looked strange: the bottom and right border were not displayed at all.
After some investigation I found that these borders do get rendered somehow, but in another way than usual; this effect can be seen by enlarging the border-width.
Please check the website or the attached test case reduction file to see an example of both cases
I can also reproduce this bug with the following browsers:
Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9.1
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0
Created attachment 203513[details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 203514[details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Created attachment 203515[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Comment on attachment 203523[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=203523&action=review
r-
> Source/WebCore/rendering/RenderTable.cpp:1363
> + if (phase == PaintPhaseChildBlockBackgrounds) {
> + rect = borderBoxRectInRegion(region);
> + rect.setLocation(location + rect.location());
> + clipScrollBars(rect, relevancy);
This code doesn't make much sense to me. Isn't the clipScrollbars rectangle going to clip scrollbars in the wrong place?
Comment on attachment 204187[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=204187&action=review
r-
> Source/WebCore/rendering/RenderTable.cpp:1364
> + LayoutRect rect;
> + if (phase == PaintPhaseChildBlockBackgrounds) {
> + rect = borderBoxRectInRegion(region);
> + rect.setLocation(location + rect.location());
> + } else
> + rect = RenderBox::overflowClipRect(location, region, relevancy);
I just don't think you can make this phase-dependent. Make the table into a self-painting layer, e.g., by making it position:absolute, and suddenly the overflowClipRect is going to get cached by the RenderLayer clipRects code, and it's not going to use the phase you want.
Basically overflowClipRect can't be giving different answers based off phases.
Created attachment 204538[details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Created attachment 204542[details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Comment on attachment 205318[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=205318&action=review
r-
> Source/WebCore/rendering/RenderTable.cpp:672
> + info.context->restore();
> + info.context->save();
This code seems to be making the assumption that the last save() you did pushed only the overflow clip? That seems like a bogus assumption.
Created attachment 206027[details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Created attachment 206041[details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 206154[details]
Archive of layout-test-results from APPLE-EWS-4 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: APPLE-EWS-4 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Created attachment 206605[details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 206606[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Comment on attachment 206603[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=206603&action=review
r-
> Source/WebCore/rendering/RenderTableCell.cpp:1004
> +LayoutRect RenderTableCell::overflowClipRect(const LayoutPoint& location, RenderRegion* region, OverlayScrollbarSizeRelevancy relevancy)
I don't understand any of these table cell changes really. In the self-painting layers case, the cell gets clipped properly already by overflowClipRectForChildLayers. In the case where the table cell has no layer, why not just simulate the same thing and re-use overflowClipRectForChildLayers. Make the table code actually push the overflowClipRectForChildLayers clip before painting kids.
I really think done right you don't have to touch RenderTableCell at all.
2008-04-03 18:40 PDT, Jasper Boot
2008-04-03 18:46 PDT, Jasper Boot
2013-06-02 01:59 PDT, Robert Hogan
2013-06-02 04:41 PDT, Build Bot
2013-06-02 06:40 PDT, Build Bot
2013-06-02 07:07 PDT, Build Bot
2013-06-02 08:40 PDT, Robert Hogan
2013-06-10 13:58 PDT, Robert Hogan
2013-06-12 14:14 PDT, Robert Hogan
2013-06-12 15:15 PDT, Build Bot
2013-06-12 16:19 PDT, Build Bot
2013-06-24 13:06 PDT, Robert Hogan
2013-07-02 12:12 PDT, Robert Hogan
2013-07-03 13:57 PDT, Robert Hogan
2013-07-03 14:45 PDT, Build Bot
2013-07-03 18:49 PDT, Build Bot
2013-07-05 08:16 PDT, Build Bot
2013-07-13 04:03 PDT, Robert Hogan
2013-07-13 05:59 PDT, Robert Hogan
2013-07-13 06:48 PDT, Build Bot
2013-07-13 08:07 PDT, Build Bot
2013-07-19 10:35 PDT, Robert Hogan