Closed Bug 363374 Opened 14 years ago Closed 14 years ago

[reflow branch] overflow: hidden container has gotten much wider in this testcase

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: martijn.martijn, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files)

This is spun off from bug 313520.

Before the reflow branch, the width of the green bordered blocks was much smaller.
With builds after the reflow branch, however, the green bordered blocks take up the entire width of the window.

IE7 and Opera9 render it more like builds before the reflow branch.
Attached file Testcase #3, float
Attachment #248198 - Attachment description: Testcase #2 → Testcase #2, display:table and -moz-box
The last box in "Testcase #3" might be a separate issue...
OS: Windows XP → All
Hardware: PC → All
Attached patch fix?Splinter Review
Is this what was intended?
Attachment #248241 - Flags: review?(dbaron)
Comment on attachment 248241 [details] [diff] [review]
fix?

No.

If something has 300px width and 25% margin, and we want its container to be 300px / (1.0 - 0.25) == 300px / 0.75 == 400px wide.  Then 25% of 400px is 100px, leaving 300px for the 300px of width.

Mozilla did this in the past in some cases but not others; now we're doing it consistently.
Attachment #248241 - Flags: review?(dbaron) → review-
The old code for doing this was the function ComputeShrinkwrapMargins in nsBlockReflowContext.cpp:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/generic/nsBlockReflowContext.cpp&rev=1.143&root=/cvsroot&mark=409#366

Note that the old code had a discontinuity between 99% and 100%, which is a bug; I removed that discontinuity.
I think this is wontfix, unless there's evidence that it breaks significant numbers of real-world Web pages.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.