width of overflow:hidden blocks is wrong when their margins overlap floats. There are a couple of cases that we get wrong, but they all basically boil down to the fact that we need to stop thinking about shrinking to avoid floats as reducing the available content width and instead start thinking about it as reducing the object's width instead.
The relevant thread for discussion is: http://lists.w3.org/Archives/Public/www-style/2012Feb/0954.html See additional tests mentioned here: http://lists.w3.org/Archives/Public/www-style/2012Feb/1007.html
Created attachment 127854 [details] Patch
Comment on attachment 127854 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=127854&action=review > Source/WebCore/rendering/RenderBox.cpp:1261 > + LayoutUnit offsetFromLogicalTopOfRegion = region ? region->offsetFromLogicalTopOfFirstPage() - offsetFromLogicalTopOfFirstPage : 0; No need to test region here. > LayoutTests/fast/block/float/centered-float-avoidance-complexity.html:69 > + <h3>The orange stripe has 'overflow: auto', 'margin-left: auto' and 'margin-right: auto'<br> The lime stripes are floats with various width (topmost is 0, bottommost is 150px)<br>The wrapping container has a solid silver border.</h3> This text is lying about the margins of the orange stripe. Might as well get it right.
Comment on attachment 127854 [details] Patch Attachment 127854 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11546579 New failing tests: fast/forms/float-before-fieldset.html fast/block/float/centered-float-avoidance-complexity.html fast/block/float/shrink-to-avoid-float-complexity.html
fwiw, older bug on this: bug 19123.
(In reply to comment #3) > > LayoutTests/fast/block/float/centered-float-avoidance-complexity.html:69 > > + <h3>The orange stripe has 'overflow: auto', 'margin-left: auto' and 'margin-right: auto'<br> > This text is lying about the margins of the orange stripe. I fixed that error in http://www.gtalbot.org/BrowserBugsSection/css21testsuite/Floats-And-BFCs-With-Margins-AG.html Gérard
Fixed in r108364.
*** Bug 19123 has been marked as a duplicate of this bug. ***