wpt / css / filter-effects / backdrop-filter-plus-mask.html

Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/filter-effects/backdrop-filter-plus-mask.html

<!DOCTYPE html>
<meta charset="utf-8">
<meta name=fuzzy content="maxDifference=0-200;totalPixels=0-1000">
<title>backdrop-filter: Correctly apply masks/clips to backdrop-filter content</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match"  href="backdrop-filter-plus-mask-ref.html">

<!--Expected: A black heart.-->

<div></div>

<svg>
  <clipPath id="heart" clipPathUnits="objectBoundingBox">
    <path d="M0.5,1
      C 0.5,1,0,0.7,0,0.3
      A 0.25,0.25,1,1,1,0.5,0.3
      A 0.25,0.25,1,1,1,1,0.3
      C 1,0.7,0.5,1,0.5,1 Z" />
  </clipPath>
</svg>

<style>
body {
  overflow: hidden;
}
div {
  position: absolute;
  top: 100px;
  left: 50px;
  width: 200px;
  height: 200px;
  backdrop-filter: invert(1);
  clip-path: url(#heart);
}
</style>

/css/filter-effects/backdrop-filter-plus-mask-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>backdrop-filter: Correctly apply masks/clips to backdrop-filter content</title>
<link rel="author" href="mailto:masonf@chromium.org">

<div></div>

<svg>
  <clipPath id="heart" clipPathUnits="objectBoundingBox">
    <path d="M0.5,1
      C 0.5,1,0,0.7,0,0.3
      A 0.25,0.25,1,1,1,0.5,0.3
      A 0.25,0.25,1,1,1,1,0.3
      C 1,0.7,0.5,1,0.5,1 Z" />
  </clipPath>
</svg>

<style>
div {
  position: absolute;
  top: 100px;
  left: 50px;
  width: 200px;
  height: 200px;
  background: black;
  clip-path: url(#heart);
}
</style>