Closed Bug 159059 Opened 24 years ago Closed 24 years ago

[FIX]Border and hidden overflow handled incorrectly

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: hyatt, Assigned: bzbarsky)

Details

Attachments

(2 files)

If a block has a specified width of 0px, and if it has an overflowing block child or an overflowing line box, the block is incorrectly grown to enclose the overflowing block or line box. If the block has a width > 0px, then the right thing happens. Test case forthcoming.
Here's a testcase.
Opera on Win32 does what I expect with the first testcase in the HTML file I attached, unlike what MOzilla seems to be doing.
Attached patch Proposed patchSplinter Review
David, what's the deal with that CSS1 section that we're supposed to be following here?
OS: Windows XP → All
Hardware: PC → All
Boy have I found a fun little monster. Matrix of results on the third test case: (1) WinIE - Expands red block to enclose blue, green and blue blocks correct (2) Opera - Green block is not displayed! red and blue blocks correct (3) Mozilla - Expands red block to enclose blue, green and blue blocks correct (4) Mac IE - Expands red block to width of browser window(!!), green block is also width of browser window, blue block correct (5) Konqueror - Nothing shows up, width of 0 is special-cased to collapse down to nothing! All browsers pass the width:1px test case with flying colors except for WinIE, which always expands the red block.
The relevant CSS1 quote: The 'width' has a non-negative UA-defined minimum value (which may vary from element to element and even depend on other properties). If 'width' goes below this limit, either because it was set explicitly, or because it was 'auto' and the rules below would make it too small, the value will be replaced with the minimum value instead. Note that we _only_ apply this when "width:0" is set, which means we aren't really following CSS1 on this anyway....Also, as glazou points out CSS1 has no concept of overflow, which is why this was probably necessary.
I think kipp was confused when he wrote that. However, this bug is a duplicate of bug 12750, which I filed almost three years ago.
Comment on attachment 92546 [details] [diff] [review] Proposed patch This patch makes our behavior better than it is now. r or sr = dbaron
Attachment #92546 - Flags: superreview+
Component: Style System → Layout
Comment on attachment 92546 [details] [diff] [review] Proposed patch r=hyatt
Attachment #92546 - Flags: review+
Might as well take this...
Assignee: dbaron → bzbarsky
Priority: -- → P1
Summary: Border and hidden overflow handled incorrectly → [FIX]Border and hidden overflow handled incorrectly
Target Milestone: --- → mozilla1.2alpha
fix checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: