[RC6] Weakness of coverage of section 10.6.2; inline-replaced-height-007

Arron,

http://test.csswg.org/suites/css2.1/20110323/html4/inline-replaced-height-007.htm
(RC6)

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/inline-replaced-height-007.htm


        <meta name="assert" content="An inline replaced elements with a
percentage height that cannot be resolved has no intrinsic
height.">

That's not true. I think the assert confuses how to resolve a percentage
height and intrinsic height. Resolving a percentage height is one thing;
having or not an intrinsic height is another and an independent issue
apart, separate from resolving a percentage height.

The meta assert should have been saying rather something like

<meta name="assert" content="If the height of an inline replaced element
is a percentage value and such inline replaced element's containing
block has no height specified explicitly, then the height of such inline
replaced element must be computed as 'auto'. If such inline replaced
element has an used width and an intrinsic ratio, then its (used) height
can be resolved, figured out; otherwise - like in this testcase - the
used value of 'height' must be set to the height of the largest
rectangle that has a 2:1 ratio, has a height not greater than 150px, and
has a width not greater than the device width.">

Maybe it's too wordy, too verbose; it could be more terse.

--------

Assume this code and webpage situation:

The body content box is 1024px minus 8px*2 (body margin left and margin
right) - 18px for vertical scrollbar == 990px wide (available width of
body content box)

Assume that some-blue-box has an intrinsic dimensions of 100px width by
200px height (therefore an intrinsic ratio of 0.5)

<body>

 <div>
   <img src="some-blue-box.png" style="width: 20%; height: 1%;" alt="">
 </div>

then 'height: 1%' is computed as 'auto' (according to §10.5) since the
height of body content box is not specified explicitly.

Then the blue box should occupy a width of 990 mult 0.2 == 198px (used
width) and its height should be 396px because

"
if 'height' has a computed value of 'auto', and the element has an
intrinsic ratio then the used value of 'height' is:

    (used width) / (intrinsic ratio).
"
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height

There are no testcases in section 10.6.2 testing such kind of scenario
for inline replaced element (typically an <img>), for inline-block
replaced element (<object>), etc.

---------

I have a meta-testcase (30 tests) for section 10.6.2 for better
coverage. I will submit a few testcases later this month.

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

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

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/

Received on Friday, 3 June 2011 03:30:11 UTC