gecko-dev/layout/reftests/pagination/border-breaking-000-cols.xhtml
Jeff Muizelaar c832680e15 Bug 584515. Fix border-breaking-000-cols.xhtml on D2D. r=roc
We are running into rasterization inaccuracies here.

This test draws green circles on a green rectangle and assumes that the result
will be solid green.

Here's what happens with D2D:

D2D computes coverage values in floating point so assume that we get a coverage
of about 0.112399 or 0.112399*255 == 28.6

green (128/255 == 0.50196) is multiplied by the coverage to get 0.0564702 or
.0564702*255 == 14.39

the results of the pixel shader get rounded before blending. So we get
(r=0,g=14,b=0,a=29)

blending this OVER green gives:

14+(255-29)*128/255 == 127 instead of 128.

This doesn't happen with other backends because they typically use integer
coverage amounts.

We fix it by using '&nbsp' instead of '.'
2010-08-08 15:54:24 -04:00

42 lines
802 B
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pagination with Borders</title>
<style type="text/css">
.container {
padding-bottom: 10px;
border-bottom: 10px solid transparent;
}
.box {
background: green;
}
p {
font-size: 150px;
line-height: 1;
margin: 0;
}
p + p {
height: 200px;
}
body {
height: 200px;
width: 300px;
-moz-column-width: 150px;
-moz-column-gap: 0;
border: solid silver;
border-style: none solid;
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</body>
</html>