W3C home > Mailing lists > Public > www-style@w3.org > October 2010

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 28 Oct 2010 09:46:07 -0400
Message-ID: <4CC97E9F.9070003@mit.edu>
To: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
CC: WWW Style <www-style@w3.org>
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...

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:40 UTC