If setAttribute sets an invalid value, the attribute default should be used

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: jwatt, Assigned: longsonr)

Tracking

Trunk
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 years ago
If setAttribute sets an invalid value, the attribute's default value should be used. In some cases we just continue to use the last valid attribute value. This is follow up to bug 344888.
(Assignee)

Comment 1

11 years ago
Created attachment 285088 [details] [diff] [review]
patch
Assignee: general → longsonr
Status: NEW → ASSIGNED
Attachment #285088 - Flags: review?(tor)
(Assignee)

Updated

11 years ago
Depends on: 399975

Updated

11 years ago
Attachment #285088 - Flags: review?(tor) → review+
(Assignee)

Updated

11 years ago
Attachment #285088 - Flags: superreview?(roc)
How about giving each *AttributesInfo class a Reset(PRUint32 i) method that does the ... .Init (...); dance? Then that code could be shared between UnsetAttr and ParseAttribute.
(Assignee)

Updated

11 years ago
Attachment #285088 - Flags: superreview?(roc)
(Assignee)

Comment 4

11 years ago
Created attachment 285857 [details] [diff] [review]
address superreview comments
Attachment #285088 - Attachment is obsolete: true
Attachment #285857 - Flags: superreview?(roc)
Attachment #285857 - Flags: superreview?(roc) → superreview+
(Assignee)

Comment 5

11 years ago
Comment on attachment 285857 [details] [diff] [review]
address superreview comments

We already do this for some types so this just makes us consistent. Improves spec compliance for SVG. I checked that the croczilla xul pages seem to display correctly.
Attachment #285857 - Flags: approval1.9?

Updated

11 years ago
Attachment #285857 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 6

11 years ago
checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.