Re: Tests which are dependent on local fonts and how 'line-height: normal' is computed

Le Mer 18 avril 2012 20:31, "Gérard Talbot" a écrit :
> Arron,
> There are more and more tests which I am having difficulties doing
reftests because
> 1- they are dependent on how tall the line-height of the pass/fail
conditions sentence <p> is: this varies from one font to another.
E.g.:
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-attachment-applies-to-001.htm
The amount of blue that we can see depends on the local font used. If
I
> use "DejaVu Serif", then line-height of <p> will be 19px. Therefore
the
> amount of blue will be:
>     16px : body's margin-top collapsing with p's margin-top
>   +
>     19px : line-height of p
>   +
>     16px : margin-bottom of p
>   ========
>     51px
> which will be substracted from the blue's height (96px) == 45px
> but if I use "FreeSerif" font, then p's line-height: normal is going
to
> be computed as 20px ... which will affect the calculation of the
height
> of the blue rectangle that is going to be rendered.
> Depending on the font used, the height of the blue rectangle can vary
from 43px (rare and unlikely but possible), 44px (eg FreeSerif), 45px
(DejaVu Serif).
> 2- Another issue is that the number of line boxes of the pass/fail
conditions <p> can become 2 if viewport width is set to minimum 640px;
again, this would make an ordinary reftest wrong.
> -----------
> The solution I see + propose is to break the pass/fail condition into
2
> line boxes when the pass/fail conditions sentence is long and then set
p {line-height: 1.25em;}
> The only way to create a reliable reftest is to control the height of
line boxes.


Arron,

I have modified 12 of those background-attachment-applies-to-*
accordingly so that line-height of <p> sentence would be reliable,
accurate and so that the associated reftest would be reliable when
viewed in a 640px wide viewport.

changeset 3132:e566594c207c

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 Saturday, 21 April 2012 00:40:40 UTC