Closed
Bug 1258205
Opened 8 years ago
Closed 8 years ago
setAttribute doesn't throw InvalidCharacterError if the attribute already exists
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: Oriol, Assigned: Oriol)
References
()
Details
(Keywords: dev-doc-needed)
Attachments
(2 files, 3 obsolete files)
753 bytes,
text/html
|
Details | |
1.59 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0 Build ID: 20160319030558 Steps to reproduce: Create an element with an attribute which does not match the Name production, e.g. > <div class="test" ~="123"></div> Use setAttribute on that element with that attribute > el.setAttribute('~', 'bad'); Actual results: The value of the attribute changes. Expected results: An InvalidCharacterError should be thrown. (https://www.w3.org/TR/dom/#dom-element-setattribute)
Updated•8 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 1•8 years ago
|
||
Updated•8 years ago
|
Attachment #8740491 -
Flags: review?(amarchesini)
Assignee | ||
Updated•8 years ago
|
Attachment #8740491 -
Attachment description: Make setAttribute, check if attribute name is valid even if it already exists → Make setAttribute check if attribute name is valid even if it already exists
Comment 2•8 years ago
|
||
Comment on attachment 8740491 [details] [diff] [review] Make setAttribute check if attribute name is valid even if it already exists Review of attachment 8740491 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/Element.cpp @@ +1180,5 @@ > + aError = nsContentUtils::CheckQName(aName, false); > + if (aError.Failed()) { > + return; > + } > + remove this extra space.
Attachment #8740491 -
Flags: review?(amarchesini) → review+
Comment 3•8 years ago
|
||
NI to make sure this doesn't get lost :)
Assignee: nobody → oriol-bugzilla
Flags: needinfo?(oriol-bugzilla)
Assignee | ||
Comment 4•8 years ago
|
||
Removing space.
Attachment #8740491 -
Attachment is obsolete: true
Flags: needinfo?(oriol-bugzilla)
Assignee | ||
Updated•8 years ago
|
Attachment #8740910 -
Flags: review?(amarchesini)
Comment 5•8 years ago
|
||
Comment on attachment 8740910 [details] [diff] [review] Make setAttribute check if attribute name is valid even if it already exists Review of attachment 8740910 [details] [diff] [review]: ----------------------------------------------------------------- Carrying forward r=baku
Attachment #8740910 -
Flags: review?(amarchesini) → review+
Updated•8 years ago
|
Keywords: checkin-needed,
dev-doc-needed
Comment 6•8 years ago
|
||
does not apply cleanly: patching file dom/base/Element.cpp Hunk #1 FAILED at 1171 1 out of 1 hunks FAILED -- saving rejects to file dom/base/Element.cpp.rej patch failed, unable to continue (try -v) patch failed, rejects left in working directory errors during apply, please fix and qrefresh setAttribute.patch could you take a look, thanks!
Flags: needinfo?(oriol-bugzilla)
Keywords: checkin-needed
Assignee | ||
Comment 7•8 years ago
|
||
Sorry, my local code was reasonably recent so I didn't think it was necessary to update it. But it was, because the code just below my change was modified.
Attachment #8740910 -
Attachment is obsolete: true
Flags: needinfo?(oriol-bugzilla)
Attachment #8740990 -
Flags: review?(amarchesini)
Updated•8 years ago
|
Attachment #8740990 -
Flags: review?(amarchesini) → review+
Updated•8 years ago
|
Keywords: checkin-needed
Comment 9•8 years ago
|
||
backedout for issues in w-p-t 2 tests like https://treeherder.mozilla.org/logviewer.html#?job_id=25874835&repo=mozilla-inbound
Flags: needinfo?(oriol-bugzilla)
Comment 10•8 years ago
|
||
Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/8de93854b963
Assignee | ||
Comment 11•8 years ago
|
||
If I understand correctly, the problem was that I didn't tell the test that now the expected result is pass instead of fail.
Attachment #8740990 -
Attachment is obsolete: true
Flags: needinfo?(oriol-bugzilla)
Attachment #8741843 -
Flags: review?(amarchesini)
Updated•8 years ago
|
Attachment #8741843 -
Flags: review?(amarchesini) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 12•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f21863863d0
Keywords: checkin-needed
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9f21863863d0
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•