Reviewed by NOBODY (OOPS!).
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Feb 2006 19:33:14 +0000 (19:33 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Feb 2006 19:33:14 +0000 (19:33 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6908
          REGRESSION: Replacing existing <option> shuffles it to the end of the list

        Test: fast/forms/select-replace-option.html

        * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLSelectCollection::put):
        Use optionsHTMLCollection, because options isn't really implemented yet.

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

WebCore/ChangeLog
WebCore/khtml/ecma/kjs_html.cpp

index 4a06fab13c4faf33dafb51a41cf590583e9db819..001aadc401b860e3588aab5d9624e3aa93327dce 100644 (file)
@@ -1,3 +1,15 @@
+2006-02-05  Darin Adler  <darin@apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6908
+          REGRESSION: Replacing existing <option> shuffles it to the end of the list
+
+        Test: fast/forms/select-replace-option.html
+
+        * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLSelectCollection::put):
+        Use optionsHTMLCollection, because options isn't really implemented yet.
+
 2006-02-05  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
index 79b70dc6f93149cedbb471d68706225134ab892b..91447023e7a902698ec733bd2af30f55a3c1b952 100644 (file)
@@ -2,7 +2,7 @@
 /*
  *  This file is part of the KDE libraries
  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
- *  Copyright (C) 2004 Apple Computer, Inc.
+ *  Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -3443,7 +3443,7 @@ void KJS::HTMLSelectCollection::put(ExecState *exec, const Identifier &propertyN
     }
     // replace an existing entry ?
   } else if (diff < 0) {
-    before = static_cast<HTMLElementImpl *>(m_element->options()->item(u+1));
+    before = static_cast<HTMLElementImpl *>(m_element->optionsHTMLCollection()->item(u+1));
     m_element->remove(u);
   }
   // finally add the new element