[Webkit-unassigned] [Bug 17731] New: Node.querySelectorAll() scopes selection incorrectly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 9 07:56:54 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=17731

           Summary: Node.querySelectorAll() scopes selection incorrectly
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: borgar at undraland.com


Calling document.getElementById('scope').querySelectorAll('body p') returns all
paragraphs within context (#scope). I would have expected it to return an empty
set.

querySelectorAll seems to be currently selecting all paragraphs within context
node, and then checking which are within the scope. Or it finds all paragraphs
within context and tries to match them to the selector. However the method,
this causes false positives as there are no body tags within the scope.

I would have expected document.getElementById('scope').querySelectorAll('body
p') to work exactly like document.querySelectorAll('#scope body p'). This is
how all the js engines work, and how IE8 has implemented it.

I'm seeing failures on a lot of other selectors but it's completely consistent
with this example.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list