Closed Bug 934111 Opened 12 years ago Closed 8 years ago

<svg:switch> not displaying

Categories

(Core :: SVG, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: neil, Unassigned)

References

()

Details

The linked page displays "correctly" in IE 10. Chrome appears to misrender the SVG, while Gecko doesn't appear to render the SVG at all.
IE10 does not support the foreignObject tag, I suspect that means it will display the second <g> tag which Firefox and Chrome definitely won't do as they both support foreignObject. The foreignObject tag, however has two mandatory attributes width and height. If these are omitted then the correct rendering is to render nothing at all which is exactly what Firefox does. See http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement for more.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Hmm, the spec text doesn't seem to allow for the behavior that IE has. Specifically it only talks about whether the ‘requiredFeatures’, ‘requiredExtensions’ and ‘systemLanguage’ attributes evaluate to true. It says nothing as far as I can see along the lines of "or if the direct child is not implemented/supported...": http://www.w3.org/TR/SVG11/struct.html#SwitchElement If that's correct, then even in IE the <switch> should be choosing the <foreignObject>.
I think we should further investigate the difference in behavior between Firefox and Chrome. I'm wondering two things: * When I add |width="600" height="300"| to the foreignObject using the inspector, the contents still don't display. * Does the absolute positioning of the children mean that they move to a different stacking context that means the fO viewport clipping doesn't apply to them? (I'd think not, and that the viewport should itself establish a stacking context, but I'm rusty on stacking contexts.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Strange, the arrows DO show for me when I do the same i.e. give the foreignObject width and height attributes. I'm testing with Firefox 25 here.
I gave the foreignObject a width/height of 100% FWIW.
SVG 1.2 tiny is clear that the lacuna values for foreignObject width/height are 0. http://www.w3.org/TR/SVGMobile12/extend.html#ForeignObjectElement So neither IE nor Chrome are following the SVG specification but have different bugs.
Page has had width and height added to foreignObject element. Seems fine now.
Status: REOPENED → RESOLVED
Closed: 12 years ago8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.