From 6acdb2122298d2bb7bb839c0a61b4e1f9b0f9bc9 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 20 Oct 2016 15:41:46 -0400 Subject: [PATCH] Remove "compatibility caseless" matching This fixes #1666. As discussed there, browsers are not interoperable about what type of Unicode case-insensitivity they implement here, with WebKit even using case-sensitive matching for the radio button case (but not for the image map case). Data from Blink's use counters reveals however that the Unicode case-insensitivity is never triggered, and even ASCII case-insensitivity is triggered extraordinarily rarely. Additionally, the semantics of these attributes is more like an identifier than anything else, and so case-insensitive comparison never really made sense in the first place (it was only done for legacy Internet Explorer compatibility). As such, we move to converge on case-sensitive matching in all cases. --- source | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/source b/source index fe5b8d0ba91..af4bb23d523 100644 --- a/source +++ b/source @@ -4193,10 +4193,6 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d in the range U+0061 to U+007A (i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z) are considered to also match.

-

Comparing two strings in a compatibility caseless manner means using the Unicode - compatibility caseless match operation to compare the two strings, with no - language-specific tailorings.

-

Except where otherwise stated, string comparisons must be performed in a case-sensitive manner.

@@ -6702,9 +6698,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
  • Return the first element of type type in scope's tree, in - tree order, that has an id attribute whose value is - a case-sensitive match for s or a name attribute - whose value is a compatibility caseless match for s.

    + tree order, that has an id or name attribute whose value is s.

    Although id attributes are accounted for when parsing, they are not used in determining whether a value is a valid hash-name @@ -6713,14 +6708,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d data-x="">name attribute with the same value).

  • - + @@ -37130,8 +37118,7 @@ interface HTMLMapElement : HTMLElement {

    The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute must not be equal to the value of the name attribute of another map element in the same tree. If the id attribute is also specified, both attributes must have the same value.

    @@ -45878,10 +45865,12 @@ ldh-str = < as defined in name attribute, their name attributes are not empty, and the value of a's name attribute is a compatibility - caseless match for the value of b's name attributes are not empty, and the value of a's name attribute equals the value of b's name attribute. + +

    A tree must not contain an input element whose