From caf7fed43fd1bcfb25f2c46c016f3dcc3ed6c7bd Mon Sep 17 00:00:00 2001 From: mjs Date: Wed, 23 Feb 2005 00:00:12 +0000 Subject: [PATCH] Reviewed by Kevin. crash in KJS::ValueImp::dispatchType() every time I load www.nytimes.com/pages/automobiles When creating option elements, use lowercase "option" instead of uppercase "OPTION" to create option elements, because only lowercase works for XHTML. * khtml/ecma/kjs_html.cpp: (KJS::HTMLSelectCollection::tryPut): (OptionConstructorImp::construct): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8660 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog-2005-08-23 | 14 ++++++++++++++ WebCore/khtml/ecma/kjs_html.cpp | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23 index ed9c3517aad9..b005e51f8630 100644 --- a/WebCore/ChangeLog-2005-08-23 +++ b/WebCore/ChangeLog-2005-08-23 @@ -1,3 +1,17 @@ +2005-02-22 Maciej Stachowiak + + Reviewed by Kevin. + + crash in KJS::ValueImp::dispatchType() every time I load www.nytimes.com/pages/automobiles + + When creating option elements, use lowercase "option" instead of + uppercase "OPTION" to create option elements, because only + lowercase works for XHTML. + + * khtml/ecma/kjs_html.cpp: + (KJS::HTMLSelectCollection::tryPut): + (OptionConstructorImp::construct): + 2005-02-22 Chris Blumenberg WebCore fix for: Mail not line breaking my
 formatted emails on replies
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 5735dbdcc514..e86096741286 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -3245,7 +3245,7 @@ void KJS::HTMLSelectCollection::tryPut(ExecState *exec, const Identifier &proper
 
     if (diff < 0) { // add dummy elements
       do {
-        element.add(element.ownerDocument().createElement("OPTION"), DOM::HTMLElement());
+        element.add(element.ownerDocument().createElement("option"), DOM::HTMLElement());
       } while (++diff);
     }
     else // remove elements
@@ -3277,7 +3277,7 @@ void KJS::HTMLSelectCollection::tryPut(ExecState *exec, const Identifier &proper
   // out of array bounds ? first insert empty dummies
   if (diff > 0) {
     while (diff--) {
-      element.add(element.ownerDocument().createElement("OPTION"), before);
+      element.add(element.ownerDocument().createElement("option"), before);
     }
     // replace an existing entry ?
   } else if (diff < 0) {
@@ -3308,7 +3308,7 @@ bool OptionConstructorImp::implementsConstruct() const
 
 Object OptionConstructorImp::construct(ExecState *exec, const List &args)
 {
-  DOM::Element el = doc.createElement("OPTION");
+  DOM::Element el = doc.createElement("option");
   DOM::HTMLOptionElement opt = static_cast(el);
   int sz = args.size();
   DOM::Text t = doc.createTextNode("");
-- 
2.36.0