RE: [RC3] containing-block-017 and containing-block-003 not testing what they are supposed to test

Le Mer 1 décembre 2010 18:27, Arron Eicholz a écrit :
> On Friday, November 19, 2010 12:13 PM Gérard Talbot wrote:
>> what they are supposed to test
>>
>> Hello,
>>
>>
>> http://test.csswg.org/suites/css2.1/20101027/html4/containing-block-
>> 017.htm
>>
>> http://test.csswg.org/suites/css2.1/20101027/xhtml1/containing-block-
>> 017.xht
>>
>> http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_10
>> /containing-block-017.xht
>>
>> 1-
>>         <meta name="assert" content="The containing block is formed by
>> the
>> padding edge for block-level elements." />
>>
>> I think the meta assert should be more precise and say:
>>
>>         <meta name="assert" content="The containing block of an
>> absolutely
>> positioned block-level element is formed by the padding edge of its
>> nearest
>> (closest) positioned ancestor element." />
>>
>> 2- As coded, the testcase positions the innermost span (styled as
>> block) at
>> 'top: auto' and 'left: auto' (and not some specified value which would
>> then be
>> related to padding box of nearest positioned ancestor) which is the
>> top & left
>> position it would have had if it had been positioned statically. Now,
>> that
>> position is given by its outer-parent span (#span1) which also
>> coincide with
>> the upper-left corner content box of the wrapping rel-pos <div>. So,
>> while
>> the testcase says/refers to the padding box, the testcase actually
>> positions
>> the innermost span in the content box of its nearest (closest)
>> positioned
>> ancestor element. It's awkward and at first sight contradicts the
>> purpose of
>> the testcase



            div
            {
                border: solid black;
                padding: 1in;
                position: relative;
                width: 0;
            }
            span
            {
                display: block;
            }
            #span1
            {
                direction: ltr;
            }
            span span
            {
                background: blue;
                height: 1in;
                position: absolute;
                width: 1in;
            }
        </style>
    </head>
    <body>
        <p>Test passes if the blue box is in the lower-right corner of
the black box.</p>
        <div>
            <span id="span1">
                <span></span>
            </span>

        </div>


Arron,

The testcase is still awkward, not cleanly and not clearly targeting,
testing the purpose of the testcase.

Ideally, for testing purposes rigorously, you would also want the
outer-parent span (#span1: the intermediary block) to have a width and
height and padding box too, in order to really challenge user agents'
implementation (on how accurately they figure out/establish the
containing block of an absolutely positioned block-level element).

The innermost span has top: auto and left: auto; so its top-left
position has no relationship with the nearest positioned ancestor
element's padding-box.

That testcase is definitely not best, not ideal IMO.

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

CSS 2.1 test suite (RC3; October 27th 2010):
http://test.csswg.org/suites/css2.1/20101027/html4/toc.html

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

Received on Saturday, 4 December 2010 04:08:39 UTC