Re: [fxtf-drafts] [filter-effects-1] What is the visual effect of filter() on the document element?

For SVG filters on the documentElement we probably also need to define the rectangle that should be used for the filtered element's BBox. I think it would make the most sense to define it to be the viewport rectangle, and *not* the scrolled size of the document. So the following testcase should have a blue fill in the lower half of the viewport at all scroll positions:

```html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>The filter should not scroll with the root scroll frame, and the lower half of the viewport should be blue.</title>

<style>
html { filter: url(#filter); }
body { margin: 0; height: 4000px; }
</style>

<body>

<svg height="0">
  <filter id="filter">
    <feFlood flood-color="blue" x="0%" y="50%" width="100%" height="50%" result="blue"/>
    <feMerge>
      <feMergeNode in="SourceGraphic"/>
      <feMergeNode in="blue"/>
    </feMerge>
  </filter>
</svg>

<script>
document.documentElement.scrollTop = 800;
</script>
```

-- 
GitHub Notification of comment by mstange
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/282#issuecomment-431612986 using your GitHub account

Received on Saturday, 20 October 2018 19:52:52 UTC