Closed Bug 246179 Opened 20 years ago Closed 18 years ago

Zero-border horizontal rule is laid out incorrectly when there are floated block around it

Categories

(Core :: Layout: Floats, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 244932

People

(Reporter: minghong, Unassigned)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+

The zero-border horizontal rule gains some extra left margin when there is
floated elements nearby. See the test case attached.

It was displayed properly in Firefox 0.8 (not tested in Mozilla 0.6 through) but
not Firefox 0.9 RC and Mozilla 1.8a.

Reproducible: Always
Steps to Reproduce:
1. Create a HTML document with a horizontal rule (<hr>) with CSS of border:0 and
height:.08em
2. Add one or two floating elements (e.g. image) next to that horizontal rule.
3. Open the HTML in Firefox 0.9 RC or Mozilla 1.8a. See how other elements are
laid properly while the horizontal rule gains extra left margin.

Actual Results:  
The horizontal gains extra left margin. The more the float elements, the more
the left margin.

Expected Results:  
It should not add any left margin, just laid it out as other elements (e.g.
paragraph).
Attached file HTML Test Case
This looks a lot like bug 244932 (which itself could be a duplicate also)
Martijn, you are right. It looks so similar...
The horizontal rules just go crazy when they see floats...

P.S. This is my site which is facing this problem:
http://minghong.dyndns.org:8080/OpenWiki/
Depends on: 244932
Confirming on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3)
Gecko/20040925 Firefox/0.10
Status: UNCONFIRMED → NEW
Ever confirmed: true
this regressed between linux trunk builds 2004011708 and 2004011808, apparently
bug 52916
Keywords: regression, testcase
OS: Windows 2000 → All
Still reproducible in Mozilla 1.8a6.
And FYI, IE 6.0 and Opera 8.0 render pretty consistently. For IE, the horizontal
rule always stay away from the floating element; while for Opera, the horizontal
rule always go through the floating element. I'm not sure which one is the
correct rendering though.
*** Bug 305450 has been marked as a duplicate of this bug. ***
Testcase WFM using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060817 Minefield/3.0a1 ID:2006081709 [cairo]

Two of the horizontal rules are no longer visible (on my screen), but the ones that are visible no longer intersect the floated blocks.
I made a local copy of the HTML Test Case and increased the height of the horizontal rules.  The layout looks correct.
They all show up with non-cairo trunk build 2006-08-17-12 and are all still out of place.  With a cairo build, the bottom one is missing but the remaining ones are out of place.
Testcase wfm.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070103 Minefield/3.0a2pre
Works in 2006-12-08-01 but not in 2006-12-07-01.  Fixed by reflow branch landing.

The disappearing thing is due to rounding and a height less than 1px being set on the rule (depending on font-size, of course).  I see it with a non-cairo GTK2 build as well.
Status: NEW → RESOLVED
Closed: 18 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
(In reply to comment #13)
 
> The disappearing thing is due to rounding and a height less than 1px being set

This id fixed as well in
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070103 Minefield/3.0a2pre
Dupe of 244932?
Yes, yes it is.
No longer depends on: 244932, reflow-refactor
Keywords: regression, testcase
Resolution: FIXED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: