[Webkit-unassigned] [Bug 6899] SVG <rect> does not respect display: none

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Tue Mar 7 16:49:26 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=6899





------- Comment #4 from mjs at apple.com  2006-03-07 16:49 PDT -------
I think this fix would be ok, but an even better fix would be to make the
renderIsNeeded method do the right thing. The default implementation in
NodeImpl::renderIsNeeded should handle the display:none case. However, this
breaks because of the way SVG supresses rendering for unknown elements and for
certain SVG elements. SVGElementImpl has an override of renderIsNeeded which
returns false, and then the elements that do render have another override that
returns true. This drops the display:none handling.

Here are two possible fixes:

1) Slightly easier, but architecturally not as good IMO:

For all the SVGElementImpl subclasses that currently override renderIsNeeded to
just return true, instead override them to call
StyledElementImpl::rendererIsNeeded so they skip the forced false and fall
through to NodeImpl's logic.

2) A bit more work, but architecturally better:

Make an SVGUnknownElementImpl or SVGGenericElementImpl or something like that,
derived from SVGElementImpl, to be used for unknown elements in the SVG
namespace. This would require some changes to the factory. Remove the
renderIsNeeded override from SVGElementImpl. Remove all the true overrides. Add
a false override to SVGUnknownElementImpl and any other classes that should
never create a renderer. Alternately, for the latter, you could put a display:
none rule in the svg.css stylesheet.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list