<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23781</bug_id>
          
          <creation_ts>2013-11-09 02:16:40 +0000</creation_ts>
          <short_desc>id and class should be case-insensitive in quirks</short_desc>
          <delta_ts>2014-05-08 06:23:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>96075</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-11-09 02:16:40 +0000</bug_when>
    <thetext>http://dom.spec.whatwg.org/#concept-id

[[
unique identifier (ID)
]]

HTML says

[[
The unique identifier of HTML elements in documents that are in quirks mode must be treated as ASCII case-insensitive for the purposes of selector matching.

Classes from the class attribute of HTML elements in documents that are in quirks mode must be treated as ASCII case-insensitive for the purposes of selector matching.
]]
http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html#case-sensitivity

But this should apply to all elements. It applies to SVG too in browsers and also elements in unknown namespace (in Blink at least, Gecko appears to not support selecting such elements with id selector). Since it applies to all elements it might be good to move to DOM (or be directly in Selectors?).

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2627 (control)
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2628</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96076</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-11-09 02:32:40 +0000</bug_when>
    <thetext>This only applies to CSS matching, right?  For example, getElementById() still does case-sensitive matching I believe.

Where to spec this is unclear.  Maybe the right place is the quirks mode spec, even.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96077</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-11-09 03:15:56 +0000</bug_when>
    <thetext>So either Selectors fully embraces defining matching in terms of the DOM or it keeps doing its somewhat-DOM-somewhat-abstract dance that&apos;s leaky as hell or it makes it fully abstract and then I guess DOM should define DOM-to-abstract.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96078</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-11-09 03:16:41 +0000</bug_when>
    <thetext>Reassigning to see what Tab thinks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96091</commentid>
    <comment_count>4</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-11-10 17:03:39 +0000</bug_when>
    <thetext>Since we decided on a previous issue to keep CSS quirks in the quirks mode spec, I guess we should do the same for this, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96094</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-11-11 01:05:55 +0000</bug_when>
    <thetext>Why did you decide that? The quirks mode specification should disappear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96125</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-11-11 14:22:14 +0000</bug_when>
    <thetext>Selectors isn&apos;t CSS, ba-dum-tsh</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104938</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-01 22:01:49 +0000</bug_when>
    <thetext>So is the HTML spec wrong here? Or? (This bug isn&apos;t assigned to me right now; please do reassign it to me if I should be fixing HTML.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104948</commentid>
    <comment_count>8</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-02 07:53:55 +0000</bug_when>
    <thetext>I think this is a bug in Selectors, unless we really want to override Selectors from Quirks Mode, which seems weird and hard to figure out when implementing, but okay.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104963</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-05-02 11:52:57 +0000</bug_when>
    <thetext>I&apos;ve specified it in quirks mode for now.
http://quirks.spec.whatwg.org/#the-case-insensitive-class-and-id-selectors-quirk

Hixie, you can drop the part quoted in comment 0 from HTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104964</commentid>
    <comment_count>10</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-05-02 11:56:06 +0000</bug_when>
    <thetext>(But also fix the &quot;everything else&quot; paragraph and maybe point to the quirks spec)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104982</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-02 18:22:18 +0000</bug_when>
    <thetext>Why is it better to have it in quirks than in HTML? Aren&apos;t we trying to drive the quirks spec to empty and move everything into other specs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104984</commentid>
    <comment_count>12</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2014-05-02 18:31:45 +0000</bug_when>
    <thetext>On the DOM side, yes. Our friends in the CSSWG don&apos;t seem inclined that way, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104992</commentid>
    <comment_count>13</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-02 20:42:42 +0000</bug_when>
    <thetext>I&apos;m happy to take care of the CSS stuff that only affects HTML. Does this affect more than HTML? (&quot;Quirks mode&quot; is only possible in text/html, right?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105019</commentid>
    <comment_count>14</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-04 08:45:31 +0000</bug_when>
    <thetext>You can have SVG nodes in HTML and it affects them. Or you can have a document that&apos;s in quirks mode and pour nodes in it from another document. We made quirks mode a DOM affair, it seems weird for selector matching of DOM to be an HTML affair.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105107</commentid>
    <comment_count>15</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-05 22:00:58 +0000</bug_when>
    <thetext>Shouldn&apos;t it be in DOM then?

My concern is that the quirks spec is essentially an &quot;errata&quot; spec and that most people won&apos;t read it. We need this kind of thing to be immediately visible to implementors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105109</commentid>
    <comment_count>16</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-05 22:01:18 +0000</bug_when>
    <thetext>(it really _should_ just be in the selectors spec, of course)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105181</commentid>
    <comment_count>17</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-06 13:26:15 +0000</bug_when>
    <thetext>http://krijnhoetmer.nl/irc-logs/whatwg/20140506#l-5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105314</commentid>
    <comment_count>18</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-05-07 17:16:55 +0000</bug_when>
    <thetext>(In reply to Anne from comment #17)
&gt; http://krijnhoetmer.nl/irc-logs/whatwg/20140506#l-5

It&apos;s in Selectors now: http://dev.w3.org/csswg/selectors/#data-model (look at the end of the section)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105317</commentid>
    <comment_count>19</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-07 17:49:33 +0000</bug_when>
    <thetext>Cool. (Probably needs a reference to define &quot;quirks mode&quot;, BTW, lest people wonder if &quot;limited quirks&quot; mode counts as &quot;quirks mode&quot; here.)

zcorpan, is this all resolved now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105318</commentid>
    <comment_count>20</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-05-07 17:49:58 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8610.
Check-in comment: The quirky class/id selector matching case logic moved to selectors
http://html5.org/tools/web-apps-tracker?from=8609&amp;to=8610</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105395</commentid>
    <comment_count>21</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-05-08 06:23:24 +0000</bug_when>
    <thetext>Yep. Thanks!

https://github.com/whatwg/quirks/commit/cfda1c1f6d689072118b8e6a9a023f268d3c76be</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>