Closed Bug 216566 Opened 21 years ago Closed 21 years ago

Elements in <defs> sections should not be rendered.

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: darryl, Assigned: alex)

References

()

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030809
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030809

Elements in <defs> sections should not be rendered.

See http://www.w3.org/TR/SVG11/struct.html#DefsElement

Mozilla renders them as if the <defs> element was not present.

Note: the <defs> element is part of SVG full, basic, and tiny.

Reproducible: Always

Steps to Reproduce:
Open W3C tiny test suite test struct-defs-010-t.svg

Actual Results:  
All three rectangles render.

Expected Results:  
Only the red rectangle should render.
Attached image w3c test suite test
Only the red rectangle should render.
One approach to fix this would be to:

1) Add defs atom to nsSVGAtomList.h
2) in nsCSSFrameConstructor.cpp, in nsCSSFrameConstructor::ConstructSVGFrame(),
   add a clause for the defs tag that sets PROCESS_CHIDREN to false
   
Attached patch Proposed patchSplinter Review
1) Adds defs atom to nsSVGAtomList.h
2) in nsCSSFrameConstructor.cpp, sets PROCESS_CHIDREN to false
   when doing defs in nsCSSFrameConstructor::ConstructSVGFrame
Thanks for the patch. It's now checked in to SVG_20020806_BRANCH (in slightly
modified form).
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: