L. David Baron wrote:
> On Friday 2006-04-28 12:31 +1200, Robert O'Callahan wrote:
>> I think a better way would be to simply allow the text frame to finish
>> reflow with status 'complete', but record in nsLineLayout (or elsewhere)
>> that there's a potential line break before the last word. When line
>> layout eventually runs out of available space, we notice that we had a
>> potential line break earlier, and reflow the line again, forcing the
>> text frame to break at the last saved line break position. I think this
> 
> Why do we need to reflow the line again?  Why can't we just break the
> frames at the earlier position and *not* reflow the line again -- just
> do vertical/horizontal alignment of the line.

That would require going back and splitting the textframe and its inline
containers and putting the continuations in the right places,
recalculating the metrics for the modified frames, and also undoing
float placement if any. It's a lot simpler just to reflow the line
again. It's not a full line reflow because we don't do horizontal and
vertical alignment etc, and it only happens when a multi-frame word
crosses the line end boundary after the first frame, so I don't think
it'll be a performance issue.

Rob
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to