Open Bug 389587 Opened 14 years ago Updated 5 years ago
Break should not be allowed at float/abspos placeholder
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
This causes failures on the following tests in the CSS 2.1 test suite (at certain browser widths, including the one I ran the suite at): http://test.csswg.org/suites/css2.1/20100917/xhtml1/abspos-inline-003.xht http://test.csswg.org/suites/css2.1/20100917/xhtml1/abspos-inline-004.xht http://test.csswg.org/suites/css2.1/20100917/xhtml1/abspos-inline-005.xht http://test.csswg.org/suites/css2.1/20100917/xhtml1/abspos-inline-006.xht http://test.csswg.org/suites/css2.1/20100917/html4/abspos-inline-003.htm http://test.csswg.org/suites/css2.1/20100917/html4/abspos-inline-004.htm http://test.csswg.org/suites/css2.1/20100917/html4/abspos-inline-005.htm http://test.csswg.org/suites/css2.1/20100917/html4/abspos-inline-006.htm
(Note that this is probably quite easy to fix for abspos, but harder for floats. Maybe I shouldn't have reused the same bug...)
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.
IE8+ performance is the same as Edge.
You need to log in before you can comment on or make changes to this bug.