blob: 7417f55892133646d3866a0baeeb361682eb1fbc [file] [log] [blame]
<html>
<head>
<script>
if (window.internals)
internals.settings.setShouldRespectImageOrientation(true);
if (window.testRunner)
testRunner.dumpAsText(true);
function log(str) {
var li = document.createElement("li");
li.appendChild(document.createTextNode(str));
var console = document.getElementById("console");
console.appendChild(li);
}
function imageSize(el) {
var computedStyle = window.getComputedStyle(el);
return computedStyle.width + " by " + computedStyle.height;
}
function load() {
for(var i = 1; i <= 13; i++)
log("img" + i + " size = " + imageSize(document.getElementById("img" + i)))
}
</script>
<style>
div.image { display: inline-block; border: 1px solid black; }
div.container { display: inline-block; margin-right: 20px; margin-bottom: 10px; width: 100px; vertical-align: top; }
img { width: 100px; height: 100px; background-repeat: no-repeat; }
</style>
</head>
<body onload="load()">
<b>None of the images should be rotated. This test is only valid when run with testRunner (or with WebKitShouldRespectImageOrientation manually set to true).</b><br><br>
<div class="container"><div class="image" id="img1" style="content: url(resources/exif-orientation-1-ul.jpg)"></div><br>Normal</div>
<div class="container"><div class="image" id="img2" style="content: url(resources/exif-orientation-2-ur.jpg)"></div><br>Flipped horizontally</div>
<div class="container"><div class="image" id="img3" style="content: url(resources/exif-orientation-3-lr.jpg)"></div><br>Rotated 180&deg;</div>
<div class="container"><div class="image" id="img4" style="content: url(resources/exif-orientation-4-lol.jpg)"></div><br>Flipped vertically</div>
<br>
<div class="container"><div class="image" id="img5" style="content: url(resources/exif-orientation-5-lu.jpg)"></div><br>Rotated 90&deg; CCW and flipped vertically</div>
<div class="container"><div class="image" id="img6" style="content: url(resources/exif-orientation-6-ru.jpg)"></div><br>Rotated 90&deg; CCW</div>
<div class="container"><div class="image" id="img7" style="content: url(resources/exif-orientation-7-rl.jpg)"></div><br>Rotated 90&deg; CW and flipped vertically</div>
<div class="container"><div class="image" id="img8" style="content: url(resources/exif-orientation-8-llo.jpg)"></div><br>Rotated 90&deg; CW</div>
<br>
<div class="container"><img id="img9" style="background-image: url(resources/exif-orientation-5-lu.jpg)"></img><br>Rotated 90&deg; CCW and flipped vertically</div>
<div class="container"><img id="img10" style="background-image: url(resources/exif-orientation-6-ru.jpg)"></img><br>Rotated 90&deg; CCW</div>
<div class="container"><img id="img11" style="background-image: url(resources/exif-orientation-7-rl.jpg)"></img><br>Rotated 90&deg; CW and flipped vertically</div>
<div class="container"><img id="img12" style="background-image: url(resources/exif-orientation-8-llo.jpg)"></img><br>Rotated 90&deg; CW</div>
<br>
<div class="container"><div class="image" id="img13" style="content: url(resources/exif-orientation-9-u.jpg)"></div><br>Undefined (invalid value)</div>
<br>
<ul id="console"></ul>
</body>
</html>