Closed Bug 111991 Opened 23 years ago Closed 2 years ago

SVG DOM should throw exception on negative values for some attributes

Categories

(Core :: SVG, defect)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: hwaara, Assigned: longsonr)

Details

Attachments

(1 obsolete file)

Spun off bug #111492... For some attributes, such as the rectangle's rx/ry, negative values are not allowed. Per the W3C spec, we should return some sort of W3C exception there -- currently we just jump out of the |nsSVGRectFrame::ConstructPath| function. This error checking should be done higher up in the system, for all attributes that do not allow negative values.
Mass reassign of SVG bugs that aren't currently being worked on by Alex to general@svg.bugs. If you think someone should be assigned to your bug you can join the #svg channel on mozilla.org's IRC server ( irc://irc.mozilla.org/svg ) where you can try to convince one of the SVG hackers to work on it. We aren't always there, so if you don't get a response straight away please try again later.
Assignee: dean.jackson → general
Actually per the W3C spec we should be putting the document into error rather than throwing. http://w3.org/TR/SVG11/implnote.html#ErrorProcessing However, I don't see us doing this any time soon, and I have to admit I'd also prefer to throw when an attempt is made to give such a property a negative value using the DOM.
QA Contact: dean.jackson → ian
Hardware: PC → All
We do the parsing in nsSVGLength2::SetBaseValueString (called from nsSVGElement::ParseAttribute). At that point we only know we're a length and not which attribute we belong to. That's a problem since we need that information. E.g. 'x' can have a negative value, but 'width' can not.
Assignee: general → nobody
QA Contact: ian → general
Severity: normal → S3

Neither Chrome nor Safari throw. They do warn on parsing so perhaps that's all we can/should do here.

Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Attachment #9357304 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: