Should filters on the root element affect the entire canvas?

Consider this document:

<!DOCTYPE html>
<html style="filter: invert(90%);">
Some text
</html>

Note that in this document the <html> has a transparent background but a 
black text color by default in browsers.  The canvas has a white 
background by default in browsers.

The spec text says:

   Conceptually, any parts of the drawing are effected by filter
   operations. This includes any content, background, borders, text
   decoration, outline and visible scrolling mechanism of the element
   to which the filter is applied, and those of its descendants.

The canvas background is not part of the "element to which the filter is 
applied", so per the current spec this document should render with light 
gray text on a white background.

This is what Firefox does.  Chrome instead seems to make the canvas 
background black.

Which behavior do we want here?  What about other cases of filters being 
applied to the root element?  Do we want to effectively propagate these 
filters to the viewport, like CSS does with 'overflow' and backgrounds 
on the root element?

-Boris

Received on Tuesday, 10 February 2015 20:26:31 UTC