Bug 40113 - Strange layout bug involving floats and overflow:hidden
Summary: Strange layout bug involving floats and overflow:hidden
Status: RESOLVED DUPLICATE of bug 35910
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2010-06-03 04:49 PDT by Lea Verou
Modified: 2011-12-20 11:26 PST (History)
5 users (show)

See Also:


Attachments
Reduction that illustrates the bug (454 bytes, text/html)
2010-06-03 04:49 PDT, Lea Verou
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lea Verou 2010-06-03 04:49:15 PDT
Created attachment 57754 [details]
Reduction that illustrates the bug

See attached testcase.
#content should not have the gap on the right, and it doesn't in ALL rendering engines (Trident, Presto, Gecko) but Webkit-based ones.

If you remove overflow:hidden the bug disappears. If you remove #sidebar, it disappears again. I have no idea what might be causing it.
Comment 1 kyounga 2010-10-12 02:09:52 PDT
It looks the problem between left-float and left-margin. 

I guess that the "content" width is caclulated as [the containg block's available width of "content"(960-siderbar's width) - left-margin(18em) value]
But, margin is the distance from containing block not neighbor block. 
So, left-margin calculated from left edge of containing block("wrapper")

BTW, in case of overflow:hidden, I have two theory. 
1. The line box of "content" has right value and draw the bgcolor.
   But, the line box has no background-color. 
   The painting in webkit draws the inherited background-color from parent? not transparent? 

2. Or the block width calculation is wrong only when it has "overflow:hidden"
   But, "overflow" property should effect on "drawing" not "rendering", isn't it? 

I'll analize this bug with latest nightly build.
Comment 2 mitz 2011-12-20 11:26:27 PST

*** This bug has been marked as a duplicate of bug 35910 ***