RE: [RC6] absolute-replaced-height-007, 014, 021, 028 and 035 require improvements, corrections

On Wednesday, September 05, 2012 8:30 PM Gérard Talbot wrote:
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-

> height-007.htm
> 
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-

> replaced-height-007.htm
> 
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-

> height-014.htm
> 
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-

> replaced-height-014.htm
> 
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-

> height-021.htm
> 
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-

> replaced-height-021.htm
> 
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-

> height-028.htm
> 
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-

> replaced-height-028.htm
> 
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-

> height-035.htm
> 
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-

> replaced-height-035.htm
> 
> 
> In those tests, the containing block's height is 'auto' and can be easily be
> resolved to 0 since there are no statically positioned and no relatively
> positioned elements inside such containing block.
> 
> These tests all claim to be testing a "height of containing block that cannot be
> resolved" kind of situation. But in section 10.5, we can read
> 
> "
>  (...)
>  the height of the containing block of an absolutely positioned
>  element is independent of the size of the element itself, and
>  thus a percentage height on such an element *_can always be
>  resolved_*.
>  However, it may be that the height is not known until elements
>  that come later in the document have been processed. "
>  http://www.w3.org/TR/CSS21/visudet.html#the-height-property

>  "
> 
> and so, the consequences of this, it seems, is that the height of the
> containing block of an absolutely positioned replaced element can be
> resolved.
> 
> I've made 3 tests (and also tried a few variations of it):
> 
> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/absolutely-

> replaced-height-007-GT.xht
> 
> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/absolute-

> replaced-height-014a-GT.xht
> 
> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/absolute-

> replaced-height-014a-GT.xht
> 
> and I have verified that these 3 tests are rendered the same by Firefox 15,
> Opera 12.02 and Chrome 21.0.1180.89. I have not checked with IE in any
> version.
> 
> 
> Also, in the assert text of absolute-replaced-height-007, 014, 021, 028 and 035
> tests, the expression "percentage based intrinsic height" is often written but,
> as far as I understand this, there is no such thing.
> 
> And as for the values 300px for width and 150px for height from section
> 10.6.2, which goes like this
> 
> "
> if 'height' has a computed value of 'auto', but none of the conditions above
> are met, then 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.
> "
> http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height

> 
> these values are, I believe, merely pre-defined-fallback used values. I do not
> believe they stand for intrinsic height or intrinsic width, the way this is
> defined in section 3.1 [2].
> 
> The assert text that says:
> 
> <meta name="assert" content="An absolutely positioned replaced element
> with a percentage height that cannot be resolved has no intrinsic height." />
> 
> is not to be found anywhere anyway in the spec. Usually, when a containing
> block dimensions is not resolvable, the usual consequences that it brings to
> the related element's dimensions is that it must assume the 'auto' value, not
> 0.
> 
> [2]:
> "
> Intrinsic dimensions
>     The width and height as defined by the element itself, not imposed by the
> surroundings. CSS does not define how the intrinsic dimensions are found. In
> CSS 2.1 only replaced elements can come with intrinsic dimensions. For raster
> images without reliable resolution information, a size of 1 px unit per image
> source pixel must be assumed.
> "
> http://www.w3.org/TR/CSS21/conform.html#defs

> 
> To sum up all this, I've put these 5 tests in the NeedsWork status
> 
> As always, I welcome feedback on any of this.
> 

I totally understand your confusion here. The spec was changed from the time these cases were written and the time the review happened. The section that is being tested at least for case 007 is in section 10.6.2. However, the exact text that still seems to be relevant is in an older version of the spec [1]. The last paragraphs of the older spec in section 10.6.2 are what case 007 is testing and I assume the others are testing similarly removed text.

Not sure how we want to handle a case. The case still seems like a valid case and is testing something that technically is a valid scenario that all browsers seem to follow correctly.

--
Thanks,
Arron Eicholz

[1] - http://www.w3.org/TR/2010/WD-CSS2-20101207/visudet.html#inline-replaced-height

Received on Wednesday, 5 December 2012 19:06:20 UTC