Closed Bug 520353 Opened 16 years ago Closed 16 years ago

querySelector(), querySelectorAll() and mozMatchesSelector() handle null and undefined incorrectly

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20091002 Minefield/3.7a1pre Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20090926 Minefield/3.7a1pre According to the Editor's Draft of Selectors API, [1] null and undefined should be converted to "null" and "undefined" respectively. This matches latest IE, Safari and Chrome. The same is true for matchesSelector, as defined in Selectors API 2. [2] I'll attach a patch. [1] http://dev.w3.org/2006/webapi/selectors-api/#nodeselector [2] http://dev.w3.org/2006/webapi/selectors-api2/#matchtesting Reproducible: Always Steps to Reproduce: See testcase. Actual Results: Not all tests pass. Expected Results: All tests should pass.
Attached patch PatchSplinter Review
Attachment #404409 - Flags: review?(bzbarsky)
Assignee: nobody → Ms2ger
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 404409 [details] [diff] [review] Patch Looks good. Gotta love mutating specs....
Attachment #404409 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Please comment with the changeset id when you push? http://hg.mozilla.org/mozilla-central/rev/9bdbd962d2b1 was pushed to fix this on Oct 5.
Flags: in-testsuite+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: