- From: <bugzilla@jessica.w3.org>
- Date: Fri, 14 Mar 2014 21:26:34 +0000
- To: public-browser-tools-testing@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24981 Andrey Botalov <botalov.andrey@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX |--- --- Comment #2 from Andrey Botalov <botalov.andrey@gmail.com> --- It still seems to me that this algorithm item isn't needed. Apearance of this item makes algorithm behave strangely. Let's check it by validating it against several combinations. 1. Let's assume that element has attribute "class" but doesn't have attribute "className". So it's e.g. <a class="myClass"> 1.1. Let's assume name is "class": It passes point 1 of the algorithm as name doesn't equal "style". Result is set to value of "class" attribute at step 2 and final step is invoked. At step 7.2 value of "class" attribute ("myClass") is returned as expected. 1.2. Let's assume name is "className": It passess point 1, 2, 3, 4, 5. It passes point 6 as algorithm was invoked with "className", not "class". At step 7.1 value of "className" property ("myClass") is returned as expected. 2. Let's assume that element has attribute "className" but doesn't have attribute "class". So it's e.g. <a className="myClassName"> 2.1. Let's assume name is "class": It passess point 1, 2, 3, 4, 5. At step 6 it will return value of "className" attribute ("myClassName") is invoked. IMO it's very strange and incorrect behavior. I would expect empty string to be invoked. 2.2. Let's assume name is "className": It passess points 1. At step 2 result is set to "myClassName" and final step of the algorithm is invoked. At step 7.1 result value of "className" property ("") is returned. IMO it's strange. I would expect "myClassName" to be returned. 3. Let's assume that element has attribute "className" and attribute "class". So it's e.g.: <a class="myClass" className="myClassName"> 3.1. Let's assume name is "class": It passess point 1. At point 2 result is set to "myClass" and final step is invoked. At point 7.2 "myClass" is returned as expected. 3.2. Let's assume name is "className": It passess point 1. At point 2 result is set to "myClassName" and final step is invoked. At point 7.1 "myClassName" is returned as expected. The case when both class and className are set is very simple so I won't write about it. As you see item 6 makes algorithm behave strangely in case when element has attribute className but doesn't have attribute class. This step doesn't seem to be needed for handling other cases as it works without its presence. I think at least part about "class" and "className" should be removed. I haven't checked other parts of the algorithm fully yet but it seems very strange to me. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 14 March 2014 21:27:39 UTC