Re: [RC3] blocks-017 inaccurate height of wrapping div

http://test.csswg.org/suites/css2.1/20101027/html4/blocks-017.htm

http://test.csswg.org/suites/css2.1/20101027/xhtml1/blocks-017.xht


Le Ven 12 novembre 2010 5:33, Øyvind Stenhaug a écrit :
> On Thu, 11 Nov 2010 22:11:52 +0100, Gérard Talbot
> <css21testsuite@gtalbot.org> wrote:
>
>> Le Jeu 11 novembre 2010 4:22, Øyvind Stenhaug a écrit :
>>> On Wed, 10 Nov 2010 20:37:54 +0100, Gérard Talbot
>>> <css21testsuite@gtalbot.org> wrote:
>>>> 2- for reasons I do not understand, Opera 10.63 and Firefox 3.6.12
>>>> ignore the border-top-width and border-bottom-width around the 2
>>>> tables
>>>> in the tables' offsetHeight. Instead of returning 22px for the
>>>> offsetHeight, they return 20px for the 2 tables.
>>>
>>> They have "(-moz-)box-sizing: border-box" in their UA stylesheet.
>>> Relevant
>>> quote from CSS2.1 17.6.1:
>>>
>>> "However, in HTML and XHTML1, the width of the <table> element is the
>>> distance from the left border edge to the right border edge.
>>
>>
>> This is for width of the anonymous box and it is repeated in section
>> 17.4 ("(...) The width of the anonymous box is the border-edge width
>> of
>> the table box inside it (...).") [1].
>
> Regardless, the box-sizing property applies for both width and height.
>
>> The 2 tables have height: auto, not any specified height. The height
>> of
>> table box (element content box) with its borders (border belt, border
>> area) should be rendered distinctively regardless of type of
>> box-sizing
>> triggered. As it is, border-top-width and border-bottom-width are
>> substracted from the height of table box (or they are merged with the
>> height of table box): clientHeight of those table elements, even in
>> Opera 10.63, is 18px, not 20px.
>
> First of all, I can only make a limited amount of sense out of the table
> chapter, but all the browsers I have here include borders as part of the
> <table> height.
>
> Second, while the anonymous table boxes do have auto height, the <table>
> elements do not. The "div > *" rule sets it to 1em.


This vital information slipped out of my mind (importantissimo oversight
on my part) while editing the email. Sorry about that. Yes, height is
set to 1em, not auto.


>> Finally, 'display: block' set on the 2 table elements should make
>> their
>> used height furthermore convincing. box-sizing remains border-box
>> (unchanged) even though those 2 table elements should be displayed as
>> blocks.
>
> Not sure what you mean here. Yes, it remains 'border-box', since the UA
> stylesheet just targets <table> and can't limit itself to cases where
> 'display' is 'table'. So that means the height of the content box is
> expected to be 18px.


Again, you are correct here. I missed that too.


>> This particular testcase creates/triggers more issues than testing
>> well
>> only one single CSS issue. As I said before, one idea would be to
>> drop,
>> to remove the borders around the 4 black stripes in order to simplify
>> the testcase and make it more trustworthy. The testcase should be
>> about
>> CSS 2.1, not about how clientHeight or offsetHeight is calculated.
>
> Yes, that seems like a good idea, since the test seems to be about
> margin
> collapsing and not table height calculations.

Okay! :)

>
>> [1]: http://www.w3.org/TR/CSS21/tables.html#model
>> [2]: http://www.w3.org/TR/CSS21/tables.html#height-layout
>> [3]: border widths are subtracted from table's intrinsic width
>> https://bugzilla.mozilla.org/show_bug.cgi?id=96463

best 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 Friday, 12 November 2010 18:23:29 UTC