Closed Bug 518665 Opened 15 years ago Closed 2 years ago

Make nsBlockFrame's overflow store an nsFrameList, not just lines

Categories

(Core :: Layout, defect, P3)

x86
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 728908

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

See bug 512471 comment 5. I guess the idea would be that Set/Get/RemoveOverflowLines would take a pointer to a struct, not to an nsLineList*, and that struct would contain an nsLineList* and an nsFrameList. Would allocating this struct from the presshell's arena be reasonable? I expect we'd be doing this a fair amount, and we have a prescontext in DestroyOverflowLines and the like already....
Alternatively, you could just construct the nsFrameList on the fly in the places it's needed. We do that in GetChildList.
Sorry, I guess I wasn't cleary: in that case, it doesn't need to be dynamically-allocated.
I thought the whole point here was to get rid of the GetChildList code in question.
I was suggesting to shift that into GetOverflowLines() so that GetOverflowLines()'s caller can request a frame list along with the line list. There's a couple places where we call GetOverflowLines just to check if we have lines, and there's others where we're manipulating the frame list; in the latter case we should have a frame list to manipulate. But I guess that still doesn't get us const& nsFrameList for GetChildList...
Right. And creating an nsFrameList when we don't need one is not a good idea, since it's an O(N) in number of frames operation now...
Priority: -- → P2
Priority: P2 → P3
Blocks: 76767
Assignee: bzbarsky → nobody
Severity: normal → S3

We've stored overflow in a FrameLines struct containing nsFrameList and nsLineList. This is done in bug 728908.

Re comment 4:

But I guess that still doesn't get us const& nsFrameList for GetChildList...

This is fixed by bug 728906.

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