gfx/tests/reftest/709477-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/tests/reftest/709477-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,69 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +  <title>glyph clipping (test)</title>
     1.8 +  <style>
     1.9 +    #clip { position: absolute;
    1.10 +            overflow: hidden;
    1.11 +            font-size: 16px;
    1.12 +            width: 500px;
    1.13 +            height: 300px;}
    1.14 +    /* Offsets keep the text far enough away from clip boundaries so that
    1.15 +       cairo knows the text is within the clip.  Non-unit alpha color makes
    1.16 +       the bug show even without antialiasing.  */
    1.17 +    #text { position: absolute;
    1.18 +            left: 100px;
    1.19 +            top: 100px;
    1.20 +            color: rgba(0,0,0,0.4)}
    1.21 +    #cover { position: absolute;
    1.22 +             top: 90px;
    1.23 +             left: 120px;
    1.24 +             height: 50px;
    1.25 +             width: 60px;
    1.26 +             background: green; }
    1.27 +    #mod { position: absolute;
    1.28 +             top: 400px;
    1.29 +             left: 0px;
    1.30 +             height: 2000px;
    1.31 +             width: 600px;
    1.32 +             background: green; }
    1.33 +  </style>
    1.34 +  <script>
    1.35 +
    1.36 +function doPaint()
    1.37 +{
    1.38 +  window.addEventListener("MozAfterPaint", doScroll, false);
    1.39 +  var cover = document.getElementById("cover");
    1.40 +  cover.style.background = "transparent";
    1.41 +  var mod = document.getElementById("mod");
    1.42 +  mod.style.background = "transparent";
    1.43 +}
    1.44 +
    1.45 +function doScroll()
    1.46 +{
    1.47 +  window.removeEventListener("MozAfterPaint", doScroll, false);
    1.48 +  window.addEventListener("MozAfterPaint", endTest, false);
    1.49 +  scrollTo(0,1);
    1.50 +}
    1.51 +
    1.52 +function endTest()
    1.53 +{
    1.54 +  document.documentElement.removeAttribute("class");
    1.55 +}
    1.56 +
    1.57 +document.addEventListener("MozReftestInvalidate", doPaint, false);
    1.58 +  </script>
    1.59 +</head>
    1.60 +<body>
    1.61 +  <div id="clip">
    1.62 +    <div id="text">
    1.63 +    Some text that was</br>
    1.64 +    initially partially covered.</br>
    1.65 +    </div>
    1.66 +  </div>
    1.67 +  <div id="cover">
    1.68 +  </div>
    1.69 +  <div id="mod">
    1.70 +  </div>
    1.71 +</body>
    1.72 +</html>

mercurial