Bug 17398 - querySelector and querySelectorAll don't match nodes and attributes with namespaces in them
Summary: querySelector and querySelectorAll don't match nodes and attributes with name...
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2008-02-16 17:41 PST by Valentino Volonghi
Modified: 2012-09-07 12:39 PDT (History)
4 users (show)

See Also:

testcase as an html file. (1.26 KB, text/html)
2008-02-17 03:03 PST, Valentino Volonghi
no flags Details
Crash report (25.67 KB, text/plain)
2008-02-17 03:04 PST, Valentino Volonghi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valentino Volonghi 2008-02-16 17:41:52 PST
The following html file has 4 alerts that return the values (in order): 0, 0, null, null.
Right after this file finished loading my webkit (rev 30267) crashes.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script src="http://wirc.10noodles.com/static/j/jquery.js" type="text/javascript" charset="utf-8" />

    <div athena:class="foobar">ciao</div>
	<script type="text/javascript" charset="utf-8">
	   $(function () {
	       var nsr = function (prefix) {
               var ns = {
                   "" : 'http://www.w3.org/1999/xhtml',
                   "html" : 'http://www.w3.org/1999/xhtml',
                   "athena": 'http://divmod.org/ns/athena/0.7'
               return ns[prefix.toLowerCase()];
           alert(document.querySelectorAll('div[athena|class="foobar"]', nsr).length);
           alert(document.querySelectorAll('athena|foobar', nsr).length);
           alert(document.querySelector('div[athena|class="foobar"]', nsr));
           alert(document.querySelector('athena|foobar', nsr));
Comment 1 Mark Rowe (bdash) 2008-02-16 18:35:43 PST
Can you please attach the file as an attachment, and attach the crash log for the crash that happens?
Comment 2 Valentino Volonghi 2008-02-17 03:03:08 PST
Created attachment 19170 [details]
testcase as an html file.
Comment 3 Valentino Volonghi 2008-02-17 03:04:21 PST
Created attachment 19171 [details]
Crash report
Comment 4 Mark Rowe (bdash) 2008-02-17 07:40:37 PST
I found reproducible steps for triggering the crash and filed that separately as bug 17408.
Comment 5 Robert Blaut 2009-01-04 12:04:28 PST
I cannot reproduce the reported crash bug in WebKit r39572. I assume that this bug is fixed since bug 17408 is fixed, isn't it?
Comment 6 Gavin Barraclough 2012-09-07 12:39:14 PDT
I can't repro this crash, and no alerts occur, but this matches Firefox & Chrome.  Doesn't look like there is still a bug here, please reopen & attach a new test case if there is still an issue.