Closed Bug 49938 Opened 25 years ago Closed 7 years ago

removing empty line boxes

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Keywords: memory-footprint)

We could probably save a bit of memory (not that much, though) by removing empty lineboxes that have only whitespace. When we have something like this: <div> <div></div> </div> the outer div has three line boxes: one for the initial whitespace, one for the inner div, and one for the final whitespace. We have no need for the first and third line boxes and the text frames they contain. Doing this would allow us to simplify a bit of code in layout (although we still have to be careful of line boxes with only placeholder frames). Perhaps it could be done on a pass at the end of frame construction. We would only want to do this if 'white-space' were not 'pre' or '-moz-pre-wrap', so we would have to make the whitespace property reframe, rather than just reflow (as I think it does now, although I'd have to check). I'm not sure if this is worth the gain for the first release, but it might be good to do sometime, so I'm filing a bug.
good idea, but not a big enough win to justify working on for the first release
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Build reassigning Buster's bugs to Marc.
Assignee: buster → attinasi
Status: ASSIGNED → NEW
Taking, although I think I have another bug on this somewhere (filed by rbs?) with some work.
Assignee: attinasi → dbaron
Component: Layout → Layout: Block & Inline
QA Contact: petersen → ian
OS: Linux → All
Hardware: PC → All
QA Contact: ian → layout.block-and-inline
The frame tree I get for the example in comment 0 is: Block(div)(0)@7fc8dfc51b30 {0,0,35640,0} < line 7fc8dfc51c90: count=1 < Block(div)(1)@7fc8dfc51be0 {0,0,35640,0} < > > >
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.