WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
79046
width of overflow:hidden blocks is wrong when their margins overlap floats
https://bugs.webkit.org/show_bug.cgi?id=79046
Summary
width of overflow:hidden blocks is wrong when their margins overlap floats
Dave Hyatt
Reported
2012-02-20 14:39:22 PST
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.
Attachments
Patch
(266.16 KB, patch)
2012-02-20 14:54 PST
,
Dave Hyatt
mitz: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dave Hyatt
Comment 1
2012-02-20 14:40:09 PST
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
Dave Hyatt
Comment 2
2012-02-20 14:54:33 PST
Created
attachment 127854
[details]
Patch
mitz
Comment 3
2012-02-20 15:13:52 PST
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.
WebKit Review Bot
Comment 4
2012-02-20 15:37:42 PST
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
Philippe Wittenbergh
Comment 5
2012-02-20 16:46:53 PST
fwiw, older bug on this:
bug 19123
.
Gérard Talbot (no longer involved)
Comment 6
2012-02-20 20:00:36 PST
(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
Dave Hyatt
Comment 7
2012-02-21 09:17:44 PST
Fixed in
r108364
.
Dave Hyatt
Comment 8
2012-02-21 09:18:45 PST
***
Bug 19123
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.
Top of Page
Format For Printing
XML
Clone This Bug