Bug 19047

Summary: Selectors API querySelector won't match uppercase class names in quirks mode
Product: WebKit Reporter: Lachlan Hunt <lachlan.hunt>
Component: DOMAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ahmad.saleem792, alex, ap, bfulgham, catfish.man, rniwa, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Description Flags
Quirk Mode - Test Case none

Description Lachlan Hunt 2008-05-14 10:17:25 PDT
The Selectors API querySelector and querySelectorAll methods won't match uppercase class names in quirks mode.

e.g. Try running this script in quirks mode.

<p class="FOO"></p>
var p = document.querySelector(".FOO");
document.write(p ? "PASS" : "FAIL");

The same script works correctly in standards mode.
Comment 1 Alex Russell 2009-03-05 10:34:56 PST
note, this also affects getElementsByClassName in quirks mode
Comment 2 David Smith 2009-03-06 21:45:02 PST
I can't reproduce this (I pasted the provided testcase into a document and loaded it in safari 4 beta, and it said PASS, same with r40738).
Comment 3 Ahmad Saleem 2022-08-09 09:23:43 PDT
Created attachment 461503 [details]
Quirk Mode - Test Case

I changed the test case from Comment 0 in JSfiddle below:

Link - https://jsfiddle.net/6r9odj5x/show

All browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6 on macOS 12.5) are saying "PASS" for the test case, I am going to mark this as "RESOLVED CONFIGURATION CHANGED"

Even with above "Quirk Mode" test case, all browsers are showing "PASS". Thanks!