Reviewed by Dave Harrison.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2006 08:36:54 +0000 (08:36 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2006 08:36:54 +0000 (08:36 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=11402
        REGRESSION: onChange does not work anymore for 1st item in popup

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::HTMLSelectElement):
        (WebCore::HTMLSelectElement::reset):
        Set m_lastOnChangeIndex to -1.

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

WebCore/ChangeLog
WebCore/html/HTMLSelectElement.cpp

index c86809c9475bf26b4d23b05c24a707ffd0e3983f..4519b2e291bb1c0decda3888930413e083c61b69 100644 (file)
@@ -1,3 +1,15 @@
+2006-11-05  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Dave Harrison.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11402
+        REGRESSION: onChange does not work anymore for 1st item in popup
+
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::HTMLSelectElement):
+        (WebCore::HTMLSelectElement::reset):
+        Set m_lastOnChangeIndex to -1.
+
 2006-11-04  Darin Adler  <darin@apple.com>
 
         Reviewed by Anders.
index b02cf92a250131cd69d77f23a163912b3b00d912..34caff169e346212b28358eab0f37b972c0e51ce 100644 (file)
@@ -64,7 +64,7 @@ HTMLSelectElement::HTMLSelectElement(Document* doc, HTMLFormElement* f)
     , m_size(0)
     , m_multiple(false)
     , m_recalcListItems(false)
-    , m_lastOnChangeIndex(0)
+    , m_lastOnChangeIndex(-1)
     , m_activeSelectionAnchorIndex(-1)
     , m_activeSelectionEndIndex(-1)
     , m_activeSelectionState(false)
@@ -504,6 +504,7 @@ void HTMLSelectElement::reset()
     if (!optionSelected && firstOption)
         firstOption->setSelected(true);
     setChanged(true);
+    m_lastOnChangeIndex = -1;
 }
 
 void HTMLSelectElement::notifyOptionSelected(HTMLOptionElement *selectedOption, bool selected)