Re: [css3-box] Issue with the current shrink to fit algorithm

On 10/28/10 7:52 AM, Giuseppe Bilotta wrote:
> Therefore, I propose the following small change to the shrink to fit
> algorithm: the preferred width should be computed by considering not
> only the explicit linebreaks, but also the ones that would occur if
> the width matched the containing block width.

Determining the latter involves doing a full layout on all the 
descendants, no?  And if you have nested shrink-wrap containers, doing 
that a number of times that's exponential in the nesting depth?

> (2) find the preferred width by formatting the content as if the width
> was set to the available width

Gecko used to do this.  It turns out that it causes performance 
nightmares and _still_ gives "incorrect" results in many cases.  The set 
of cases where this behavior helps is very small...

-Boris

Received on Thursday, 28 October 2010 13:46:42 UTC