Bug 85646
Summary: | box not always resizing to conform to its containing block | ||
---|---|---|---|
Product: | WebKit | Reporter: | MetaEd <webkit.org> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | robert, webkit.org |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
URL: | http://metaed.com/try2.html |
MetaEd
Overview:
Box does not resize to conform to its containing block. It resizes when its containing block dimensions changed due to a margin change, but not when due to a border or padding change. Easy to reproduce using Google Chrome. Simple test case provided.
Steps to Reproduce:
1) Open the following five line document in the browser.
<html style="background : silver">
<body style="margin : 0; border : 0 solid red; background : white; padding : 0">
<p style="background : yellow"> hello, world </p>
</body>
</html>
2) Note that the yellow box associated with the P element conforms in width to its containing block, which is defined by the content area of the BODY element.
3) Open the element inspector. Change the margin of the BODY element to 96 and note that the yellow box resizes to conform in width to its smaller containing block.
4) Change the border and/or padding of the BODY element to 96 and note that the yellow box does not resize to conform to its containing block. Instead, it overflows its containing block, which is wrong behavior.
5) Change the margin of the BODY element to 192 and note that the yellow box snaps back into its containing block.
Actual Results:
The yellow box resizes when its containing block dimensions change due to a margin change, but not when due to a border or padding change.
Expected Results:
The yellow box should always resize to conform to its containing block. It should make no difference whether it is a margin, border, or padding change that changes the dimensions of its containing block.
Build Date & Platform:
First reproduced on:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.4 (KHTML, like Gecko) Chrome/16.0.889.0 Safari/535.4
Additional Builds and Platforms:
Also occurs on:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.10 (KHTML, like Gecko) Chrome/20.0.1123.4 Safari/536.10
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.10 (KHTML, like Gecko) Chrome/20.0.1123.4 Safari/536.10
Additional Information:
The URL provided here and above links to a copy of the test case document: http://metaed.com/try2.html
Chromium bug report: http://code.google.com/p/chromium/issues/detail?id=98222
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Robert Hogan
I can't reproduce this on trunk. Please comment or re-open if this is still an issue for you.
MetaEd
I cannot reproduce on:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
so some change between 536.10 and 537.36 took care of the problem.