| Index: LayoutTests/fast/css/image-orientation/image-orientation-from-image.html
|
| diff --git a/LayoutTests/fast/css/image-orientation/image-orientation-from-image.html b/LayoutTests/fast/css/image-orientation/image-orientation-from-image.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..24b4bf4e84c95aaba7f645b004eeffcef99846cb
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/image-orientation/image-orientation-from-image.html
|
| @@ -0,0 +1,49 @@
|
| +<html>
|
| +<head>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsTextWithPixelResults();
|
| +}
|
| +
|
| +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 <= 9; i++)
|
| + log("img" + i + " size = " + imageSize(document.getElementById("img" + i)))
|
| +}
|
| +
|
| +</script>
|
| +<style>
|
| +body { overflow: hidden; }
|
| +img { border: 1px solid black; image-orientation: from-image; }
|
| +div { display: inline-block; margin-right: 20px; margin-bottom: 10px; width: 100px; vertical-align: top; }
|
| +</style>
|
| +</head>
|
| +<body onload="load()">
|
| +<b>The images should be rotated respecting their EXIF orientation by use of image-orientation: from-image.</b><br><br>
|
| +<div><img id="img1" src="../../images/resources/exif-orientation-1-ul.jpg"><br>Normal</div>
|
| +<div><img id="img2" src="../../images/resources/exif-orientation-2-ur.jpg"><br>Flipped horizontally</div>
|
| +<div><img id="img3" src="../../images/resources/exif-orientation-3-lr.jpg"><br>Rotated 180°</div>
|
| +<div><img id="img4" src="../../images/resources/exif-orientation-4-lol.jpg"><br>Flipped vertically</div>
|
| +<br>
|
| +<div><img id="img5" src="../../images/resources/exif-orientation-5-lu.jpg"><br>Rotated 90° CCW and flipped vertically</div>
|
| +<div><img id="img6" src="../../images/resources/exif-orientation-6-ru.jpg"><br>Rotated 90° CCW</div>
|
| +<div><img id="img7" src="../../images/resources/exif-orientation-7-rl.jpg"><br>Rotated 90° CW and flipped vertically </div>
|
| +<div><img id="img8" src="../../images/resources/exif-orientation-8-llo.jpg"><br>Rotated 90° CW</div>
|
| +<br>
|
| +<div><img id="img9" src="../../images/resources/exif-orientation-9-u.jpg"><br>Undefined (invalid value)</div>
|
| +<br>
|
| +<ul id="console"></ul>
|
| +</body>
|
| +</html>
|
|
|