mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 614649, patch 2: Tweak/repurpose some existing svg-as-an-image reftests, in light of their (intentionally) different rendering as a result of this bug's patch. r=roc a=tests
--HG-- rename : layout/reftests/svg/as-image/squaredCircle-viewBox-100x100.svg => layout/reftests/svg/as-image/squaredCircle-100x100.svg rename : layout/reftests/svg/as-image/squaredCircle-viewBox-100x100.svg => layout/reftests/svg/as-image/squaredCircle-100x50.svg
This commit is contained in:
parent
acd9183d26
commit
93999810e7
11
layout/reftests/svg/as-image/img-simple-3-ref.html
Normal file
11
layout/reftests/svg/as-image/img-simple-3-ref.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<svg style="width: 600px; height: 600px"
|
||||
viewBox="0 0 100 100">
|
||||
<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"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
<!-- Note: Despite the large width here, the SVG content won't scale, because
|
||||
it hasn't provided a viewbox. It renders at a 100% zoom-level (just as
|
||||
it would in an <embed> tag, and just as it would if we viewed it in a
|
||||
100x600-sized browser window. -->
|
||||
<img src="lime100x100.svg" width="600px">
|
||||
<!-- This image scales uniformly, preserving its aspect ratio, to be
|
||||
600x600. Though the SVG content doesn't have a viewBox, we behave as if
|
||||
it did when it's used as an image, since it has non-percent-valued
|
||||
height and width attributes on the root svg node. -->
|
||||
<img src="squaredCircle-100x100.svg" width="600px">
|
||||
</body>
|
||||
</html>
|
||||
|
11
layout/reftests/svg/as-image/img-simple-5-ref.html
Normal file
11
layout/reftests/svg/as-image/img-simple-5-ref.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<svg style="width: 200px; height: 600px"
|
||||
viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<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"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<img src="lime100x100.svg" width="150px" height="600px">
|
||||
<!-- Like img-simple-3, but with height != width on the img element. -->
|
||||
<img src="squaredCircle-100x100.svg" width="200px" height="600px">
|
||||
</body>
|
||||
</html>
|
||||
|
10
layout/reftests/svg/as-image/img-simple-7-ref.html
Normal file
10
layout/reftests/svg/as-image/img-simple-7-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<body>
|
||||
<svg style="width: 200px; height: 200px"
|
||||
viewBox="0 0 100 50" preserveAspectRatio="none">
|
||||
<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"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<!-- Like img-simple-6.html, but with an explicit 'height' on the <img> -->
|
||||
<img src="lime200x100.svg" width="100px" height="100px">
|
||||
<!-- Like img-simple-3, but with height != width on the root SVG node. -->
|
||||
<img src="squaredCircle-100x50.svg" width="200px" height="200px">
|
||||
</body>
|
||||
</html>
|
||||
|
4
layout/reftests/svg/as-image/lime50x25.svg
Normal file
4
layout/reftests/svg/as-image/lime50x25.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
width="50" height="25">
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
</svg>
|
After Width: | Height: | Size: 139 B |
@ -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
|
||||
== img-simple-3.html lime100x100-ref.html
|
||||
fails-if(d2d) == img-simple-3.html img-simple-3-ref.html
|
||||
== img-simple-4.html lime100x100-ref.html
|
||||
== img-simple-5.html lime100x100-ref.html
|
||||
fails-if(d2d) == img-simple-5.html img-simple-5-ref.html
|
||||
== img-simple-6.html lime100x100-ref.html
|
||||
== img-simple-7.html lime100x100-ref.html
|
||||
fails-if(d2d) == 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.
|
||||
|
6
layout/reftests/svg/as-image/squaredCircle-100x100.svg
Normal file
6
layout/reftests/svg/as-image/squaredCircle-100x100.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
width="100" height="100">
|
||||
<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"/>
|
||||
</svg>
|
After Width: | Height: | Size: 245 B |
6
layout/reftests/svg/as-image/squaredCircle-100x50.svg
Normal file
6
layout/reftests/svg/as-image/squaredCircle-100x50.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
width="100" height="50">
|
||||
<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"/>
|
||||
</svg>
|
After Width: | Height: | Size: 244 B |
Loading…
Reference in New Issue
Block a user