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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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