W3C home > Mailing lists > Public > public-css-testsuite@w3.org > December 2010

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

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Wed, 29 Dec 2010 18:45:27 +0000
To: "css21testsuite@gtalbot.org" <css21testsuite@gtalbot.org>
CC: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <07349ECFC3608F48BC3B10459913E70B12B10EBC@TK5EX14MBXC140.redmond.corp.microsoft.com>
On Friday, December 03, 2010 8:08 PM Gérard Talbot wrote:
> 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.

Fixed, added padding to intermediary block.

--
Thanks,
Arron Eicholz
Received on Wednesday, 29 December 2010 18:46:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 29 December 2010 18:46:10 GMT