Closed
Bug 620468
Opened 14 years ago
Closed 13 years ago
"ASSERTION: viewport width must be nonnegative"
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: jruderman, Assigned: heycam)
References
Details
(Keywords: assertion, regression, testcase)
Attachments
(3 files)
###!!! ASSERTION: viewport width must be nonnegative!: 'aViewportWidth >= 0', file layout/svg/base/src/nsSVGUtils.cpp, line 797
Reporter | ||
Comment 1•14 years ago
|
||
Comment 2•14 years ago
|
||
This is a new assertion that I added in bug 272288 yesterday, to tighten up assumptions in nsSVGUtils::GetViewBoxTransform.
Negative widths aren't valid for <image> or <svg>, according to the spec:
"A negative value is an error (see Error processing)"
http://www.w3.org/TR/SVG11/struct.html#ImageElementWidthAttribute
http://www.w3.org/TR/SVG11/struct.html#SVGElementWidthAttribute
Not sure if we currently trigger error-handling-code for this case... If we don't want to bail out earlier than this, we could always just pass "max(0, width)" instead of "width" into nsSVGUtils::GetViewBoxTransform for cases like this.
Comment 3•14 years ago
|
||
We don't trigger error handling code as we don't distinguish between different types of length when we parse them. i.e. width (no negatives allowed) and x (negatives OK).
We just want to bail as early as possible in a way that makes mRect in nsSVGPathGeometryFrame the empty rect.
Comment 4•14 years ago
|
||
i.e. calling nsSVGUtils::GetViewBoxTransform is pretty pointless if width <= 0 as we're not going to draw anything.
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #598633 -
Flags: review?(longsonr)
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → cam
Status: NEW → ASSIGNED
Updated•13 years ago
|
Attachment #598633 -
Flags: review?(longsonr) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Flags: in-testsuite+
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•