Closed Bug 54261 Opened 26 years ago Closed 26 years ago

HR's can become infinite, and are the wrong size always

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 53568

People

(Reporter: jesup, Assigned: clayton)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

HR's with size < 3 (the default) become weird. HR's with size 1 (or width 1) can cause some serious problems, especially if they're NOSHADE. Since <hr size=1 noshade> is a typical "give me a one-pixel line" trick, this is bad. I've seen this lots of places. Amazon used to use it (and may still). The problem is caused because of how HR interacts with -moz-bg-inset (see html.css). The inset takes away pixels from the base size of the HR, and can take more than the HR has to give. <hr size=2 noshade> is 30 tall - but the borders are each 15, leaving mComputedHeight as 0. For <hr size=1 noshade>, mComputedHeight becomes -15, and the FillRect goes to infinity (and lots of things get screwed up, including other elements not appearing at all). -moz-bg-inset (and outset I believe) should add the margins to the mRect of the element, so the content size remains the same. I'm uploading a simple example.
Attached file testcase —
Viewing the differences between this testcase and ns4.7 or ieeee makes the problem VERY evident. I suspect this is a very easy fix. It might make sense to double-check how regular borders are working (make sure they aren't stealing from the content area) as well. Updated subject to be more precise BTW, I note that HR's w/ noshade are rounded-ends in mozilla (if tall enough), and square in ns4.7. Is this "correct"?
Summary: HR's can become inside-out and infinite size → HR's can become infinite, and are the wrong size always
This seems to be a recent regression. CNN is showing this as well.
Keywords: regression
Hardware: Other → All
*** This bug has been marked as a duplicate of 53568 ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Verified dupe.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: