Re: display:none and mixed SVG and HTML

On 2/2/12 5:13 AM, Tab Atkins Jr. wrote:
> For two, "<p style=display:none><img id=foo></p>" will still draw the
> image when you reference it with the element() function from CSS.
> (This is currently only implemented in Firefox, as I specced it after
> they revealed an experimental implementation.)  It's not perfect quite
> yet - for example, if the image was an animated GIF, only the first
> frame will show in the above example (while it would be animated if
> the image was visible).  That can be considered a bug, though.  This
> is basically identical to the situation you're talking about, though -
> if, instead of<img>, I had<svg><pattern /></svg>, I should be able
> to reference it just the same.

There are some significant differences.  Rendering an image does not 
require style computation, while rendering SVG does.  The requirement 
that replacing <img> there with <svg> render the SVG would require that 
browsers compute styles on display:none subtrees, no?

-Boris

Received on Thursday, 2 February 2012 12:59:40 UTC