W3C home > Mailing lists > Public > public-css-testsuite@w3.org > March 2012

Reftests and Subpixel layout

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 16 Mar 2012 17:42:48 -0700
Message-ID: <4F63DE08.2080503@inkedblade.net>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>, "L. David Baron" <dbaron@dbaron.org>
Gérard's been running into a number of issues affecting the creation of
reftests due to the fact that Firefox does subpixel-precision layout and
the font APIs on Linux only return pixel-precision data. The workaround
for this seems to be to use fonts at sizes where it is known their metrics
land on whole-pixel sizes.

Many of our self-describing tests suffer from this problem. Their pass/
fail results can be determined accurately, but creating a pixel-perfect
reference is difficult or impossible without altering the original test.
Similar issues probably exist anywhere there is inconsistent pixel-rounding.
For example, Firefox rounds border widths with different rules than it
rounds box heights, making a reftest comparison between a solid border
and a solid-color fixed-height block meaningless if their sizes involve
fractional pixels.

Which brings us to a suggestion from Jet: to require tests, insofar as
possible, to align their layout to the px grid, so that they can be
reliably associated to a reference.

Is this something we want to do? It will drastically reduce our test
coverage of pixel rounding. If not, what is the alternative?

~fantasai
Received on Saturday, 17 March 2012 00:43:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 17 March 2012 00:43:25 GMT