layout/reftests/image/image-orientation-generated-content.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.)

     1 <!DOCTYPE>
     2 <head>
     3   <style>
     4     body {
     5       border:  0px;
     6       margin:  0px;
     7       padding: 0px;
     8     }
     9     p:before {
    10       content: url(image-exif-270-deg-flip.jpg);
    11     }
    12   </style>
    13 </head>
    14 <body>
    15   <p></p>
    17   <script>
    18     var orientation = location.search.substring(1).split("&");
    19     var angle = orientation[0];
    20     var flip = orientation[1] == "flip" ? true : false;
    22     // Construct a style. "from-image" is special-cased.
    23     var style;
    24     if (angle == "from-image") {
    25       style = "p { image-orientation: from-image; }\n";
    26     } else {
    27       style = "p { image-orientation: "
    28             + angle + "deg"
    29             + (flip ? " flip" : "")
    30             + "; }\n";
    31     }
    33     // Apply the style to the document.
    34     var sheet = document.createElement('style');
    35     sheet.innerHTML = style;
    36     document.body.appendChild(sheet);
    37   </script>
    38 </body>

mercurial