W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2015

Re: [css-filters] bounding box / filter region vs. child transforms

From: Simon Fraser <smfr@me.com>
Date: Mon, 16 Nov 2015 18:02:30 -0800
Cc: "public-fx@w3.org" <public-fx@w3.org>
Message-id: <36377443-5C88-4A17-8A3D-8456AD87E6AE@me.com>
To: Stephen White <senorblanco@chromium.org>
> On Nov 16, 2015, at 4:20 PM, Stephen White <senorblanco@chromium.org> wrote:
> 
> Hi filter-folks,
> 
> Should the bounding box used to compute filter region in CSS filter effects include CSS transforms applied to child elements?
> 
> E.g.,
> 
>     <div id="parent" style="filter: url(#filter);">
>       <div id="child" style="transform: scaleY(4);">X
>       </div>
>     </div>
> 
> What's the bounding box for the filter on "parent"? Does it include the scaleY(4) of the child element, or is it the original untransformed bounding box? The spec currently has a link <http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#ObjectBoundingBoxUnits> to the SVG 1.1 spec, which has no mention of transforms, so one could assume they're implicitly included, but being an SVG spec, perhaps it doesn't fully describe all possible implications for HTML.
> 
> (See Chrome bug https://code.google.com/p/chromium/issues/detail?id=554169 <https://code.google.com/p/chromium/issues/detail?id=554169> for further reference/discussion.)
> 
> Thanks in advance for your help,

It should include the extent of all the descendants (including transforms). Filters are a “graphical group” operation, so it’s as if the element and its descendants are rendered into a bitmap, the filter is applied to the bitmap, then the bitmap is rendered to the destination.

Simon
Received on Tuesday, 17 November 2015 02:03:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 17 November 2015 02:03:10 UTC