LayoutTests:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Feb 2007 05:54:46 +0000 (05:54 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Feb 2007 05:54:46 +0000 (05:54 +0000)
        Reviewed by Hyatt & Adele.

        - test case for <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)

        * fast/forms/disabled-select-change-index.html: Added.

WebCore:

        Reviewed by Hyatt & Adele.

        - <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)

        Test case: fast/forms/disabled-select-change-index.html

        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::setSelected): Allow changing selected state of a disabled
        option.

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

LayoutTests/ChangeLog
LayoutTests/fast/forms/disabled-select-change-index.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLOptionElement.cpp

index 25cac83b49f6c0a530cfb81246c399f1bc679403..22390b014bc87b4f56eb370fae492ccb106d82d4 100644 (file)
@@ -1,3 +1,11 @@
+2007-02-02  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Hyatt & Adele.
+
+        - test case for <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)
+
+        * fast/forms/disabled-select-change-index.html: Added.
+
 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Eric & Maciej.
diff --git a/LayoutTests/fast/forms/disabled-select-change-index.html b/LayoutTests/fast/forms/disabled-select-change-index.html
new file mode 100644 (file)
index 0000000..2ef2927
--- /dev/null
@@ -0,0 +1,105 @@
+<select id="sel1" disabled="disabled">
+<option selected="selected">FAIL</option>
+<option>PASS</option>
+</select><br>
+<select id="sel2" disabled="disabled">
+<option selected="selected">FAIL</option>
+<option>PASS</option>
+</select><br>
+
+<select id="sel3">
+<option selected="selected">FAIL</option>
+<option disabled="disabled">PASS</option>
+</select><br>
+<select id="sel4">
+<option selected="selected">FAIL</option>
+<option disabled="disabled">PASS</option>
+</select><br>
+
+<select id="sel5" size="2" disabled="disabled">
+<option selected="selected">FAIL</option>
+<option>PASS</option>
+</select><br>
+<select id="sel6" size="2" disabled="disabled">
+<option selected="selected">FAIL</option>
+<option>PASS</option>
+</select><br>
+
+<select id="sel7" size="2">
+<option selected="selected">FAIL</option>
+<option disabled="disabled">PASS</option>
+</select><br>
+<select id="sel8" size="2">
+<option selected="selected">FAIL</option>
+<option disabled="disabled">PASS</option>
+</select><br>
+
+
+<script>
+
+var sel1 = document.getElementById("sel1");
+sel1.options[1].selected = true;
+
+if (sel1.selectedIndex == 1)
+    document.write("PASS: sel1 correctly set to selectedIndex 1 by sel1.options[1].selected = true.<br>");
+else
+    document.write("FAIL: sel1 set to selectedIndex " + sel1.selectedIndex + " instead of 1 by sel1.options[1].selected = true.<br>");
+
+var sel2 = document.getElementById("sel2");
+sel2.selectedIndex = 1;
+
+if (sel2.selectedIndex == 1)
+    document.write("PASS: sel2 correctly set to selectedIndex 1 by sel2.selectedIndex = 1.<br>");
+else
+    document.write("FAIL: sel2 set to selectedIndex " + sel2.selectedIndex + " instead of 1 by sel2.selectedIndex = 1.<br>");
+
+var sel3 = document.getElementById("sel3");
+sel3.options[1].selected = true;
+
+if (sel3.selectedIndex == 1)
+    document.write("PASS: sel3 correctly set to selectedIndex 1 by sel3.options[1].selected = true.<br>");
+else
+    document.write("FAIL: sel3 set to selectedIndex " + sel3.selectedIndex + " instead of 1 by sel3.options[1].selected = true.<br>");
+
+var sel4 = document.getElementById("sel4");
+sel4.selectedIndex = 1;
+
+if (sel4.selectedIndex == 1)
+    document.write("PASS: sel4 correctly set to selectedIndex 1 by sel4.selectedIndex = 1.<br>");
+else
+    document.write("FAIL: sel4 set to selectedIndex " + sel4.selectedIndex + " instead of 1 by sel4.selectedIndex = 1.<br>");
+
+
+var sel5 = document.getElementById("sel5");
+sel5.options[1].selected = true;
+
+if (sel5.selectedIndex == 1)
+    document.write("PASS: sel5 correctly set to selectedIndex 1 by sel5.options[1].selected = true.<br>");
+else
+    document.write("FAIL: sel5 set to selectedIndex " + sel5.selectedIndex + " instead of 1 by sel5.options[1].selected = true.<br>");
+
+var sel6 = document.getElementById("sel6");
+sel6.selectedIndex = 1;
+
+if (sel6.selectedIndex == 1)
+    document.write("PASS: sel6 correctly set to selectedIndex 1 by sel6.selectedIndex = 1.<br>");
+else
+    document.write("FAIL: sel6 set to selectedIndex " + sel6.selectedIndex + " instead of 1 by sel6.selectedIndex = 1.<br>");
+
+var sel7 = document.getElementById("sel7");
+sel7.options[1].selected = true;
+
+if (sel7.selectedIndex == 1)
+    document.write("PASS: sel7 correctly set to selectedIndex 1 by sel7.options[1].selected = true.<br>");
+else
+    document.write("FAIL: sel7 set to selectedIndex " + sel7.selectedIndex + " instead of 1 by sel7.options[1].selected = true.<br>");
+
+var sel8 = document.getElementById("sel8");
+sel8.selectedIndex = 1;
+
+if (sel8.selectedIndex == 1)
+    document.write("PASS: sel8 correctly set to selectedIndex 1 by sel8.selectedIndex = 1.<br>");
+else
+    document.write("FAIL: sel8 set to selectedIndex " + sel8.selectedIndex + " instead of 1 by sel8.selectedIndex = 1.<br>");
+
+</script>
index 27c9dbae796894b28e7dc61a839f3e2c893f3b9b..9d63265a3eb74d0c3f456f4c88f2a1e46f6daf50 100644 (file)
@@ -1,3 +1,15 @@
+2007-02-02  Maciej Stachowiak  <mjs@apple.com>
+        
+        Reviewed by Hyatt & Adele.
+        
+        - <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)
+        
+        Test case: fast/forms/disabled-select-change-index.html
+        
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::setSelected): Allow changing selected state of a disabled
+        option.
+        
 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Build fix, not reviewed.
index f95794af938e3e843be947b2a3d495a153aa93c0..8d8442be3bd432c2487e83ccf38627dc4e3e39e8 100644 (file)
@@ -171,7 +171,7 @@ void HTMLOptionElement::setValue(const String& value)
 
 void HTMLOptionElement::setSelected(bool selected)
 {
-    if (m_selected == selected || disabled())
+    if (m_selected == selected)
         return;
     m_selected = selected;
     if (HTMLSelectElement* select = getSelect())