[RC6] c548-leadin-000 is imprecise

Hello,

I have been trying to create a reftest for:

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/c548-leadin-000.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/c548-leadin-000.htm


line  10    div { font: 25px Ahem; line-height: 50px; width: 3em; color:
lime; background: green; border: solid black; }

line  11    span { background-color: red; }


With such values, it is not predictable (although maybe possible to
establish how browsers handle this) how tall is going to be the
top-half-leading and the bottom-half-leading: it could be 12px or 13px.

a) top-half-leading and bottom-half-leading could be respectively: 12px
and 12px
or
b) top-half-leading and bottom-half-leading could be respectively: 12px
and 13px
or
c) top-half-leading and bottom-half-leading could be respectively: 13px
and 12px
or
d) top-half-leading and bottom-half-leading could be respectively: 13px
and 13px

After time spent with Firefox's DOM inspector, Opera DragonFly, Chrome
Web Inspector (and by doing maths with offsetTop, offsetHeight, metrics
of rendered layout) it seems that option b) is chosen by such 3
browsers:
top-half-leading and bottom-half-leading is respectively: 12px and 13px.

The div has an offsetTop of 51px while the span has an offsetTop of 66px:

  66px (offsetTop of span)
- 51px (offsetTop of div)
-  3px (border-top-width of black border)
=======
  12px (height of green gap between topmost black
        border and 1st bright green stripe)

The bottommost green gap (between 2nd lime stripe and the black
border-bottom) can also be measured by doing maths in the same manner
with some offset values provided by webpage debugger tools.


But such manner of spliting 25px in 2 is not an ensured and predictable
outcome in browsers.

Proposed solution:
    10    div { font: 26px Ahem; line-height: 50px; width: 3em; color:
lime; background: green; }

--------

border: solid black;

The issue with such black border has been mentioned in
http://test.csswg.org/shepherd/testcase/c545-txttrans-000/#event-4
and also in
http://lists.w3.org/Archives/Public/public-css-testsuite/2010Oct/0137.html

Since such black border does not participate, is not involved in the
test itself, then I think we should remove it.

regards, 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 Monday, 16 January 2012 00:23:22 UTC