RE: [RC6] absolute-non-replaced-height-001: difficult text assert and removing such test

On Monday, August 27, 2012 6:56 PM Gérard Talbot wrote:
> 
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-non-replaced-

> height-001.htm
> 
> 
> line 8 <meta name="assert" content="The calculation of static position is
> based on initial containing block when there is a fixed positioned element."
> />
> 
> There are 2 ideas (somewhat confused and mixed up) expressed in that
> assert text:
> 
> 1st idea is that the containing block of an element with its 'position'
> set to 'fixed' is the viewport; the initial containing block has the dimensions of
> the viewport.
> 
> "
> If the element has 'position: fixed', the containing block is established by the
> viewport "
> 10.1 Definition of "containing block"
> http://www.w3.org/TR/CSS21/visudet.html#containing-block-details

> 
> 2nd idea is that static position is given, is determined "by the distance from
> the top edge of the containing block to the top margin edge of a hypothetical
> box that would have been the first box of the element if its specified
> 'position' value had been 'static' and its specified 'float' had been 'none' and
> its specified 'clear' had been 'none'."
> 10.6.4 Absolutely positioned, non-replaced elements
> http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height

> 
> The inner div in the test has 'top: auto' and 'left: auto' ... although the test
> code does not explicitly declare those.
> 
> The test assert text does not make sense.
> 
> The static position for any absolutely positioned element (with
> 'position: absolute' or with 'position: fixed') is still the same: it is given,
> determined "by the distance from the top edge of the containing block to
> the top margin edge of a hypothetical box that would have been the first box
> of the element if its specified 'position' value had been 'static' and its
> specified 'float' had been 'none' and its specified 'clear' had been 'none'."
> The static position for an element with 'position: absolute' or with
> 'position: fixed' is given by the position it would have had in normal flow.
> 
> The 'position: fixed' in the test has no relation, no incidence on the test.
> 
> It is only when and if box offsets (top, left, bottom, right) are non-auto and
> computable that we need to take into consideration what is its containing
> block (according to section 10.1).
> 
> I have examined the test and I have no idea how to rehabilitate it, no
> proposal for replacement. The goal/purpose/target/pursued idea of the test
> is just not clear to me.
> 
> I believe this test should be removed.

The test should not be removed I think the test is perfectly fine and the assert is correct per the section it is testing. Though maybe we could adjust the assert a little if we think it is still unclear.

The spec section that is being tested here is a specific sentence in the spec, section 10.3.7.

"For the purposes of calculating the static position, the containing block of fixed positioned elements is the initial containing block instead of the viewport, and all scrollable boxes should be assumed to be scrolled to their origin."

The test is verifying the first part of this sentence up to the comma.

--
Thanks,
Arron Eicholz

Received on Tuesday, 28 August 2012 16:23:27 UTC