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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/image/image-orientation-explicit.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +<!DOCTYPE>
     1.5 +<head>
     1.6 +  <style>
     1.7 +    body {
     1.8 +      border:  0px;
     1.9 +      margin:  0px;
    1.10 +      padding: 0px;
    1.11 +    }
    1.12 +    img {
    1.13 +      border:  50px solid black;
    1.14 +      margin:  50px;
    1.15 +      padding: 50px;
    1.16 +    }
    1.17 +  </style>
    1.18 +</head>
    1.19 +<body>
    1.20 +  <!-- This is deliberately an image with a non-neutral inherent orientation to
    1.21 +       ensure that the inherent orientation is irrelevant. -->
    1.22 +  <img src="image-exif-90-deg-flip.jpg">
    1.23 +
    1.24 +  <script>
    1.25 +    var orientation = location.search.substring(1).split("&");
    1.26 +    var angle = orientation[0];
    1.27 +    var flip = orientation[1] == "flip" ? true : false;
    1.28 +
    1.29 +    // Construct a style.
    1.30 +    var style = "img { image-orientation: "
    1.31 +              + angle + "deg"
    1.32 +              + (flip ? " flip" : "")
    1.33 +              + "; }\n";
    1.34 +
    1.35 +    // Apply the style to the document.
    1.36 +    var sheet = document.createElement('style');
    1.37 +    sheet.innerHTML = style;
    1.38 +    document.body.appendChild(sheet);
    1.39 +  </script>
    1.40 +</body>

mercurial