This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23742 - Element tag name matching should not be fully case insensitive
Summary: Element tag name matching should not be fully case insensitive
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 16:24 UTC by contributor
Modified: 2013-11-08 21:05 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2013-11-06 16:24:00 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html
Multipage: http://www.whatwg.org/C#case-sensitivity
Complete: http://www.whatwg.org/c#case-sensitivity
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Element tag name matching should not be fully case insensitive

Posted from: 173.48.23.63 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:28.0) Gecko/20100101 Firefox/28.0
Comment 1 Boris Zbarsky 2013-11-06 16:30:26 UTC
I thought we had reached consensus that what we want is for HTML elements in HTML documents to compare the ascii-lowercased selector to the localName of the element and for others to just compare to the localName, both compares being case-sensitive.  That way you can use interned strings in selector matching for better performance.  But the spec text doesn't seem to reflect that.

A testcase is at http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2623 and shows green text in Blink, Gecko, and Presto.  It shows red in Trident, but Trident has an incorrect localName ("div" instead of "DIV") in this case.
Comment 2 Ian 'Hixie' Hickson 2013-11-06 19:36:44 UTC
I don't recall such a decision, but it seems reasonable, if somewhat unintuitive.

Done for element names (see checkin below).

It looks like the same applies to attribute names; should I do that too?
   http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2623
Comment 3 Ian 'Hixie' Hickson 2013-11-06 19:37:06 UTC
Oops, wrong link, sorry:
   http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2624
Comment 4 Boris Zbarsky 2013-11-06 19:52:58 UTC
Yeah, I think attribute names should work similarly.
Comment 5 Boris Zbarsky 2013-11-06 19:53:09 UTC
And thank you!
Comment 6 Ian 'Hixie' Hickson 2013-11-07 22:40:24 UTC
Ok, the attribute selector equivalent text is a bit convoluted, so don't hesitate to reopen the bug if I screwed it up some how.
Comment 7 contributor 2013-11-07 22:42:02 UTC
Checked in as WHATWG revision r8261.
Check-in comment: Match reality better in terms of selector case-sensitivity for attributes as well
http://html5.org/tools/web-apps-tracker?from=8260&to=8261
Comment 8 Boris Zbarsky 2013-11-08 21:05:28 UTC
seems reasonable at first glance.