RE: [css3 multicol] Bug in line 21 of the pseudo-algorithm?

When I changed WebKit to match the newer pseudo algorithm, I hit a compatibility issue with existing multi-column content.  The specific compatibility issue is with line 21 of the pseudo algorithm, and it occurs when an author specifies both a column-count and a column-width inside an element whose available width is known.
The case in question is:
(19)  if (column-width != auto) and (column-count != auto) then
(20)    N := min(column-count, floor((available-width + column-gap) / (column-width + column-gap)))
(21)    W := ((available-width + column-gap) / N) - column-gap;
(22)  exitLine 21 is causing the incompatibility for us, and I think there is a mistake here. When both column-count and column-width are specified, I would not expect the column-width to be increased just to fill an available width. It seems to me that the line in question should actually be:
(21)    W := min(column-width, ((available-width + column-gap) / N) - column-gap)With this change, the column-width and column-count both act as maximum allowed values, rather than only having the column-count act as a maximum allowed value. This makes more sense to me, since if an author specifies width:600px, column-count:2; column-width:200px, it's odd to me that the columns would grow to be nearly 300px wide. The author's intent is pretty clear here, so we should honor it, even if it leaves leftover space.
dave(hyatt@apple.com)

Perhaps this is why it is written that way?  (If I misunderstand this whole thing, sorry about that.)
Summary: Is it saying the columns must fill up the space even if a column-width is set?
http://www.w3.org/TR/css3-multicol/#cw
<length>

   describes the optimal column width. The actual column width may be
    wider (to fill the available space), or narrower (only if the available
    space is smaller than the specified column width). Specified values must
    be greater than 0.
  http://www.w3.org/TR/css3-multicol/#cc
<integer>

   describes the optimal number of columns into which the content of the
    element will be flowed. Values must be greater than 0. If both ‘column-width’
    and ‘column-count’ have non-auto values, the
    integer value describes the maximum number of columns.
  
 		 	   		  

Received on Friday, 18 November 2011 03:41:17 UTC