Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
REGRESSION: custom attribute values set via javascript are not persistent
Test: fast/dom/Element/setAttribute-case-insensitivity.html
* dom/Element.cpp:
(WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15686
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-07-29 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin.
+
+ Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
+ REGRESSION: custom attribute values set via javascript are not persistent
+
+ * fast/dom/Element/setAttribute-case-insensitivity-expected.txt: Added.
+ * fast/dom/Element/setAttribute-case-insensitivity.html: Added.
+
2006-07-29 Darin Adler <darin@apple.com>
- rolled out the test for bug 9753, since we rolled out the fix
--- /dev/null
+Text for bug 10147: REGRESSION: custom attribute values set via javascript are not persistent.
+
+SUCCESS
--- /dev/null
+<html>
+<body>
+ <p>Text for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=10147">bug 10147</a>:
+ REGRESSION: custom attribute values set via javascript are not persistent.</p>
+
+ <table id="table1" border="0">
+ <tr id="mg" customAttr="old Value">
+ </tr>
+ </table>
+
+ <script language="javascript">
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ try {
+ document.getElementById("mg").setAttribute("customAttr", "new value");
+
+ if ("new value" == document.getElementById("mg").getAttribute("customAttr"))
+ document.write("SUCCESS");
+ else
+ document.write("FAILURE");
+
+ } catch (ex) {
+ document.write(ex);
+ }
+
+ </script>
+</body>
+</html>
+2006-07-29 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin.
+
+ Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
+ REGRESSION: custom attribute values set via javascript are not persistent
+
+ Test: fast/dom/Element/setAttribute-case-insensitivity.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
+
2006-07-28 Timothy Hatcher <timothy@apple.com>
Suggested by Darin.
return;
}
+ String localName = inHTMLDocument(this) ? name.lower() : name;
+
// allocate attributemap if necessary
- Attribute* old = attributes(false)->getAttributeItem(name);
+ Attribute* old = attributes(false)->getAttributeItem(localName);
// NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly
if (namedAttrMap->isReadOnlyNode()) {
if (inDocument())
document()->incDOMTreeVersion();
- String localName = inHTMLDocument(this) ? name.lower() : name;
-
if (localName == idAttr.localName())
updateId(old ? old->value() : nullAtom, value);