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

Le Mar 28 août 2012 12:22, Arron Eicholz a écrit :
> 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.

That same sentence exists in secton 10.6.4.
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height

As for the statement saying that the containing block of a fixed element
being the initial containing block instead of the viewport, I fail to
see
1) what's so significant and important with such statement; by
definition, the initial containing block has the dimensions of the
viewport.
2) how the test is testing such statement; if the tester is not invited
to scroll the page, then such test does not demonstrate this
3) the test sets to zero the html, body and p margins for no reasons, at
least, none related and not important to the test
4) the viewport per se can never be a containing block the way the spec
defines "containing block" for positioning purposes. That's why the spec
uses a slightly different wording: "is" does not have exactly the same
meaning of "is established". "Initial containing block" is just a CSS
concept creating the bridge between viewport application and CSS spec.

"
Fixed positioning is a subcategory of absolute positioning. The only
difference is that for a fixed positioned box, the containing block is
established by the viewport.
"
CSS 2.1, section 9.6.1 Fixed positioning
http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning

In the test, the blue square touches (and is supposed to be touching)
the upper-left corner of the black box because this is how+where the
blue square should be positioned in normal flow to begin with.

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 harness:
http://test.csswg.org/harness/

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

Received on Tuesday, 28 August 2012 17:54:11 UTC