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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/image/image-orientation-from-image.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     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 +      image-orientation: from-image;
    1.14 +      border:  50px solid black;
    1.15 +      margin:  50px;
    1.16 +      padding: 50px;
    1.17 +    }
    1.18 +  </style>
    1.19 +</head>
    1.20 +<body>
    1.21 +  <img id="image">
    1.22 +
    1.23 +  <script>
    1.24 +    var orientation = location.search.substring(1).split("&");
    1.25 +    var angle = orientation[0];
    1.26 +    var flip = orientation[1] == "flip" ? true : false;
    1.27 +
    1.28 +    // Determine the final image file. 'none' is special-cased since its
    1.29 +    // filename doesn't quite follow the same pattern as the others.
    1.30 +    var imageFile;
    1.31 +    if (angle == "none") {
    1.32 +      imageFile = "image-exif-none.jpg";
    1.33 +    } else {
    1.34 +      var imageFile = "image-exif-"
    1.35 +                    + angle
    1.36 +                    + "-deg"
    1.37 +                    + (flip ? "-flip" : "")
    1.38 +                    + ".jpg";
    1.39 +    }
    1.40 +
    1.41 +    document.getElementById('image').src = imageFile;
    1.42 +  </script>
    1.43 +</body>

mercurial