layout/reftests/image/image-orientation-explicit.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.

     1 <!DOCTYPE>
     2 <head>
     3   <style>
     4     body {
     5       border:  0px;
     6       margin:  0px;
     7       padding: 0px;
     8     }
     9     img {
    10       border:  50px solid black;
    11       margin:  50px;
    12       padding: 50px;
    13     }
    14   </style>
    15 </head>
    16 <body>
    17   <!-- This is deliberately an image with a non-neutral inherent orientation to
    18        ensure that the inherent orientation is irrelevant. -->
    19   <img src="image-exif-90-deg-flip.jpg">
    21   <script>
    22     var orientation = location.search.substring(1).split("&");
    23     var angle = orientation[0];
    24     var flip = orientation[1] == "flip" ? true : false;
    26     // Construct a style.
    27     var style = "img { image-orientation: "
    28               + angle + "deg"
    29               + (flip ? " flip" : "")
    30               + "; }\n";
    32     // Apply the style to the document.
    33     var sheet = document.createElement('style');
    34     sheet.innerHTML = style;
    35     document.body.appendChild(sheet);
    36   </script>
    37 </body>

mercurial