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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>11389</bug_id>
          
          <creation_ts>2006-10-23 03:53:12 -0700</creation_ts>
          <short_desc>Attribute selectors should be case-sensitive by default and only be case-insensitive for certain attributes values</short_desc>
          <delta_ts>2008-01-28 09:15:43 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>15470</dup_id>
          
          <bug_file_loc>http://www.css3.info/selectors-test/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>11390</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Niels Leenheer (HTML5test)">info</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51157</commentid>
    <comment_count>0</comment_count>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2006-10-23 03:53:12 -0700</bug_when>
    <thetext>Current behavoir:
The values of all attributes are compared by using a case-insensitive method.

Correct behavoir:
The CSS specification says that the case-sensitivity is determined by the document language. The HTML specification specifically tells us which attributes are case-sensitive, case-neutral or case-insensitive. Because attributes values are case-sensitive by default, we should treat unknown attributes in a case-sensitive way. 

The list of case-insensitive attributes is as follows:
lang, dir, http-equiv, text, link, vlink, alink, compact, align, frame, rules,
valign, scope, axis, nowrap, hreflang, rel, rev, charset, codetype, declare,
valuetype, shape, nohref, media, bgcolor, clear, color, face, noshade,
noresize, scrolling, target, method, enctype, accept-charset, accept, checked,
multiple, selected, disabled, readonly, language, defer, type

See also the following bugs:
http://bugzilla.mozilla.org/show_bug.cgi?id=357614
http://bugzilla.mozilla.org/show_bug.cgi?id=356936
http://bugs.kde.org/show_bug.cgi?id=135505

and

http://rakaz.nl/item/css_selector_bugs_case_sensitivity</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57530</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-10-01 08:37:39 -0700</bug_when>
    <thetext>The code which defines this behaivor is in:

CSSParser::parseContent

            if (fname == &quot;attr(&quot;) {
                if (args-&gt;size() != 1)
                    return false;
                Value* a = args-&gt;current();
                String attrName = domString(a-&gt;string);
                if (document()-&gt;isHTMLDocument())
                    attrName = attrName.lower();
                parsedValue = new CSSPrimitiveValue(attrName, CSSPrimitiveValue::CSS_ATTR);


Note that that code will be changed slightly by the patch attached to bug 15302, since the mathml.css file (which contains attr selectors) is parsed before there is any document() set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61412</commentid>
    <comment_count>2</comment_count>
      <attachid>17316</attachid>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2007-11-16 12:50:15 -0800</bug_when>
    <thetext>Created attachment 17316
minimal test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68437</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-01-28 08:37:28 -0800</bug_when>
    <thetext>Is this bg already fixed? I don&apos;t see error behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68445</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-01-28 09:15:43 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 15470 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>17316</attachid>
            <date>2007-11-16 12:50:15 -0800</date>
            <delta_ts>2007-11-16 12:50:15 -0800</delta_ts>
            <desc>minimal test case</desc>
            <filename>selectors-case-sensivity.html</filename>
            <type>text/html</type>
            <size>2793</size>
            <attacher name="Robert Blaut">webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL2h0bWw0L2xvb3NlLmR0ZAoiPiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAKPGh0bWw+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIAogICAgICAgIDxoZWFkPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAg
ICAgICAgICA8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRt
bDsgY2hhcnNldD1pc28tODg1OS0xIiAvPiAgICAgICAgICAKICAgICAgICAgICAgICAgIDx0aXRs
ZT5XZWJraXQ6IHNlbGVjdG9ycyBzaG91bGQgYmUgY2FzZS1zZW5zaXRpdmUgZm9yIGFsbW9zdCBh
bGwgSFRNTCBhdHRyaWJ1dGVzPC90aXRsZT4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIAogICAgICAgICAgICAgICAgPHN0eWxlIHR5cGU9J3RleHQvY3NzJz4gICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAg
ICAgICAgZGl2W3RpdGxlPW1hdGNoXSwgZGl2W2lkPW1hdGNoXSwgZGl2W2Zvcj1tYXRjaF0geyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogcmVkOyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBibG9jazsgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIHBhZGRpbmc6IDAuNzVlbTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAg
ICAgICAgICAgPC9zdHlsZT4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgPC9oZWFkPiAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICA8Ym9keT4gICAKICAgICAgICAgICAgICAg
IDxwPkFsbW9zdCBhbGwgSFRNTCBhdHRyaWJ1dGVzIGFyZSBjYXNlLXNlbnNpdGl2ZS4gT25seSBj
YXNlLWluc2Vuc2l0aXZlIGF0dHJpYnV0ZXMgaW4gSFRNTCBhcmU6IGxhbmcsIGRpciwgaHR0cC1l
cXVpdiwgdGV4dCwgbGluaywgdmxpbmssIGFsaW5rLCBjb21wYWN0LCBhbGlnbiwgZnJhbWUsIHJ1
bGVzLCB2YWxpZ24sIHNjb3BlLCBheGlzLCBub3dyYXAsIGhyZWZsYW5nLCByZWwsIHJldiwgY2hh
cnNldCwgY29kZXR5cGUsIGRlY2xhcmUsIHZhbHVldHlwZSwgc2hhcGUsIG5vaHJlZiwgbWVkaWEs
IGJnY29sb3IsIGNsZWFyLCBjb2xvciwgZmFjZSwgbm9zaGFkZSwgbm9yZXNpemUsIHNjcm9sbGlu
ZywgdGFyZ2V0LCBtZXRob2QsIGVuY3R5cGUsIGFjY2VwdC1jaGFyc2V0LCBhY2NlcHQsIGNoZWNr
ZWQsIG11bHRpcGxlLCBzZWxlY3RlZCwgZGlzYWJsZWQsIHJlYWRvbmx5LCBsYW5ndWFnZSwgZGVm
ZXIsIHR5cGU8L3A+CiAgICAgICAgICAgICAgICA8cD5UaGVyZSBzaG91bGQgYmUgbm8gcmVkIG9u
IHRoZSBwYWdlPC9wPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAK
ICAgICAgICAgICAgICAgIDxkaXYgdGl0bGU9J01BVENIJz48L2Rpdj4KICAgICAgICAgICAgICAg
IDxkaXYgaWQ9J01BVENIJz48L2Rpdj4KICAgICAgICAgICAgICAgIDxkaXYgZm9yPSdNQVRDSCc+
PC9kaXY+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAKICAgICAgICA8L2JvZHk+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8L2h0bWw+IAoK
</data>

          </attachment>
      

    </bug>

</bugzilla>