Open Bug 389587 Opened 17 years ago Updated 2 years ago

Break should not be allowed at float/abspos placeholder

Categories

(Core :: Layout: Floats, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: sharparrow1, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Per description; there is not supposed to be a legal breakpoint where a float occurs in a webpage (per dbaron).

Fixing this correctly would require modifying the way we place floats because we assume placeholders will stay on a line once they are placed.

Note that no other browser implements this behavior (i.e. they allow breaking at a placeholder).

Simple test:
data:text/html,<div style="width:0">A<span style="float:left">B</span>C
Summary: Break should not be allowed at float placeholder → Break should not be allowed at float/abspos placeholder
(Note that this is probably quite easy to fix for abspos, but harder for floats.  Maybe I shouldn't have reused the same bug...)
Blocks: 743599
The reason this is harder for floats is that to fix it for floats, we need to defer reflowing and placing floats until the first break opportunity at or after their placeholder (at which point we can decide whether they fit adjacent to the current line or are placed below it via mBelowCurrentLineFloats -- but they shouldn't go in either list until the break opportunity).  This change would also allow us to get rid of one of the two ways we set LINE_REFLOW_REDO_NO_PULL, and get rid of CheckPlaceholderInLine.
Attached image Servo-test.png
Attached image Edge-test.png
IE8+ performance is the same as Edge.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: