layout/reftests/image/image-orientation-from-image.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 <!DOCTYPE>
michael@0 2 <head>
michael@0 3 <style>
michael@0 4 body {
michael@0 5 border: 0px;
michael@0 6 margin: 0px;
michael@0 7 padding: 0px;
michael@0 8 }
michael@0 9 img {
michael@0 10 image-orientation: from-image;
michael@0 11 border: 50px solid black;
michael@0 12 margin: 50px;
michael@0 13 padding: 50px;
michael@0 14 }
michael@0 15 </style>
michael@0 16 </head>
michael@0 17 <body>
michael@0 18 <img id="image">
michael@0 19
michael@0 20 <script>
michael@0 21 var orientation = location.search.substring(1).split("&");
michael@0 22 var angle = orientation[0];
michael@0 23 var flip = orientation[1] == "flip" ? true : false;
michael@0 24
michael@0 25 // Determine the final image file. 'none' is special-cased since its
michael@0 26 // filename doesn't quite follow the same pattern as the others.
michael@0 27 var imageFile;
michael@0 28 if (angle == "none") {
michael@0 29 imageFile = "image-exif-none.jpg";
michael@0 30 } else {
michael@0 31 var imageFile = "image-exif-"
michael@0 32 + angle
michael@0 33 + "-deg"
michael@0 34 + (flip ? "-flip" : "")
michael@0 35 + ".jpg";
michael@0 36 }
michael@0 37
michael@0 38 document.getElementById('image').src = imageFile;
michael@0 39 </script>
michael@0 40 </body>

mercurial