layout/reftests/image/image-orientation-list-style-image.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.)

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

mercurial