Bug 633072 - Fix reftests failure by using crispEdge drawing. r=dholbert

This commit is contained in:
Robert Longson 2011-05-15 09:30:17 +01:00
parent b665cd0082
commit 35696e1d47
7 changed files with 31 additions and 27 deletions

View File

@ -2,7 +2,7 @@
<html>
<body>
<svg style="width: 600px; height: 600px"
viewBox="0 0 100 100">
viewBox="0 0 100 100" shape-rendering="crispEdges">
<rect x="2" y="2" height="96" width="96"
stroke-width="4" stroke="black" fill="yellow"/>
<circle cx="50" cy="50" r="46" style="fill: blue"/>

View File

@ -2,7 +2,8 @@
<html>
<body>
<svg style="width: 200px; height: 600px"
viewBox="0 0 100 100" preserveAspectRatio="none">
viewBox="0 0 100 100" preserveAspectRatio="none"
shape-rendering="crispEdges">
<rect x="2" y="2" height="96" width="96"
stroke-width="4" stroke="black" fill="yellow"/>
<circle cx="50" cy="50" r="46" style="fill: blue"/>

View File

@ -1,7 +1,8 @@
<html>
<body>
<svg style="width: 200px; height: 200px"
viewBox="0 0 100 50" preserveAspectRatio="none">
viewBox="0 0 100 50" preserveAspectRatio="none"
shape-rendering="crispEdges">
<rect x="2" y="2" height="96" width="96"
stroke-width="4" stroke="black" fill="yellow"/>
<circle cx="50" cy="50" r="46" style="fill: blue"/>

View File

@ -44,11 +44,11 @@ fails == canvas-drawImage-slice-1b.html lime100x100-ref.html # XXX all edges fuz
# Simple <img> tests
== img-simple-1.html lime100x100-ref.html
== img-simple-2.html lime100x100-ref.html
fails-if(d2d) == img-simple-3.html img-simple-3-ref.html # bug 633072
== img-simple-3.html img-simple-3-ref.html
== img-simple-4.html lime100x100-ref.html
fails-if(d2d) == img-simple-5.html img-simple-5-ref.html # bug 633072
== img-simple-5.html img-simple-5-ref.html
== img-simple-6.html lime100x100-ref.html
fails-if(d2d) == img-simple-7.html img-simple-7-ref.html # bug 633072
== img-simple-7.html img-simple-7-ref.html
# Test with mix of <html:img> and <svg:image> referring to the same images,
# with a variety of preserveAspectRatio values in play.
@ -61,34 +61,34 @@ fails-if(Android) == img-and-image-1.html img-and-image-1-ref.svg
== img-foreignObject-embed-1.html lime100x100-ref.html
== img-foreignObject-embed-2.html lime100x100-ref.html
fails-if(Android) fails-if(d2d) == img-widthAndHeight-meet-1.html img-widthAndHeight-meet-1-ref.html # bug 633072
fails-if(Android) == img-widthAndHeight-meet-2.html img-widthAndHeight-meet-2-ref.html
fails-if(Android) fails-if(d2d) == img-widthAndHeight-slice-1.html img-widthAndHeight-slice-1-ref.html # bug 633072
fails-if(Android) fails-if(d2d) == img-widthAndHeight-slice-2.html img-widthAndHeight-slice-2-ref.html # bug 633072
== img-widthAndHeight-meet-1.html img-widthAndHeight-meet-1-ref.html
== img-widthAndHeight-meet-2.html img-widthAndHeight-meet-2-ref.html
== img-widthAndHeight-slice-1.html img-widthAndHeight-slice-1-ref.html
== img-widthAndHeight-slice-2.html img-widthAndHeight-slice-2-ref.html
fails-if(d2d) == img-height-meet-1.html img-height-meet-1-ref.html # bug 633072
fails-if(Android) == img-height-meet-2.html img-height-meet-2-ref.html
fails-if(d2d) == img-height-slice-1.html img-height-slice-1-ref.html # bug 633072
fails-if(Android) == img-height-slice-2.html img-height-slice-2-ref.html
== img-height-meet-1.html img-height-meet-1-ref.html
== img-height-meet-2.html img-height-meet-2-ref.html
== img-height-slice-1.html img-height-slice-1-ref.html
== img-height-slice-2.html img-height-slice-2-ref.html
fails-if(d2d) == img-width-meet-1.html img-width-meet-1-ref.html # bug 633072
fails-if(Android) == img-width-meet-2.html img-width-meet-2-ref.html
fails-if(d2d) == img-width-slice-1.html img-width-slice-1-ref.html # bug 633072
fails-if(Android) == img-width-slice-2.html img-width-slice-2-ref.html
== img-width-meet-1.html img-width-meet-1-ref.html
== img-width-meet-2.html img-width-meet-2-ref.html
== img-width-slice-1.html img-width-slice-1-ref.html
== img-width-slice-2.html img-width-slice-2-ref.html
# Alternate version of "width & height both non-%-valued" tests, but now
# with no explicit viewBox, to trigger "synthesize-viewBox" behavior
fails-if(d2d) == img-novb-widthAndHeight-meet-1-em.html img-novb-widthAndHeight-all-1-ref.html # bug 633072
fails-if(d2d) == img-novb-widthAndHeight-meet-1-px.html img-novb-widthAndHeight-all-1-ref.html # bug 633072
fails-if(d2d) == img-novb-widthAndHeight-slice-1-em.html img-novb-widthAndHeight-all-1-ref.html # bug 633072
fails-if(d2d) == img-novb-widthAndHeight-slice-1-px.html img-novb-widthAndHeight-all-1-ref.html # bug 633072
== img-novb-widthAndHeight-meet-1-em.html img-novb-widthAndHeight-all-1-ref.html
== img-novb-widthAndHeight-meet-1-px.html img-novb-widthAndHeight-all-1-ref.html
== img-novb-widthAndHeight-slice-1-em.html img-novb-widthAndHeight-all-1-ref.html
== img-novb-widthAndHeight-slice-1-px.html img-novb-widthAndHeight-all-1-ref.html
# Alternate versions of "only one dimension is non-%-valued" tests, but now
# with no explicit viewBox, to trigger "synthesize-viewBox" behavior
== img-novb-height-meet-1.html img-novb-height-all-1-ref.html
== img-novb-height-slice-1.html img-novb-height-all-1-ref.html
fails-if(d2d) == img-novb-width-meet-1.html img-novb-width-all-1-ref.html # bug 633072
fails-if(d2d) == img-novb-width-slice-1.html img-novb-width-all-1-ref.html # bug 633072
== img-novb-width-meet-1.html img-novb-width-all-1-ref.html
== img-novb-width-slice-1.html img-novb-width-all-1-ref.html
== list-simple-1.html list-simple-1-ref.html

View File

@ -1,5 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
width="100" height="100"
shape-rendering="crispEdges">
<rect x="2" y="2" height="96" width="96"
stroke-width="4" stroke="black" fill="yellow"/>
<circle cx="50" cy="50" r="46" style="fill: blue"/>

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 279 B

View File

@ -1,5 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="50">
width="100" height="50"
shape-rendering="crispEdges">
<rect x="2" y="2" height="96" width="96"
stroke-width="4" stroke="black" fill="yellow"/>
<circle cx="50" cy="50" r="46" style="fill: blue"/>

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 278 B

View File

@ -69,7 +69,7 @@ function generateSVGDataURI(aViewboxArr, aWidth, aHeight,
// prefix
var datauri = "data:image/svg+xml,"
// Begin the SVG tag
datauri += "%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22";
datauri += "%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20shape-rendering%3D%22crispEdges%22";
// Append the custom chunk from our params
datauri += generateSVGAttrsForParams(aViewboxArr, aWidth, aHeight,