Closed Bug 413975 Opened 17 years ago Closed 16 years ago

GetCtx returning null does not mean we are an outer SVG

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: longsonr)

Details

Attachments

(1 file, 1 obsolete file)

In nsSVGSVGElement.cpp we assume that if GetCtx() returns null then we are an outer SVG with an nsSVGOuterSVGFrame that has set our mViewportWidth and mViewportHeight. This is not the case of invalid SVG like: <g id="docRoot"> <svg> <stuff/> </svg> </g>
Fix included in patch for bug 361920
Fixed by check in for bug 361920
Status: NEW → RESOLVED
Closed: 16 years ago
Depends on: 361920
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → longsonr
Attached file Test case (obsolete) —
I'm running into this problem too in some of our mochitests. If we have a percentage length inside an SVG fragment whose parent is display:none we arrive at the same problem. When we call nsSVGSVGElement::GetLength(), GetCtx() returns NULL and mViewportWidth and mViewportHeight are set to 0. So GetLength() returns 0 and nsSVGLength2::FixAxisLength returns 1e-20f. Hence the bogus result for this test.
Attached patch patchSplinter Review
This fixes the bug as originally described but the testcase is a different issue I think.
Attachment #397722 - Flags: review?(jwatt)
Attachment #397722 - Flags: review?(jwatt) → review+
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
No longer depends on: 361920
(In reply to comment #4) > This fixes the bug as originally described but the testcase is a different > issue I think. Filed separate bug 628848 for that
Attachment #396545 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: