[filter-effects] FillPaint/StrokePaint on HTML elements

Hi,

SVG Filters had some so called pseudo filter primitives (SourceGraphic, SourceAlpha, BackgroundImage, BackgroundAlpha, FillPaint, StrokePaint). We have two issues in the spec to this topic. What should we do with FillPaint and StrokePaint on HTML elements?

Short explanation:
FillPaint: This keyword represents the value of the ‘fill’ property on the target element for the filter effect.
StrokePaint: This keyword represents the value of the ‘stroke’ property on the target element for the filter effect.

'fill' and 'stroke' currently just apply to SVG shapes and text content elements. This does not include HTML elements. This is why Filter Effects currently suggest taking transparent black on HTML elements for these keywords. However, Firefox still uses the values of these properties, independent if the element is an HTML or SVG element.

I would be in favor for relaxing the restriction and follow Firefox. I am not sure if that necessarily means that 'fill' and 'stroke' apply to all elements in the future. That might need to be discussed in an FXTF call. If there are no objections, I will go ahead and do the changes.

Examples:

<!DOCTYPE html>
<html lang="en">
<body>
<div style="width:100px;height:100px;stroke:green;filter:url(#f)"></div>
<svg>
<filter id="f">
<feOffset in="StrokePaint"/>
</filter>
</svg>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<body>
<div style="width:100px;height:100px;fill:green;filter:url(#f)"></div>
<svg>
<filter id="f">
<feOffset in="FillPaint"/>
</filter>
</svg>
</body>
</html>

Both rects are green in Firefox.

Greetings,
Dirk

Received on Wednesday, 7 November 2012 15:22:27 UTC