summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/repaint-added-backdrop-filter.html
blob: 6678ba4358d1f41e3a71215af374df8ca130c5c7 (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
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>backdrop-filter: Correctly repaint added backdrop-filter</title>
<link rel="author" href="mailto:pdr@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match" href="reference/repaint-added-backdrop-filter-ref.html">
<script src="/common/reftest-wait.js"></script>

<p>Expected: A black box.</p>

<div id="filter"></div>

<style>
  #filter {
    width: 100px;
    height: 100px;
    backdrop-filter: none;
    will-change: opacity;
  }
</style>

<script>
  function doTest() {
    requestAnimationFrame(function() {
      requestAnimationFrame(function() {
        document.getElementById('filter').style.backdropFilter = 'invert(1)';
        takeScreenshot();
      });
    });
  }
  window.addEventListener('load', doTest, false);
</script>