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

     1 <!DOCTYPE>
     2 <head>
     3   <style>
     4     body {
     5       border:  0px;
     6       margin:  0px;
     7       padding: 0px;
     8     }
     9     div {
    10       width:   100px;
    11       height:  100px;
    12       margin:  50px;
    14       /* This is deliberately an image with a non-neutral inherent orientation to */
    15       /* ensure that the inherent orientation is irrelevant. */
    16       border-style: solid;
    17       border-width: 20px;
    18       border-image: url(image-exif-90-deg-flip.jpg) 27 repeat;
    19     }
    20   </style>
    21 </head>
    22 <body>
    23   <div></div>
    25   <script>
    26     var orientation = location.search.substring(1).split("&");
    27     var angle = orientation[0];
    28     var flip = orientation[1] == "flip" ? true : false;
    30     // Construct a style. "from-image" is special-cased.
    31     var style;
    32     if (angle == "from-image") {
    33       style = "div { image-orientation: from-image; }\n";
    34     } else {
    35       style = "div { image-orientation: "
    36             + angle + "deg"
    37             + (flip ? " flip" : "")
    38             + "; }\n";
    39     }
    41     // Apply the style to the document.
    42     var sheet = document.createElement('style');
    43     sheet.innerHTML = style;
    44     document.body.appendChild(sheet);
    45   </script>
    46 </body>

mercurial