2005-12-01  Anders Carlsson  <andersca@mac.com>

        Reviewed by Darin.

        - Fix <http://bugzilla.opendarwin.org/show_bug.cgi?id=4340>
        Safari not supporting disabled in multi select option tag.

        * khtml/rendering/render_form.cpp:
        (RenderSelect::updateFromElement):
        Update calls to append functions to set the enabled state of items.

        * kwq/KWQComboBox.h:
        (QComboBox::appendItem):
        (QComboBox::appendGroupLabel):
        (QComboBox::appendSeparator):
        Add enabled parameter to append functions.

        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox):
        Don't autoenable menu items on the popup button since that's handled
        manually now.

        (QComboBox::setTitle):
        Set enabled state on menu items.

        (QComboBox::appendItem):
        Add enabled parameter.

        * kwq/KWQListBox.h:
        (KWQListBoxItem::KWQListBoxItem):
        Add enabled variable to item struct.

        (QListBox::appendItem):
        (QListBox::appendGroupLabel):
        Add enabled parameter to append functions.

        * kwq/KWQListBox.mm:
        (QListBox::appendItem):
        Add enabled parameter.

        (-[KWQTableView tableView:shouldSelectRow:]):
        Only select the row if the item is enabled.

        (-[KWQTableView drawRow:clipRect:]):
        Draw using the disabled color if the row is disabled.

        * manual-tests/disabled-option-elements.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/manual-tests/disabled-option-elements.html b/WebCore/manual-tests/disabled-option-elements.html
new file mode 100644
index 0000000..2c0c6b2
--- /dev/null
+++ b/WebCore/manual-tests/disabled-option-elements.html
@@ -0,0 +1,27 @@
+<body>
+<p>This tests that disabled option elements shouldn't be selectable and that no elements in disabled optgroups are selectable.</p>
+<form name="form">
+<select multiple="multiple">
+<option>my value 1</option>
+<option value="2" disabled>you should not be able to select this</option>
+<option>my value 3</option>
+<optgroup label="disabled option group" disabled>
+     	<option>this should be disabled</option>
+		<option>as well as this</option>
+<optgroup>
+</select>
+
+<select>
+<option>my value 1</option>
+<option value="2" disabled>you should not be able to select this</option>
+<option>my value 3</option>
+<optgroup label="disabled option group" disabled>
+     	<option>this should be disabled</option>
+		<option>as well as this</option>
+<optgroup>
+</select>
+</form>
+
+</body>
+</html>
+\ No newline at end of file