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:

<!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>

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


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

document.documentElement.scrollTop = 800;

GitHub Notification of comment by mstange
Please view or discuss this issue at using your GitHub account

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