Bug 103493 - display: none ignored on outermost SVG element
Summary: display: none ignored on outermost SVG element
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: HasReduction
Depends on:
Reported: 2012-11-28 01:11 PST by Elliott Sprehn
Modified: 2012-11-28 08:21 PST (History)
4 users (show)

See Also:

Reduction (182 bytes, image/svg+xml)
2012-11-28 01:13 PST, Elliott Sprehn
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Sprehn 2012-11-28 01:11:06 PST
If you do <svg style="display: none"> on the outermost SVG element we ignore it which is wrong. 

I tried to fix this, but it's hard since we depend on the SVGDocument::rootElement() having a renderer. Instead SVG should use a RenderView like HTML for the thing that must always exist.
Comment 1 Elliott Sprehn 2012-11-28 01:13:59 PST
Created attachment 176422 [details]
Comment 2 Stephen Chenney 2012-11-28 08:21:38 PST
This is a side effect of the fact that SVG needs renderers for content hat the SVG spec defines as display:none. Examples include filters, masks, patterns, anything in defs elemens, etc.

Mozilla have apparently also had issue with this: https://bugzilla.mozilla.org/show_bug.cgi?id=376027

We should still fix it though, as it should be possible to put display:none on the root SVG and have nothing display.