Bug 21091 - Regression: querySelector matches tag names case sensitively
Summary: Regression: querySelector matches tag names case sensitively
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: David Smith
URL: http://dscoder.com/qsaidtest.html
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-25 00:23 PDT by David Smith
Modified: 2008-09-25 09:49 PDT (History)
0 users

See Also:


Attachments
Fix (5.06 KB, patch)
2008-09-25 01:18 PDT, David Smith
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Smith 2008-09-25 00:23:23 PDT
It should be case insensitive in HTML documents. Patch tomorrow; too tired to wait for the world to rebuild right now. This regressed in http://trac.webkit.org/changeset/35282 because parseSelector doesn't create the dummy stylesheet with a Document, so the CSSParser can't check whether the Document is an HTML one.
Comment 1 David Smith 2008-09-25 01:18:10 PDT
Created attachment 23784 [details]
Fix
Comment 2 Eric Seidel (no email) 2008-09-25 01:21:59 PDT
Comment on attachment 23784 [details]
Fix

The change looks fine.  I'd like to see an xhtml test as well (or maybe that's already covered?)  That could also be done in a follow-up patch.
Comment 3 David Smith 2008-09-25 01:57:59 PDT
Landed with an xhtml test in r36890
Comment 4 Darin Adler 2008-09-25 09:49:28 PDT
Comment on attachment 23784 [details]
Fix

+        std::auto_ptr<CSSSelector> parseSelector(const String&, Document* doc = 0);

The parameter should not be named here.

+std::auto_ptr<CSSSelector> CSSParser::parseSelector(const String& string, Document* doc)
+{    
+    RefPtr<CSSStyleSheet> dummyStyleSheet = CSSStyleSheet::create(doc);

I strongly prefer "document" over "doc", but that's just my personal taste.