Closed Bug 437920 Opened 16 years ago Closed 2 years ago

FlowAndPlaceFloat doesn't take the current line's line-box into account

Categories

(Core :: Layout: Floats, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1291110

People

(Reporter: roc, Unassigned)

References

Details

(Keywords: css1, parity-chrome)

Attachments

(1 file)

Attached file testcase (deleted) —
When nsBlockReflowState::AddFloat tries to place a float on the current line, it calls FlowAndPlaceFloat, which figures out where to put the float given the positions of already-placed floats. When FlowAndPlaceFloat can't fit the float on the current line (in my testcase, because the current line is impacted by a float), it moves to the next "band", and tries to place the float there. However, it fails to take into account the possibility that the current line's line-box may overlap the next band, so in the testcase it places the float there but then we go back and finish reflowing the line and it does indeed end up overlapping the float. In the testcase, Safari 3.1 has the same behaviour as Gecko trunk. Opera 9.5beta moves the H to the next line --- that doesn't seem right to me either, although mabye it is.
I mean, Opera moves the H to the start of the line below the green float.
I considered the rendering that leaves the H where it is and moves the right float down below the H. But actually I think Opera's rendering is more correct than that, given "# A floating box must be placed as high as possible." in http://www.w3.org/TR/CSS21/visuren.html#float-position
This testcase shows bug 25888; I'm not sure what the bug you're describing is, though.
(I also think the testcase might be a little more interesting with the H before the float. That case seems a little more relevant to bug 50630. (This bug came from bug 50630 comment 43.)
The bug I'm talking about is bug 25888.
Depends on: 25888
Though this wasn't fixed by the fix for bug 25888, which only fixed cases where the float came from prior to the line. Current Chrome renders the testcase correctly, though.
Keywords: css1
Whiteboard: [parity-chromium]
Blocks: 345369
Blocks: 1291110
Priority: -- → P3
Whiteboard: [parity-chromium] → [parity-chrome]
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome
Whiteboard: [parity-chrome]

In this push range https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=99a239e1866a57f987b08dad796528e4ea30e622&tochange=f0f1aaf051d6798e1e73d1feee07ca847333167a, the testcase changes from bad rendering to crashing the browser, but I cannot tell which bug causes the crash.

Yet, in this push range https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=13736e2db6eb94b02dd28cc88f2943b8109aa374&tochange=cd4cdcc9ad6c45dad8b8d8c0d40e459db2bca8a1, the testcase change from crashing the browser to good rendering (match Chrome's rendering), but I still cannot tell which bug fixed it ...

Per my test on today's Nightly (2022-07-11), Firefox renders the testcase the same as Chrome and Safari.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: