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

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

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

mercurial