New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 651946 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 502301
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 627682



Sign in to add a comment

Attribute name transformation inconsistency

Reported by stars...@gmail.com, Sep 30 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36 OPR/40.0.2308.52 (Edition beta)

Example URL:
https://dl.dropboxusercontent.com/u/10096226/inconsistency.html

Steps to reproduce the problem:
1. Have an attribute on an HTML element with uppercase letters
2. Have one of these letters not in the specified range >=0x41 and <=0x5a
3. Try obtaining the attribute with its name

What is the expected behavior?
The attribute is obtained (and, e.g., can be removed).

What went wrong?
The attribute cannot be obtained as the transformation that is applied in the tokenizer (following the spec., hence not all upper case letters are changed, only those in range) seems to be different than the one used by the DOM (standard toLower() transformation).

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes 

Chrome version: 53.0.2785.101  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
 
Cc: rbasuvula@chromium.org
Labels: Needs-Feedback
Navigated to the provided url but we are getting the 3 popups with values “ml ,1,1. Attaching a screencast for reference.

@starsely -- Could you please let me know if i have missed anything and if possible, provide us with a screen cast of the issue which would help us triage further.
Thanks in Advance.

Comment 2 by stars...@gmail.com, Oct 3 2016

Please look at the source of the provided URL. From the source it should be clear that "1" and "0" have to be displayed. Other engines, e.g., Gecko or Trident, handle this correctly.

The JS in the source reads:

```js
var element = document.body.firstElementChild;
var name = element.attributes[0].name;
alert(name);
alert(element.attributes.length);
element.removeAttribute(name);
alert(element.attributes.length);
```
Components: -Blink Blink>DOM
Confirmed that the removeAttribute(..) does actually do something in FireFox.
Blockedon: 627682
Cc: dsinclair@chromium.org dominicc@chromium.org
Status: Available (was: Unconfirmed)
We might be muddling step 1 of "get an attribute by name" [1] which is used by "remove at attribute by name" [2] in case handling.

[1] https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name
[2] https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-name

Comment 5 by tkent@chromium.org, Apr 14 2017

Mergedinto: 502301
Status: Duplicate (was: Available)

Sign in to add a comment