line-height-bleed-003 has incorrect pass condition

These tests:
http://test.csswg.org/suites/css2.1/20101001/html4/line-height-bleed-003.htm
http://test.csswg.org/suites/css2.1/20101001/xhtml1/line-height-bleed-003.xht
have an incorrect pass condition since they make incorrect
assumptions about font metrics.  Per 10.6.1:
http://www.w3.org/TR/CSS21/visudet.html#inline-non-replaced :
  The height of the content area should be based on the font, but
  this specification does not specify how. A UA may, e.g., use the
  em-box or the maximum ascender and descender of the font.

The specification assumes that the line separation (which comes from
the 1em line-height on the div) is the same size as the height of
the content area.  Depending on the font (and, in Gecko's case, its
maximum ascender and descender), this may not be the case, which
causes the top of the glyphs in the second line of text to be
slightly above the blue box, since the content area heights of the
two lines of text overlap somewhat.

I'd recommend either relaxing the pass condition to allow the top of
the glyphs to extend out of the blue box or redesigning the test
using the Ahem font.  (Based on the test assert, I think the
important part of the pass condition is that the top line of text is
entirely above the blue box.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Saturday, 16 October 2010 00:21:02 UTC