[RC6] border-width-applies-to-001 and 007: 3 unneeded declarations

Arron,

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/border-width-applies-to-001.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/border-width-applies-to-001.htm

1-
line 22    margin: 1in;

I see no reason for such 'margin: 1in'.

"
UAs must compute an initial left and right border width for the table by
examining the first and last cells in the first row of the table. The
left border width of the table is half of the first cell's collapsed
left border, and the right border width of the table is half of the last
cell's collapsed right border. If subsequent rows have larger collapsed
left and right borders, then any excess spills into the margin area of
the table.
"
17.6.2 The collapsing border model
http://www.w3.org/TR/CSS21/tables.html#collapsing-borders

Since there is only 1 table row, then there can not be any excess
spilling out toward the left. So, 'margin: 1in' is not needed.

2-
line 21:   height: 1in;

"
The top border width of the table is computed by examining all cells who
collapse their top borders with the top border of the table. The top
border width of the table is equal to half of the maximum collapsed top
border. The bottom border width is computed by examining all cells whose
bottom borders collapse with the bottom of the table. The bottom border
width is equal to half of the maximum collapsed bottom border.
"
17.6.2 The collapsing border model
http://www.w3.org/TR/CSS21/tables.html#collapsing-borders

The maximum collapsed top border is 1in; so, the top border width of the
table should be 0.5in.
The maximum collapsed bottom border is 1in; so, the bottom border width
of the table should be 0.5in.

So, this leaves 1in in height for the cell and the 2 halves of the
maximum collapsed top and bottom borders. So the table height should be

 0.5in: half of the maximum collapsed top border
+
 1in: height set for the cell
+
 0.5in: half of the maximum collapsed bottom border
================
 2in

So, line 21: height: 1in can not be honored.
Chrome 19.0.1084.56 (computed height value of table is 192px) agrees
with my reasoning here; I do not have IE9.0.7.

So, line 21: height: 1in can be safely removed IMO as it gets overruled
by the explanations given in 17.6.2 and in 17.5.3.

3-
line 27:    width: 1in;

"
The left border width of the table is half of the first cell's collapsed
left border, and the right border width of the table is half of the last
cell's collapsed right border.
"
17.6.2 The collapsing border model
http://www.w3.org/TR/CSS21/tables.html#collapsing-borders

So, the table width should be:

 0.5in: half of the sole cell's collapsed left border
+
 1in: the sole cell's width
+
 0.5in: the sole cell's collapsed right border
==================
 2in

"
The width of the table is then the greater of the value of the 'width'
property for the table element and the sum of the column widths (plus
cell spacing or borders).
"
17.5.2.1 Fixed table layout
http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout

So the table width should be 2in and the line 27 declaration can not be
honored. Chrome 19.0.1084.56 (computed width value of table is 192px)
agrees with my reasoning here.

So, line 27: width: 1in can be safely removed IMO as it gets overruled
by the explanations in 17.6.2 and in 17.5.2.1.



The same would have to be carried over to
border-width-applies-to-002, 003, 004, 005, 006 tests.

---------------

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/border-width-applies-to-007.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/border-width-applies-to-007.htm

This time, calculations are easier since

"
The width of the table is the distance from the left inner padding edge
to the right inner padding edge (including the border spacing but
excluding padding and border).
"

and the cell has

line 24:    #cell
            {
                border-style: solid;
                border-width: 1in;
                display: table-cell;
                height: 1in;
                width: 1in;
            }

and here again:

"
The width of the table is then the greater of the value of the 'width'
property for the table element and the sum of the column widths (plus
cell spacing or borders).
"
17.5.2.1 Fixed table layout
http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout

So, the table width should be 3in and its height 3in (Chrome 19 agrees
with my reasoning); therefore lines 15 and 18 can not be honored and are
overriden:

            #table
            {
                display: table;
line 15:        height: 1in;
line 16:        margin: 1in;
                table-layout: fixed;
line 18:        width: 1in;
            }

Therefore, here too, I propose to remove lines 15, 16 and 18.

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, 26 June 2012 03:15:14 UTC