[css3-multicol] available-width = unknown and shrink-to-fit with spanning element

Hello,

[test]
http://test.csswg.org/source/contributors/opera/submitted/multicol/multicol-span-all-margin-nested-003.xht

In this test, the available width is unknown. So, we start with

(09)  if (available-width = unknown) then
(10)    available-width := shrink-to-fit;
3.4. Pseudo-algorithm
http://www.w3.org/TR/css3-multicol/#pseudo-algorithm

and then follow and apply:

shrink-to-fit width is:

min(max(preferred minimum width, available width), preferred width).

http://www.w3.org/TR/CSS21/visudet.html#shrink-to-fit-float

in which case:

min(max(preferred minimum width, available width), preferred width)
min(max(4em, body's available width), 19em)
min(body available width, 19em)
and so shrink-to-fit width should be 19em (which is 4 FAIL words separated
with 3 preserved white spaces).

Then what do we do with the rest of the pseudo-algorithm? Should we
continue with calculation of column box width?

(13)    W := max(0, (available-width - ((N - 1) * column-gap)) / N);

I ask because the reftest
http://test.csswg.org/source/contributors/opera/submitted/multicol/multicol-span-all-margin-nested-3-ref.xht
for the test gives a total width for the multi-column of 22em and not
19em. So where does such 22em comes from? Normally, the available-width
includes the column-gapS: that's why the equation at line 13 substracts
the column-gapS before dividing by number of columns.

If 19em should be the correct width for the black rectangular area, then
(after adding -webkit- vendor prefix) Chrome 28 would pass that test .

---------

I have been working on 2 other versions/variations [1] of that test. I can
see what Chrome 28 and Opera 12.16 do ... but I can not figure out which
one is right or wrong: any of the 2 could be right or wrong. I think the
pseudo-algorithm needs some tuning here.



[1]
[test variation A]
http://www.gtalbot.org/BrowserBugsSection/CSS3Multi-Columns/Opera/multicol-span-all-margin-nested-003-GT.xht

[reftest variation A]
http://www.gtalbot.org/BrowserBugsSection/CSS3Multi-Columns/Opera/multicol-span-all-margin-nested-003-GT-ref.xht


[test (old version)]
http://www.gtalbot.org/BrowserBugsSection/CSS3Multi-Columns/multicol-span-all-margin-nested-003-GT-previous.xht

[reftest (old version)]
http://www.gtalbot.org/BrowserBugsSection/CSS3Multi-Columns/multicol-span-all-margin-nested-003-GT-previous.xht

Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Tuesday, 20 August 2013 21:28:15 UTC