[Webkit-unassigned] [Bug 47166] New: querySelectorAll('body>:last-child') does not work unless HTML file ends with 'new-line'.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 5 03:29:48 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=47166
Summary: querySelectorAll('body>:last-child') does not work
unless HTML file ends with 'new-line'.
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: hayato at chromium.org
Created an attachment (id=69768)
--> (https://bugs.webkit.org/attachment.cgi?id=69768)
test1.html
Please see attachment files, test1.html and test2.html. The only difference between them is whether there is a 'new-line' at the end of file or not.
- test1.html ends with 'new-line', like '... </html>\n<EOF>'
- test2.html does not end with 'new-line', like '.... </html><EOF>'.
Open each files, then try the following JavaScript code in JavaScript console.
> document.querySelectorAll('body>:last-child')
The results differs in test1.html and test2.html:
- In test1.html, querySelectorAll returns a correct result, ['<div id="last">last</div>].
- In test2.html, querySelectorAll returns an empty list, [], which is wrong result.
This might be a regression because Safari Version 5.0 (6533.16) returns the same correct results for both test1.html and test2.html.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list