From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../svg/image/blueRect10x10-viewBox-animPAR.svg | 12 ++ .../reftests/svg/image/blueRect10x10-viewBox.svg | 7 + layout/reftests/svg/image/blueRect10x10.png | Bin 0 -> 125 bytes layout/reftests/svg/image/blueRect10x10.svg | 6 + layout/reftests/svg/image/image-fill-01.svg | 13 ++ .../reftests/svg/image/image-fill-opacity-ref.html | 4 + layout/reftests/svg/image/image-fill-opacity.html | 4 + layout/reftests/svg/image/image-filter-01-ref.svg | 9 ++ layout/reftests/svg/image/image-filter-01.svg | 21 +++ layout/reftests/svg/image/image-load-01.svg | 20 +++ layout/reftests/svg/image/image-opacity-01-ref.svg | 5 + layout/reftests/svg/image/image-opacity-01.svg | 6 + layout/reftests/svg/image/image-opacity-02-ref.svg | 6 + layout/reftests/svg/image/image-opacity-02.svg | 7 + .../image/image-preserveAspectRatio-01-raster.svg | 13 ++ .../svg/image/image-preserveAspectRatio-01-ref.svg | 9 ++ .../svg/image/image-preserveAspectRatio-01-svg.svg | 12 ++ .../image/image-preserveAspectRatio-02-raster.svg | 13 ++ .../svg/image/image-preserveAspectRatio-02-ref.svg | 9 ++ .../svg/image/image-preserveAspectRatio-02-svg.svg | 12 ++ .../svg/image/image-preserveAspectRatio-03-ref.svg | 13 ++ .../svg/image/image-preserveAspectRatio-03.svg | 13 ++ .../svg/image/image-preserveAspectRatio-04-ref.svg | 14 ++ .../svg/image/image-preserveAspectRatio-04.svg | 13 ++ .../svg/image/image-preserveAspectRatio-05.svg | 41 +++++ layout/reftests/svg/image/image-rotate-01-ref.svg | 5 + layout/reftests/svg/image/image-rotate-01.svg | 6 + layout/reftests/svg/image/image-rotate-02-ref.svg | 5 + layout/reftests/svg/image/image-rotate-02a.svg | 6 + layout/reftests/svg/image/image-rotate-02b.svg | 7 + layout/reftests/svg/image/image-scaling-01.svg | 26 ++++ layout/reftests/svg/image/image-scaling-02.svg | 26 ++++ layout/reftests/svg/image/image-scaling-03.svg | 19 +++ layout/reftests/svg/image/image-svg-inline-01.html | 16 ++ .../image-svg-inline-sprite-zoom-in-01-ref.html | 8 + .../image/image-svg-inline-sprite-zoom-in-01a.html | 16 ++ .../image/image-svg-inline-sprite-zoom-in-01b.html | 15 ++ .../image-svg-inline-sprite-zoom-out-01-ref.html | 8 + .../image-svg-inline-sprite-zoom-out-01a.html | 16 ++ .../image-svg-inline-sprite-zoom-out-01b.html | 15 ++ .../svg/image/image-svg-inline-zoom-in-01a.html | 17 ++ .../svg/image/image-svg-inline-zoom-in-01b.html | 16 ++ .../svg/image/image-svg-inline-zoom-in-01c.html | 18 +++ .../svg/image/image-svg-inline-zoom-in-01d.html | 18 +++ .../svg/image/image-svg-inline-zoom-out-01a.html | 16 ++ .../svg/image/image-svg-inline-zoom-out-01b.html | 16 ++ .../svg/image/image-svg-inline-zoom-out-01c.html | 17 ++ .../svg/image/image-svg-inline-zoom-out-01d.html | 17 ++ .../reftests/svg/image/image-translate-01-ref.svg | 5 + layout/reftests/svg/image/image-translate-01.svg | 6 + .../svg/image/image-with-following-content.svg | 12 ++ .../svg/image/image-with-mask-and-clipPath.svg | 13 ++ layout/reftests/svg/image/image-x-01-ref.svg | 5 + layout/reftests/svg/image/image-x-01.svg | 6 + layout/reftests/svg/image/image-xy-01-ref.svg | 5 + layout/reftests/svg/image/image-xy-01.svg | 7 + layout/reftests/svg/image/image-y-01-ref.svg | 5 + layout/reftests/svg/image/image-y-01.svg | 6 + layout/reftests/svg/image/image-zoom-02-ref.svg | 4 + layout/reftests/svg/image/image-zoom-02.svg | 7 + layout/reftests/svg/image/imported-image-01.svg | 12 ++ layout/reftests/svg/image/imported-image-02.svg | 17 ++ layout/reftests/svg/image/imported-image-ref.svg | 6 + layout/reftests/svg/image/lime-no-dimensions.svg | 7 + layout/reftests/svg/image/lime100x100.png | Bin 0 -> 232 bytes layout/reftests/svg/image/lime100x100.svg | 3 + layout/reftests/svg/image/reftest.list | 45 ++++++ layout/reftests/svg/image/sprite.png | Bin 0 -> 5082 bytes layout/reftests/svg/image/sprite.svg | 5 + layout/reftests/svg/image/util.js | 173 +++++++++++++++++++++ 70 files changed, 960 insertions(+) create mode 100644 layout/reftests/svg/image/blueRect10x10-viewBox-animPAR.svg create mode 100644 layout/reftests/svg/image/blueRect10x10-viewBox.svg create mode 100644 layout/reftests/svg/image/blueRect10x10.png create mode 100644 layout/reftests/svg/image/blueRect10x10.svg create mode 100644 layout/reftests/svg/image/image-fill-01.svg create mode 100644 layout/reftests/svg/image/image-fill-opacity-ref.html create mode 100644 layout/reftests/svg/image/image-fill-opacity.html create mode 100644 layout/reftests/svg/image/image-filter-01-ref.svg create mode 100644 layout/reftests/svg/image/image-filter-01.svg create mode 100644 layout/reftests/svg/image/image-load-01.svg create mode 100644 layout/reftests/svg/image/image-opacity-01-ref.svg create mode 100644 layout/reftests/svg/image/image-opacity-01.svg create mode 100644 layout/reftests/svg/image/image-opacity-02-ref.svg create mode 100644 layout/reftests/svg/image/image-opacity-02.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-01-raster.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-01-ref.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-01-svg.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-02-raster.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-02-ref.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-02-svg.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-03-ref.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-03.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-04-ref.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-04.svg create mode 100644 layout/reftests/svg/image/image-preserveAspectRatio-05.svg create mode 100644 layout/reftests/svg/image/image-rotate-01-ref.svg create mode 100644 layout/reftests/svg/image/image-rotate-01.svg create mode 100644 layout/reftests/svg/image/image-rotate-02-ref.svg create mode 100644 layout/reftests/svg/image/image-rotate-02a.svg create mode 100644 layout/reftests/svg/image/image-rotate-02b.svg create mode 100644 layout/reftests/svg/image/image-scaling-01.svg create mode 100644 layout/reftests/svg/image/image-scaling-02.svg create mode 100644 layout/reftests/svg/image/image-scaling-03.svg create mode 100644 layout/reftests/svg/image/image-svg-inline-01.html create mode 100644 layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01-ref.html create mode 100644 layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01a.html create mode 100644 layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01b.html create mode 100644 layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01-ref.html create mode 100644 layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01a.html create mode 100644 layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01b.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-in-01a.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-in-01b.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-in-01c.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-in-01d.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-out-01a.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-out-01b.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-out-01c.html create mode 100644 layout/reftests/svg/image/image-svg-inline-zoom-out-01d.html create mode 100644 layout/reftests/svg/image/image-translate-01-ref.svg create mode 100644 layout/reftests/svg/image/image-translate-01.svg create mode 100644 layout/reftests/svg/image/image-with-following-content.svg create mode 100644 layout/reftests/svg/image/image-with-mask-and-clipPath.svg create mode 100644 layout/reftests/svg/image/image-x-01-ref.svg create mode 100644 layout/reftests/svg/image/image-x-01.svg create mode 100644 layout/reftests/svg/image/image-xy-01-ref.svg create mode 100644 layout/reftests/svg/image/image-xy-01.svg create mode 100644 layout/reftests/svg/image/image-y-01-ref.svg create mode 100644 layout/reftests/svg/image/image-y-01.svg create mode 100644 layout/reftests/svg/image/image-zoom-02-ref.svg create mode 100644 layout/reftests/svg/image/image-zoom-02.svg create mode 100644 layout/reftests/svg/image/imported-image-01.svg create mode 100644 layout/reftests/svg/image/imported-image-02.svg create mode 100644 layout/reftests/svg/image/imported-image-ref.svg create mode 100644 layout/reftests/svg/image/lime-no-dimensions.svg create mode 100644 layout/reftests/svg/image/lime100x100.png create mode 100644 layout/reftests/svg/image/lime100x100.svg create mode 100644 layout/reftests/svg/image/reftest.list create mode 100644 layout/reftests/svg/image/sprite.png create mode 100644 layout/reftests/svg/image/sprite.svg create mode 100644 layout/reftests/svg/image/util.js (limited to 'layout/reftests/svg/image') diff --git a/layout/reftests/svg/image/blueRect10x10-viewBox-animPAR.svg b/layout/reftests/svg/image/blueRect10x10-viewBox-animPAR.svg new file mode 100644 index 0000000000..9168e86355 --- /dev/null +++ b/layout/reftests/svg/image/blueRect10x10-viewBox-animPAR.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/layout/reftests/svg/image/blueRect10x10-viewBox.svg b/layout/reftests/svg/image/blueRect10x10-viewBox.svg new file mode 100644 index 0000000000..d5bb444a94 --- /dev/null +++ b/layout/reftests/svg/image/blueRect10x10-viewBox.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/layout/reftests/svg/image/blueRect10x10.png b/layout/reftests/svg/image/blueRect10x10.png new file mode 100644 index 0000000000..722e97c1eb Binary files /dev/null and b/layout/reftests/svg/image/blueRect10x10.png differ diff --git a/layout/reftests/svg/image/blueRect10x10.svg b/layout/reftests/svg/image/blueRect10x10.svg new file mode 100644 index 0000000000..65e4014467 --- /dev/null +++ b/layout/reftests/svg/image/blueRect10x10.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/layout/reftests/svg/image/image-fill-01.svg b/layout/reftests/svg/image/image-fill-01.svg new file mode 100644 index 0000000000..832be6c048 --- /dev/null +++ b/layout/reftests/svg/image/image-fill-01.svg @@ -0,0 +1,13 @@ + + + + Testcase to ensure that fill is ignored for images + + + + + + diff --git a/layout/reftests/svg/image/image-fill-opacity-ref.html b/layout/reftests/svg/image/image-fill-opacity-ref.html new file mode 100644 index 0000000000..92b1508cac --- /dev/null +++ b/layout/reftests/svg/image/image-fill-opacity-ref.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/layout/reftests/svg/image/image-fill-opacity.html b/layout/reftests/svg/image/image-fill-opacity.html new file mode 100644 index 0000000000..e0b5f31e0f --- /dev/null +++ b/layout/reftests/svg/image/image-fill-opacity.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/layout/reftests/svg/image/image-filter-01-ref.svg b/layout/reftests/svg/image/image-filter-01-ref.svg new file mode 100644 index 0000000000..66ad638ebf --- /dev/null +++ b/layout/reftests/svg/image/image-filter-01-ref.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/layout/reftests/svg/image/image-filter-01.svg b/layout/reftests/svg/image/image-filter-01.svg new file mode 100644 index 0000000000..6ec5a576dc --- /dev/null +++ b/layout/reftests/svg/image/image-filter-01.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-load-01.svg b/layout/reftests/svg/image/image-load-01.svg new file mode 100644 index 0000000000..1b8d4264fc --- /dev/null +++ b/layout/reftests/svg/image/image-load-01.svg @@ -0,0 +1,20 @@ + + + + Testcase to ensure that images load when they don't have frames + + + + + + + diff --git a/layout/reftests/svg/image/image-opacity-01-ref.svg b/layout/reftests/svg/image/image-opacity-01-ref.svg new file mode 100644 index 0000000000..63a3f60546 --- /dev/null +++ b/layout/reftests/svg/image/image-opacity-01-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-opacity-01.svg b/layout/reftests/svg/image/image-opacity-01.svg new file mode 100644 index 0000000000..9c589d4bfa --- /dev/null +++ b/layout/reftests/svg/image/image-opacity-01.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/image-opacity-02-ref.svg b/layout/reftests/svg/image/image-opacity-02-ref.svg new file mode 100644 index 0000000000..548d1d54f1 --- /dev/null +++ b/layout/reftests/svg/image/image-opacity-02-ref.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/layout/reftests/svg/image/image-opacity-02.svg b/layout/reftests/svg/image/image-opacity-02.svg new file mode 100644 index 0000000000..5fd8598d0f --- /dev/null +++ b/layout/reftests/svg/image/image-opacity-02.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-01-raster.svg b/layout/reftests/svg/image/image-preserveAspectRatio-01-raster.svg new file mode 100644 index 0000000000..d702a798c8 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-01-raster.svg @@ -0,0 +1,13 @@ + + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-01-ref.svg b/layout/reftests/svg/image/image-preserveAspectRatio-01-ref.svg new file mode 100644 index 0000000000..a0405b3ea9 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-01-ref.svg @@ -0,0 +1,9 @@ + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-01-svg.svg b/layout/reftests/svg/image/image-preserveAspectRatio-01-svg.svg new file mode 100644 index 0000000000..8022671653 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-01-svg.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-02-raster.svg b/layout/reftests/svg/image/image-preserveAspectRatio-02-raster.svg new file mode 100644 index 0000000000..14b9ff8fae --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-02-raster.svg @@ -0,0 +1,13 @@ + + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-02-ref.svg b/layout/reftests/svg/image/image-preserveAspectRatio-02-ref.svg new file mode 100644 index 0000000000..5ebaa19b03 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-02-ref.svg @@ -0,0 +1,9 @@ + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-02-svg.svg b/layout/reftests/svg/image/image-preserveAspectRatio-02-svg.svg new file mode 100644 index 0000000000..cbe5bc0bcb --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-02-svg.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-03-ref.svg b/layout/reftests/svg/image/image-preserveAspectRatio-03-ref.svg new file mode 100644 index 0000000000..101ad403b0 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-03-ref.svg @@ -0,0 +1,13 @@ + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-03.svg b/layout/reftests/svg/image/image-preserveAspectRatio-03.svg new file mode 100644 index 0000000000..7bcd0d35bf --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-03.svg @@ -0,0 +1,13 @@ + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-04-ref.svg b/layout/reftests/svg/image/image-preserveAspectRatio-04-ref.svg new file mode 100644 index 0000000000..66e8dcf292 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-04-ref.svg @@ -0,0 +1,14 @@ + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-04.svg b/layout/reftests/svg/image/image-preserveAspectRatio-04.svg new file mode 100644 index 0000000000..58c8f2b305 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-04.svg @@ -0,0 +1,13 @@ + + + + diff --git a/layout/reftests/svg/image/image-preserveAspectRatio-05.svg b/layout/reftests/svg/image/image-preserveAspectRatio-05.svg new file mode 100644 index 0000000000..11fadbcb86 --- /dev/null +++ b/layout/reftests/svg/image/image-preserveAspectRatio-05.svg @@ -0,0 +1,41 @@ + + + + Testing that dynamic changes to preserveAspectRatio cause a reflow + + + + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-rotate-01-ref.svg b/layout/reftests/svg/image/image-rotate-01-ref.svg new file mode 100644 index 0000000000..bcda450606 --- /dev/null +++ b/layout/reftests/svg/image/image-rotate-01-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-rotate-01.svg b/layout/reftests/svg/image/image-rotate-01.svg new file mode 100644 index 0000000000..9a1600f9c2 --- /dev/null +++ b/layout/reftests/svg/image/image-rotate-01.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/image-rotate-02-ref.svg b/layout/reftests/svg/image/image-rotate-02-ref.svg new file mode 100644 index 0000000000..e807ff2f49 --- /dev/null +++ b/layout/reftests/svg/image/image-rotate-02-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-rotate-02a.svg b/layout/reftests/svg/image/image-rotate-02a.svg new file mode 100644 index 0000000000..b04035037f --- /dev/null +++ b/layout/reftests/svg/image/image-rotate-02a.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/image-rotate-02b.svg b/layout/reftests/svg/image/image-rotate-02b.svg new file mode 100644 index 0000000000..69bef2794c --- /dev/null +++ b/layout/reftests/svg/image/image-rotate-02b.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/layout/reftests/svg/image/image-scaling-01.svg b/layout/reftests/svg/image/image-scaling-01.svg new file mode 100644 index 0000000000..449101a4d6 --- /dev/null +++ b/layout/reftests/svg/image/image-scaling-01.svg @@ -0,0 +1,26 @@ + + + + + + Ensure images aren't scaled too big + + + + + + diff --git a/layout/reftests/svg/image/image-scaling-02.svg b/layout/reftests/svg/image/image-scaling-02.svg new file mode 100644 index 0000000000..302e46c96f --- /dev/null +++ b/layout/reftests/svg/image/image-scaling-02.svg @@ -0,0 +1,26 @@ + + + + + + Ensure images aren't scaled too small + + + + + + diff --git a/layout/reftests/svg/image/image-scaling-03.svg b/layout/reftests/svg/image/image-scaling-03.svg new file mode 100644 index 0000000000..5a5ca8c930 --- /dev/null +++ b/layout/reftests/svg/image/image-scaling-03.svg @@ -0,0 +1,19 @@ + + + + + + Ensure small vector images display + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-01.html b/layout/reftests/svg/image/image-svg-inline-01.html new file mode 100644 index 0000000000..8fe8aac39f --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-01.html @@ -0,0 +1,16 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01-ref.html b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01-ref.html new file mode 100644 index 0000000000..669241ab73 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01-ref.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01a.html b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01a.html new file mode 100644 index 0000000000..821147f9af --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01a.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01b.html b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01b.html new file mode 100644 index 0000000000..0b68b7d888 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-in-01b.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01-ref.html b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01-ref.html new file mode 100644 index 0000000000..1fe71d0904 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01-ref.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01a.html b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01a.html new file mode 100644 index 0000000000..d1f7bc35a4 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01a.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01b.html b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01b.html new file mode 100644 index 0000000000..dcb118a7df --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-sprite-zoom-out-01b.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-in-01a.html b/layout/reftests/svg/image/image-svg-inline-zoom-in-01a.html new file mode 100644 index 0000000000..ef187a5a57 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-in-01a.html @@ -0,0 +1,17 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-in-01b.html b/layout/reftests/svg/image/image-svg-inline-zoom-in-01b.html new file mode 100644 index 0000000000..419f3168ca --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-in-01b.html @@ -0,0 +1,16 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-in-01c.html b/layout/reftests/svg/image/image-svg-inline-zoom-in-01c.html new file mode 100644 index 0000000000..9d273c91ec --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-in-01c.html @@ -0,0 +1,18 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-in-01d.html b/layout/reftests/svg/image/image-svg-inline-zoom-in-01d.html new file mode 100644 index 0000000000..921fa4ec2f --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-in-01d.html @@ -0,0 +1,18 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-out-01a.html b/layout/reftests/svg/image/image-svg-inline-zoom-out-01a.html new file mode 100644 index 0000000000..6532c1576a --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-out-01a.html @@ -0,0 +1,16 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-out-01b.html b/layout/reftests/svg/image/image-svg-inline-zoom-out-01b.html new file mode 100644 index 0000000000..c45f016015 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-out-01b.html @@ -0,0 +1,16 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-out-01c.html b/layout/reftests/svg/image/image-svg-inline-zoom-out-01c.html new file mode 100644 index 0000000000..5c88134c03 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-out-01c.html @@ -0,0 +1,17 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-svg-inline-zoom-out-01d.html b/layout/reftests/svg/image/image-svg-inline-zoom-out-01d.html new file mode 100644 index 0000000000..ad24ce81e5 --- /dev/null +++ b/layout/reftests/svg/image/image-svg-inline-zoom-out-01d.html @@ -0,0 +1,17 @@ + + + + +
+ + + + +
+ + diff --git a/layout/reftests/svg/image/image-translate-01-ref.svg b/layout/reftests/svg/image/image-translate-01-ref.svg new file mode 100644 index 0000000000..161aaa3f2e --- /dev/null +++ b/layout/reftests/svg/image/image-translate-01-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-translate-01.svg b/layout/reftests/svg/image/image-translate-01.svg new file mode 100644 index 0000000000..29311478bf --- /dev/null +++ b/layout/reftests/svg/image/image-translate-01.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/image-with-following-content.svg b/layout/reftests/svg/image/image-with-following-content.svg new file mode 100644 index 0000000000..b3f6d98a79 --- /dev/null +++ b/layout/reftests/svg/image/image-with-following-content.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-with-mask-and-clipPath.svg b/layout/reftests/svg/image/image-with-mask-and-clipPath.svg new file mode 100644 index 0000000000..d010eca527 --- /dev/null +++ b/layout/reftests/svg/image/image-with-mask-and-clipPath.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/layout/reftests/svg/image/image-x-01-ref.svg b/layout/reftests/svg/image/image-x-01-ref.svg new file mode 100644 index 0000000000..4c69676845 --- /dev/null +++ b/layout/reftests/svg/image/image-x-01-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-x-01.svg b/layout/reftests/svg/image/image-x-01.svg new file mode 100644 index 0000000000..db3be2af38 --- /dev/null +++ b/layout/reftests/svg/image/image-x-01.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/image-xy-01-ref.svg b/layout/reftests/svg/image/image-xy-01-ref.svg new file mode 100644 index 0000000000..2821f93246 --- /dev/null +++ b/layout/reftests/svg/image/image-xy-01-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-xy-01.svg b/layout/reftests/svg/image/image-xy-01.svg new file mode 100644 index 0000000000..1afa32a60d --- /dev/null +++ b/layout/reftests/svg/image/image-xy-01.svg @@ -0,0 +1,7 @@ + + + + diff --git a/layout/reftests/svg/image/image-y-01-ref.svg b/layout/reftests/svg/image/image-y-01-ref.svg new file mode 100644 index 0000000000..9a608e8dbd --- /dev/null +++ b/layout/reftests/svg/image/image-y-01-ref.svg @@ -0,0 +1,5 @@ + + + diff --git a/layout/reftests/svg/image/image-y-01.svg b/layout/reftests/svg/image/image-y-01.svg new file mode 100644 index 0000000000..2c8d04fd88 --- /dev/null +++ b/layout/reftests/svg/image/image-y-01.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/image-zoom-02-ref.svg b/layout/reftests/svg/image/image-zoom-02-ref.svg new file mode 100644 index 0000000000..fca1d5703e --- /dev/null +++ b/layout/reftests/svg/image/image-zoom-02-ref.svg @@ -0,0 +1,4 @@ + + + diff --git a/layout/reftests/svg/image/image-zoom-02.svg b/layout/reftests/svg/image/image-zoom-02.svg new file mode 100644 index 0000000000..f426dfca2a --- /dev/null +++ b/layout/reftests/svg/image/image-zoom-02.svg @@ -0,0 +1,7 @@ + + Testcase to ensure that full-page-zoom will zoom raster + images the right amount. + + diff --git a/layout/reftests/svg/image/imported-image-01.svg b/layout/reftests/svg/image/imported-image-01.svg new file mode 100644 index 0000000000..b7ef5d5acf --- /dev/null +++ b/layout/reftests/svg/image/imported-image-01.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/layout/reftests/svg/image/imported-image-02.svg b/layout/reftests/svg/image/imported-image-02.svg new file mode 100644 index 0000000000..7e51025795 --- /dev/null +++ b/layout/reftests/svg/image/imported-image-02.svg @@ -0,0 +1,17 @@ + + + + + diff --git a/layout/reftests/svg/image/imported-image-ref.svg b/layout/reftests/svg/image/imported-image-ref.svg new file mode 100644 index 0000000000..4b0d1accc9 --- /dev/null +++ b/layout/reftests/svg/image/imported-image-ref.svg @@ -0,0 +1,6 @@ + + + + diff --git a/layout/reftests/svg/image/lime-no-dimensions.svg b/layout/reftests/svg/image/lime-no-dimensions.svg new file mode 100644 index 0000000000..1723cb66c0 --- /dev/null +++ b/layout/reftests/svg/image/lime-no-dimensions.svg @@ -0,0 +1,7 @@ + + + + diff --git a/layout/reftests/svg/image/lime100x100.png b/layout/reftests/svg/image/lime100x100.png new file mode 100644 index 0000000000..c9bb375943 Binary files /dev/null and b/layout/reftests/svg/image/lime100x100.png differ diff --git a/layout/reftests/svg/image/lime100x100.svg b/layout/reftests/svg/image/lime100x100.svg new file mode 100644 index 0000000000..bba9d34236 --- /dev/null +++ b/layout/reftests/svg/image/lime100x100.svg @@ -0,0 +1,3 @@ + + + diff --git a/layout/reftests/svg/image/reftest.list b/layout/reftests/svg/image/reftest.list new file mode 100644 index 0000000000..408fa954e2 --- /dev/null +++ b/layout/reftests/svg/image/reftest.list @@ -0,0 +1,45 @@ +# Tests of the SVG element + +== image-fill-01.svg ../pass.svg +== image-filter-01.svg image-filter-01-ref.svg +== image-load-01.svg ../pass.svg +fuzzy(0-4,0-110) == image-opacity-01.svg image-opacity-01-ref.svg # Bug 779514 for Android +fuzzy(0-1,0-100) == image-opacity-02.svg image-opacity-02-ref.svg # Bug 776039 for Android +== image-rotate-01.svg image-rotate-01-ref.svg +== image-rotate-02a.svg image-rotate-02-ref.svg +== image-rotate-02b.svg image-rotate-02-ref.svg +== image-scaling-01.svg ../pass.svg +== image-scaling-02.svg ../pass.svg +== image-scaling-03.svg ../pass.svg +== image-svg-inline-01.html ../pass.svg +== image-svg-inline-zoom-in-01a.html ../pass.svg +== image-svg-inline-zoom-in-01b.html ../pass.svg +== image-svg-inline-zoom-in-01c.html ../pass.svg +== image-svg-inline-zoom-in-01d.html ../pass.svg +== image-svg-inline-zoom-out-01a.html ../pass.svg +== image-svg-inline-zoom-out-01b.html ../pass.svg +== image-svg-inline-zoom-out-01c.html ../pass.svg +== image-svg-inline-zoom-out-01d.html ../pass.svg +fails-if(useDrawSnapshot) == image-svg-inline-sprite-zoom-in-01a.html image-svg-inline-sprite-zoom-in-01-ref.html +fails-if(useDrawSnapshot) == image-svg-inline-sprite-zoom-in-01b.html image-svg-inline-sprite-zoom-in-01-ref.html +fails-if(useDrawSnapshot) == image-svg-inline-sprite-zoom-out-01a.html image-svg-inline-sprite-zoom-out-01-ref.html +fails-if(useDrawSnapshot) == image-svg-inline-sprite-zoom-out-01b.html image-svg-inline-sprite-zoom-out-01-ref.html +== image-translate-01.svg image-translate-01-ref.svg +== image-with-following-content.svg ../pass.svg +== image-with-mask-and-clipPath.svg ../pass.svg +== image-x-01.svg image-x-01-ref.svg +== image-xy-01.svg image-xy-01-ref.svg +== image-y-01.svg image-y-01-ref.svg +fails-if(useDrawSnapshot) == image-zoom-02.svg image-zoom-02-ref.svg +== imported-image-01.svg imported-image-ref.svg +== imported-image-02.svg imported-image-ref.svg +== image-fill-opacity.html image-fill-opacity-ref.html + +# Tests for with preserveAspectRatio +fuzzy(0-57,0-352) == image-preserveAspectRatio-01-raster.svg image-preserveAspectRatio-01-ref.svg +fuzzy(0-57,0-352) == image-preserveAspectRatio-01-svg.svg image-preserveAspectRatio-01-ref.svg +fuzzy(0-57,0-288) == image-preserveAspectRatio-02-raster.svg image-preserveAspectRatio-02-ref.svg +fuzzy(0-57,0-288) == image-preserveAspectRatio-02-svg.svg image-preserveAspectRatio-02-ref.svg +fuzzy(0-57,0-288) == image-preserveAspectRatio-03.svg image-preserveAspectRatio-03-ref.svg +fuzzy(0-57,0-288) == image-preserveAspectRatio-04.svg image-preserveAspectRatio-04-ref.svg +== image-preserveAspectRatio-05.svg ../pass.svg diff --git a/layout/reftests/svg/image/sprite.png b/layout/reftests/svg/image/sprite.png new file mode 100644 index 0000000000..830eb77731 Binary files /dev/null and b/layout/reftests/svg/image/sprite.png differ diff --git a/layout/reftests/svg/image/sprite.svg b/layout/reftests/svg/image/sprite.svg new file mode 100644 index 0000000000..2ec702dfb2 --- /dev/null +++ b/layout/reftests/svg/image/sprite.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/layout/reftests/svg/image/util.js b/layout/reftests/svg/image/util.js new file mode 100644 index 0000000000..144edd356a --- /dev/null +++ b/layout/reftests/svg/image/util.js @@ -0,0 +1,173 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// The possible values of the "align" component of preserveAspectRatio. +const ALIGN_VALS = ["none", + "xMinYMin", "xMinYMid", "xMinYMax", + "xMidYMin", "xMidYMid", "xMidYMax", + "xMaxYMin", "xMaxYMid", "xMaxYMax"]; + +// The possible values of the "meetOrSlice" component of preserveAspectRatio. +const MEETORSLICE_VALS = [ "meet", "slice" ]; + +const SVGNS = "http://www.w3.org/2000/svg"; +const XLINKNS = "http://www.w3.org/1999/xlink"; + +// This is the separation between the x & y values of each in a +// generated grid. +const IMAGE_OFFSET = 50; + +function generateBorderRect(aX, aY, aWidth, aHeight) { + var rect = document.createElementNS(SVGNS, "rect"); + rect.setAttribute("x", aX); + rect.setAttribute("y", aY); + rect.setAttribute("width", aWidth); + rect.setAttribute("height", aHeight); + rect.setAttribute("fill", "none"); + rect.setAttribute("stroke", "black"); + rect.setAttribute("stroke-width", "2"); + rect.setAttribute("stroke-dasharray", "3 2"); + return rect; +} + +// Returns an SVG element with the given xlink:href, width, height, +// and preserveAspectRatio=[aAlign aMeetOrSlice] attributes +function generateImageElementForParams(aX, aY, aWidth, aHeight, + aHref, aAlign, aMeetOrSlice) { + var image = document.createElementNS(SVGNS, "image"); + image.setAttribute("x", aX); + image.setAttribute("y", aY); + image.setAttribute("width", aWidth); + image.setAttribute("height", aHeight); + image.setAttributeNS(XLINKNS, "href", aHref); + image.setAttribute("preserveAspectRatio", aAlign + " " + aMeetOrSlice); + return image; +} + +// Returns a element filled with a grid of elements which each +// have the specified aWidth & aHeight and which use all possible values of +// preserveAspectRatio. +// +// The final "aBonusPARVal" argument (if specified) is used as the +// preserveAspectRatio value on a bonus element, added at the end. +function generateImageGrid(aHref, aWidth, aHeight, aBonusPARVal) { + var grid = document.createElementNS(SVGNS, "g"); + var y = 0; + var x = 0; + for (var i = 0; i < ALIGN_VALS.length; i++) { + // Jump to next line of grid, for every other "i" value. + // (every fourth entry) + if (i && i % 2 == 0) { + y += IMAGE_OFFSET; + x = 0; + } + var alignVal = ALIGN_VALS[i]; + for (var j = 0; j < MEETORSLICE_VALS.length; j++) { + var meetorsliceVal = MEETORSLICE_VALS[j]; + var border = generateBorderRect(x, y, aWidth, aHeight); + var image = generateImageElementForParams(x, y, aWidth, aHeight, + aHref, alignVal, + meetorsliceVal); + grid.appendChild(border); + grid.appendChild(image); + x += IMAGE_OFFSET; + } + } + + if (aBonusPARVal) { + // Add one final entry with "bonus" pAR value. + y += IMAGE_OFFSET; + x = 0; + var border = generateBorderRect(x, y, aWidth, aHeight); + var image = generateImageElementForParams(x, y, aWidth, aHeight, + aHref, aBonusPARVal, ""); + grid.appendChild(border); + grid.appendChild(image); + } + + return grid; +} + +// Returns an SVG element that... +// (a) has the given ID +// (b) contains only a element to the given URI +// (c) has a hardcoded viewBox="0 0 10 10" attribute +// (d) has the given preserveAspectRatio=[aAlign aMeetOrSlice] attribute +function generateSymbolElementForParams(aSymbolID, aHref, + aAlign, aMeetOrSlice) { + var use = document.createElementNS(SVGNS, "use"); + use.setAttributeNS(XLINKNS, "href", aHref); + + var symbol = document.createElementNS(SVGNS, "symbol"); + symbol.setAttribute("id", aSymbolID); + symbol.setAttribute("viewBox", "0 0 10 10"); + symbol.setAttribute("preserveAspectRatio", aAlign + " " + aMeetOrSlice); + + symbol.appendChild(use); + return symbol; +} + +function generateUseElementForParams(aTargetURI, aX, aY, aWidth, aHeight) { + var use = document.createElementNS(SVGNS, "use"); + use.setAttributeNS(XLINKNS, "href", aTargetURI); + use.setAttribute("x", aX); + use.setAttribute("y", aY); + use.setAttribute("width", aWidth); + use.setAttribute("height", aHeight); + return use; +} + +// Returns a element filled with a grid of elements which each +// have the specified aWidth & aHeight and which reference elements +// with all possible values of preserveAspectRatio. Each contains +// a that links to the given URI, aHref. +// +// The final "aBonusPARVal" argument (if specified) is used as the +// preserveAspectRatio value on a bonus element, added at the end. +function generateSymbolGrid(aHref, aWidth, aHeight, aBonusPARVal) { + var grid = document.createElementNS(SVGNS, "g"); + var y = 0; + var x = 0; + for (var i = 0; i < ALIGN_VALS.length; i++) { + // Jump to next line of grid, for every other "i" value. + // (every fourth entry) + if (i && i % 2 == 0) { + y += IMAGE_OFFSET; + x = 0; + } + var alignVal = ALIGN_VALS[i]; + for (var j = 0; j < MEETORSLICE_VALS.length; j++) { + var meetorsliceVal = MEETORSLICE_VALS[j]; + var border = generateBorderRect(x, y, aWidth, aHeight); + + var symbolID = "symbol_" + alignVal + "_" + meetorsliceVal; + var symbol = generateSymbolElementForParams(symbolID, aHref, + alignVal, meetorsliceVal); + var use = generateUseElementForParams("#" + symbolID, + x, y, aWidth, aHeight); + grid.appendChild(symbol); // This isn't painted + grid.appendChild(border); + grid.appendChild(use); + x += IMAGE_OFFSET; + } + } + + if (aBonusPARVal) { + // Add one final entry with "bonus" pAR value. + y += IMAGE_OFFSET; + x = 0; + var border = generateBorderRect(x, y, aWidth, aHeight); + var symbolID = "symbol_Bonus"; + var symbol = generateSymbolElementForParams(symbolID, aHref, + aBonusPARVal, ""); + var use = generateUseElementForParams("#" + symbolID, + x, y, aWidth, aHeight); + grid.appendChild(symbol); // This isn't painted + grid.appendChild(border); + grid.appendChild(use); + } + + return grid; +} -- cgit v1.2.3