Reftests and Subpixel layout

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 UTC