Closed Bug 740627 Opened 8 years ago Closed 8 years ago

"ASSERTION: viewport height must be nonnegative!"

Categories

(Core :: SVG, defect)

x86_64
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: jruderman, Assigned: longsonr)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached image testcase
###!!! ASSERTION: viewport height must be nonnegative!: 'aViewportHeight >= 0', file layout/svg/base/src/nsSVGUtils.cpp, line 957
Attached file stack trace
I think nsSVGPatternFrame::GetPatternRect should be indicating there's an error if width="" or height="" is <= 0 and cause the pattern not to render (and causing a fallback colour to be used if one was specified?).
Although maybe if width/height == 0 nothing should be painted, while if it's <= 0 we should fall back.
Assignee: nobody → longsonr
Attached patch patchSplinter Review
Attachment #610882 - Flags: review?(dholbert)
Comment on attachment 610882 [details] [diff] [review]
patch

Might be good to add a second crashtest 740627-2.svg with width="-65%" (instead of height)

In any case, looks great -- r=me
Attachment #610882 - Flags: review?(dholbert) → review+
pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/a329aa4bc026
Flags: in-testsuite+
Target Milestone: --- → mozilla14
Ms2ger backed out for burning the tree (in https://hg.mozilla.org/integration/mozilla-inbound/rev/2195f743e7dc), but now believed to be delayed bustage from a prior landing. Can reland once the tree is green (but may be after I am afk, so posting this in case I'm not able to reland for you); sorry for the hassle.
Thank you for relanding.
No problem :-)

https://hg.mozilla.org/mozilla-central/rev/8f77f15134c2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.