Bug 103493

Summary: display: none ignored on outermost SVG element
Product: WebKit Reporter: Elliott Sprehn <esprehn>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, eric, pdr, schenney, webkit-bug-importer, zimmermann
Priority: P2 Keywords: HasReduction, InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Reduction none

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]
Reduction
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.
Comment 3 Brent Fulgham 2022-07-15 15:45:14 PDT
Safari and Chrome fail this test. Firefox handles it properly.
Comment 4 Radar WebKit Bug Importer 2022-07-15 15:47:05 PDT
<rdar://problem/97098400>