layout/reftests/image-element/element-paint-subimage-sampling-restriction.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/image-element/element-paint-subimage-sampling-restriction.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +<!--
     1.5 +     Any copyright is dedicated to the Public Domain.
     1.6 +     http://creativecommons.org/licenses/publicdomain/
     1.7 +
     1.8 +     Test zooming, image snapping and subimage sampling restriction.
     1.9 +     This is like 446100-1a.html.
    1.10 +-->
    1.11 +<!DOCTYPE HTML>
    1.12 +<html reftest-zoom="1.2" class="reftest-wait">
    1.13 +<head>
    1.14 +<style>
    1.15 +div { margin:1em; }
    1.16 +/* A 7x7px image, black with a 5x5 transparent box centered in it */
    1.17 +div.box { background-image:-moz-element(#e5x5in7x7); }
    1.18 +/* A 7x5px image, black with a 5x5 transparent box centered in it */
    1.19 +div.vstrip { background-image:-moz-element(#e5x5in7x5); }
    1.20 +/* A 5x7px image, black with a 5x5 transparent box centered in it */
    1.21 +div.hstrip { background-image:-moz-element(#e5x5in5x7); }
    1.22 +</style>
    1.23 +</head>
    1.24 +<body>
    1.25 +<div class="box" style="background-position:-1px -1px; width:5px; height:5px;"></div>
    1.26 +<div class="vstrip" style="background-position:-1px 0px; width:5px; height:22px;"></div>
    1.27 +<div class="hstrip" style="background-position:0px -1px; width:22px; height:5px;"></div>
    1.28 +<script>
    1.29 +var waitingForLoad = 0;
    1.30 +function setURLImage(name, url) {
    1.31 +  var img = new Image();
    1.32 +  img.src = url;
    1.33 +  document.mozSetImageElement(name, img);
    1.34 +  waitingForLoad++;
    1.35 +  img.onload = function () { if (--waitingForLoad == 0) document.documentElement.className = ""; };
    1.36 +}
    1.37 +setURLImage("e5x5in7x7", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAFklEQVQImWNgYGD4jwdDCCxgQCWxYgBX8hfpeym4dwAAAABJRU5ErkJggg==");
    1.38 +setURLImage("e5x5in7x5", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAYAAACJmvbYAAAAFElEQVQImWNgYGD4z4Ad/GcYAEkAw+kJ94z5rSYAAAAASUVORK5CYII=");
    1.39 +setURLImage("e5x5in5x7", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAE0lEQVQImWNgYGD4jwXTD2DYDgDN4Qn3yMcPlwAAAABJRU5ErkJggg==");
    1.40 +</script>
    1.41 +</body>
    1.42 +</html>

mercurial