summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/remove-filter-repaint.html
blob: 2e85f9f542a9feb19ab3512d3670cfe89914676b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html class="reftest-wait">
<html>
<head>
  <title>CSS Filters: Repaint a compositing layer</title>
  <link rel="author" title="Simon Fraser" href="mailto:simon.fraser@apple.com>">
  <link rel="help" href="https://drafts.fxtf.org/filter-effects/#dropshadowEquivalent">
  <link rel="issue" href="https://bugs.webkit.org/show_bug.cgi?id=120135">
  <link rel="issue" href="https://chromiumcodereview.appspot.com/23526037">
  <link rel="match" href="reference/remove-filter-repaint-ref.html">
  <meta name="assert" content="This test ensures that we can repaint the compositing layer when removing a filter on an inline child of a compositing layer.">
  <script src="/common/reftest-wait.js"></script>
  <style>
    .backdrop {
      position: absolute;
      top: 0;
      left: 0;
      height: 100px;
      width: 100px;
      background-color: silver;
    }
    .overlay {
      position: absolute;
      top: 50px;
      left: 50px;
      width: 400px;
      height: 100px;
      background: gray;
      box-shadow: 0 0 4px black;
    }
    .play {
      font-size: 36pt;
      background-color: navy;
      color: white;
    }
    .play.changed {
      filter: drop-shadow(black 0 0 5px);
    }
    .composited {
      will-change: transform;
    }
    </style>
    <script>
      function doTest() {
        requestAnimationFrame(function() {
          requestAnimationFrame(function() {
            document.getElementById('play').classList.remove('changed');
            takeScreenshot();
          });
        });
      }
      window.addEventListener('load', doTest, false);
  </script>
</head>
<body>
  <div class="composited backdrop"></div>
  <div class="overlay">
    <span id="play" class="play changed">this should be visible</span>
  </div>
</body>
</html>