createAttribute/setAttributeNode does not properly normalize case
https://bugs.webkit.org/show_bug.cgi?id=90341

Patch by Arpita Bahuguna <a.bah@samsung.com> on 2013-03-03
Reviewed by Darin Adler.

Source/WebCore:

setAttributeNode() verifies for existing attributes in a case sensitive
manner. Thus, it would add another attribute if specified in a case
different from the existing one. Instead, like setAttribute(), it too
should modify the existing attribute's value.

Test: fast/dom/Element/setAttributeNode-case-insensitivity.html

* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
Made changes to check for an existing attribute by converting the
specified attribute's localName to lowercase.

LayoutTests:

* fast/dom/Element/setAttributeNode-case-insensitivity-expected.txt: Added.
* fast/dom/Element/setAttributeNode-case-insensitivity.html: Added.
Testcase for verifying that setAttributeNode() checks against existing
attributes in a case insensitive manner. It updates the value of an
existing attribute (in lower case) with that of the one set using
setAttributeNode() (in upper case).
The test also verifies the behavior of attributes when specified with
namespace and prefix.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144595 268f45cc-cd09-0410-ab3c-d52691b4dbfc