Re: ordering of effects with enable-background:new and filter on the same element

On Thu, Jun 5, 2008 at 2:45 PM, Robert O'Callahan <robert@ocallahan.org>
wrote:

> Context: http://www.w3.org/TR/SVG/filters.html#AccessingBackgroundImage
>
> The text says "Find the element Ai with the smallest subscript i (including
> A0=E) for which the 'enable-background' property has the value new." So that
> seems to mean that the search for the nearest enclosing element with
> enable-background:new starts with the current element. So if an element has
> enable-background:new and a 'filter', then usage of "BackgroundImage" within
> the filter will get a transparent black background. Is this intentional? It
> seems less useful, and less in the spirit of the rest of the section,


The testcase below draws green on Opera, so it looks like Opera is starting
the enable-background:new search from the parent. So please change the spec
to clearly identify that as the correct behaviour.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" style="enable-background:new;">
  <defs>
    <filter id="f1" filterUnits="objectBoundingBox" x="0" y="0" width="100%"
height="100%">
      <feFlood flood-color="black" result="black"/>
      <feComposite in="BackgroundImage" operator="over"/>
    </filter>
  </defs>
  <rect x="100" y="100" width="100" height="100" fill="lime"/>
  <rect x="100" y="100" width="100" height="100" filter="url(#f1)"
style="enable-background:new;"/>
</svg>

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Thursday, 5 June 2008 03:00:05 UTC