summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/as-image/image-orientation-viewbox-and-size.html
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/svg/as-image/image-orientation-viewbox-and-size.html')
-rw-r--r--layout/reftests/svg/as-image/image-orientation-viewbox-and-size.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/layout/reftests/svg/as-image/image-orientation-viewbox-and-size.html b/layout/reftests/svg/as-image/image-orientation-viewbox-and-size.html
new file mode 100644
index 000000000..5c3ec4f8a
--- /dev/null
+++ b/layout/reftests/svg/as-image/image-orientation-viewbox-and-size.html
@@ -0,0 +1,35 @@
+<!DOCTYPE>
+<head>
+ <style>
+ body {
+ border: 0px;
+ margin: 0px;
+ padding: 0px;
+ }
+ </style>
+</head>
+<body>
+ <img src="image-orientation-viewbox-and-size.svg">
+
+ <script>
+ var orientationInfo = location.search.substring(1).split("&");
+ var angle = orientationInfo[0];
+ var flip = orientationInfo[1] == "flip" ? true : false;
+
+ // Construct a style. "from-image" is special-cased.
+ var style;
+ if (angle == "from-image") {
+ style = "img { image-orientation: from-image; }\n";
+ } else {
+ style = "img { image-orientation: "
+ + angle + "deg"
+ + (flip ? " flip" : "")
+ + "; }\n";
+ }
+
+ // Apply the style to the document.
+ var sheet = document.createElement('style');
+ sheet.innerHTML = style;
+ document.body.appendChild(sheet);
+ </script>
+</body>