Closed
Bug 288560
Opened 19 years ago
Closed 19 years ago
Columns: Hang/freeze in this case using float:right and -moz-column-count:2
Categories
(Core :: Layout, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: martijn.martijn, Assigned: roc)
Details
(Keywords: testcase)
Attachments
(3 files, 2 obsolete files)
267 bytes,
text/html
|
Details | |
266 bytes,
text/html
|
Details | |
28.67 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
chofmann
:
approval1.8b2+
|
Details | Diff | Splinter Review |
See upcoming testcase. Basically, the testcase consists of this: <div style="height:1px;-moz-column-count:2;"> <span style="float:right;border:1px solid red;"></span> </div> This causes the freeze/hang. Also, memory seems to increase steadily by 0.5MB/s.
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
Robert, this is probably also something for you.
Assignee | ||
Comment 3•19 years ago
|
||
This is a tough one. We're trying to lay out a float and there simply isn't enough available height for it to fit anywhere, so we just keep creating more columns in the hope that it will eventually fit, and of course that doesn't help. What we have to do is what we do elsewhere, which is determine when moving the content to the next page/column won't give it any more space, and if so, force it to fit where it is. "fit where it is" is tricky for floats though, because the space manager is involved. This patch detects force-fit situations and forces floats to fit by temporarily relaxing the height constraint imposed by nsBlockBandData. That seems to work well. To fully fix this bug, though, we have to work a bit harder. Columns need to set the mIsTopOfPage flag so that the float doesn't get NS_FRAME_IS_TRUNCATED in its reflow status, which triggers nsLineLayout to try to push the line anyway.
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #180007 -
Flags: superreview?(dbaron)
Attachment #180007 -
Flags: review?(dbaron)
Comment on attachment 180007 [details] [diff] [review] fix r+sr=dbaron, although I wonder if the overloading of mIsTopOfPage will cause problems when columns and pagination are combined.
Attachment #180007 -
Flags: superreview?(dbaron)
Attachment #180007 -
Flags: superreview+
Attachment #180007 -
Flags: review?(dbaron)
Attachment #180007 -
Flags: review+
Assignee | ||
Comment 5•19 years ago
|
||
Looking again at the patch, there's a significant problem ... + nsSize space = mSpace; + if (aRelaxHeightConstraint) { + space.height = NS_UNCONSTRAINEDSIZE; + } but 'space' isn't used, we just keep using mSpace. I'll fix that and retest...
Assignee | ||
Comment 6•19 years ago
|
||
Yeah. The change to nsColumnSetFrame alone fixes Martijn's original testcase, but the erroneous patch here doesn't fix this testcase.
Assignee | ||
Comment 7•19 years ago
|
||
I think the overloading of mIsTopOfPage won't cause problems. The only potentially dangerous situation I can think of is when a column set starts right at the bottom of a page, so the column set doesn't have mIsTopOfPage set, but the first lines of its columns do, so those lines are not marked as truncated even when they overflow the height constraint. But the column set itself will be marked as truncated and pushed to the next page.
Assignee | ||
Comment 8•19 years ago
|
||
This patch fixes both Martijn's testcase and the testcase I just posted. It's basically identical to the previous patch except it makes the float-forcefit code actually work by using 'space' instead of 'mSpace' as I'd intended. I also made another change in nsBlockFrame::PushLine so that the forcefit parameter to PlaceBelowCurrentLineFloats uses the IsAdjacentToTop value from *before* we placed the line, not after (when it would almost always be false).
Attachment #180007 -
Attachment is obsolete: true
Attachment #182033 -
Flags: superreview?(dbaron)
Attachment #182033 -
Flags: review?(dbaron)
Assignee | ||
Comment 9•19 years ago
|
||
Comment on attachment 182033 [details] [diff] [review] fix #2 wrong patch
Attachment #182033 -
Attachment is obsolete: true
Attachment #182033 -
Flags: superreview?(dbaron)
Attachment #182033 -
Flags: review?(dbaron)
Assignee | ||
Comment 10•19 years ago
|
||
right patch
Attachment #182034 -
Flags: superreview?(dbaron)
Attachment #182034 -
Flags: review?(dbaron)
Attachment #182034 -
Flags: superreview?(dbaron)
Attachment #182034 -
Flags: superreview+
Attachment #182034 -
Flags: review?(dbaron)
Attachment #182034 -
Flags: review+
Assignee | ||
Comment 11•19 years ago
|
||
Comment on attachment 182034 [details] [diff] [review] fix #2 fixes a hang in some column testcases (which can also be triggered in print preview). Should have no effect on normal layout.
Attachment #182034 -
Flags: approval1.8b2?
Comment 12•19 years ago
|
||
Comment on attachment 182034 [details] [diff] [review] fix #2 a=chofmann
Attachment #182034 -
Flags: approval1.8b2? → approval1.8b2+
Assignee | ||
Comment 13•19 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•19 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•