Title: [120413] trunk
Revision
120413
Author
[email protected]
Date
2012-06-15 00:13:35 -0700 (Fri, 15 Jun 2012)

Log Message

Unreviewed, rolling out r110340.
http://trac.webkit.org/changeset/110340
https://bugs.webkit.org/show_bug.cgi?id=88749

Source/WebCore:

r110340 added a broken implementation of
HTMLSelectElement::selectedOptions. This roll out removes
HTMLSelectElement::selectedOptions.

* html/CollectionType.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::shouldIncludeChildren):
(WebCore::HTMLCollection::isAcceptableElement):
* html/HTMLSelectElement.cpp:
* html/HTMLSelectElement.h:
(HTMLSelectElement):
* html/HTMLSelectElement.idl:

LayoutTests:

* fast/dom/HTMLSelectElement/select-selectedOptions-expected.txt: Removed.
* fast/dom/HTMLSelectElement/select-selectedOptions.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (120412 => 120413)


--- trunk/LayoutTests/ChangeLog	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/LayoutTests/ChangeLog	2012-06-15 07:13:35 UTC (rev 120413)
@@ -1,3 +1,12 @@
+2012-06-14  Kent Tamura  <[email protected]>
+
+        Unreviewed, rolling out r110340.
+        http://trac.webkit.org/changeset/110340
+        https://bugs.webkit.org/show_bug.cgi?id=88749
+
+        * fast/dom/HTMLSelectElement/select-selectedOptions-expected.txt: Removed.
+        * fast/dom/HTMLSelectElement/select-selectedOptions.html: Removed.
+
 2012-06-15  MORITA Hajime  <[email protected]>
 
         Unreviewed typo fix for r120405.

Deleted: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions-expected.txt (120412 => 120413)


--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions-expected.txt	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions-expected.txt	2012-06-15 07:13:35 UTC (rev 120413)
@@ -1,46 +0,0 @@
-
-1) Initial there is no selected options.
-PASS mySelect.options.length is 2
-PASS mySelect.selectedOptions.length is 0
-2) Select an option should update the selected options collection.
-PASS mySelect.options.length is 2
-PASS mySelect.selectedOptions.length is 1
-PASS mySelect.selectedOptions[0].text is 'one'
-3) Adding a non selected option should not change the selected options collection.
-PASS mySelect.options.length is 3
-PASS mySelect.selectedOptions.length is 1
-PASS mySelect.selectedOptions[0].text is 'one'
-4) Adding a selected option should change the selected options collection.
-PASS mySelect.options.length is 4
-PASS mySelect.selectedOptions.length is 2
-PASS mySelect.selectedOptions[0].text is 'one'
-PASS mySelect.selectedOptions[1].text is 'five'
-5) Unselect an option should update the selected options collection.
-PASS mySelect.options.length is 4
-PASS mySelect.selectedOptions.length is 1
-PASS mySelect.selectedOptions[0].text is 'five'
-6) Remove an option unselected should not update the selected options collection.
-PASS mySelect.options.length is 3
-PASS mySelect.selectedOptions.length is 1
-PASS mySelect.selectedOptions[0].text is 'five'
-7) Remove an option selected should update the selected options collection.
-PASS mySelect.options.length is 2
-PASS mySelect.selectedOptions.length is 0
-8) Change multiple attribute to false should update selectedOptions.
-PASS mySelect.options.length is 2
-PASS mySelect.selectedOptions.length is 1
-PASS mySelect.selectedOptions[0].text is 'two'
-9) Even with an option disabled selectedOptions should be updated.
-PASS mySelect.options.length is 2
-PASS mySelect.selectedOptions.length is 1
-PASS mySelect.selectedOptions[0].text is 'one'
-10) Even with select element disabled, the selectedOptions should be updated.
-PASS mySelect.options.length is 2
-PASS mySelect.selectedOptions.length is 2
-PASS mySelect.selectedOptions[0].text is 'one'
-PASS mySelect.selectedOptions[1].text is 'two'
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions.html (120412 => 120413)


--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions.html	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions.html	2012-06-15 07:13:35 UTC (rev 120413)
@@ -1,83 +0,0 @@
-<select id="test" size="3">
-</select>
-<div id="console"></div>
-<script src=""
-<script>
-function reset(mySelect) {
-    mySelect.length = 0;
-    mySelect.multiple = true;
-    mySelect.options[mySelect.length] = new Option("one", "value", false);
-    mySelect.options[mySelect.length] = new Option("two", "value", false);
-}
-
-var mySelect = document.getElementById("test");
-reset(mySelect);
-var i = 0;
-
-debug((++i) + ") Initial there is no selected options.");
-shouldBe("mySelect.options.length", "2");
-shouldBe("mySelect.selectedOptions.length", "0");
-
-debug((++i) + ") Select an option should update the selected options collection.");
-mySelect.options[0].selected = true;
-shouldBe("mySelect.options.length", "2");
-shouldBe("mySelect.selectedOptions.length", "1");
-shouldBe("mySelect.selectedOptions[0].text", "'one'");
-
-debug((++i) + ") Adding a non selected option should not change the selected options collection.");
-mySelect.options[mySelect.length] = new Option("three", "value", false);
-shouldBe("mySelect.options.length", "3");
-shouldBe("mySelect.selectedOptions.length", "1");
-shouldBe("mySelect.selectedOptions[0].text", "'one'");
-
-debug((++i) + ") Adding a selected option should change the selected options collection.");
-mySelect.options[mySelect.length] = new Option("five", "value", true, true);
-shouldBe("mySelect.options.length", "4");
-shouldBe("mySelect.selectedOptions.length", "2");
-shouldBe("mySelect.selectedOptions[0].text", "'one'");
-shouldBe("mySelect.selectedOptions[1].text", "'five'");
-
-debug((++i) + ") Unselect an option should update the selected options collection.");
-mySelect.options[0].selected = false;
-shouldBe("mySelect.options.length", "4");
-shouldBe("mySelect.selectedOptions.length", "1");
-shouldBe("mySelect.selectedOptions[0].text", "'five'");
-
-debug((++i) + ") Remove an option unselected should not update the selected options collection.");
-mySelect.remove(0);
-shouldBe("mySelect.options.length", "3");
-shouldBe("mySelect.selectedOptions.length", "1");
-shouldBe("mySelect.selectedOptions[0].text", "'five'");
-
-debug((++i) + ") Remove an option selected should update the selected options collection.");
-mySelect.remove(2);
-shouldBe("mySelect.options.length", "2");
-shouldBe("mySelect.selectedOptions.length", "0");
-
-mySelect.options[0].selected = true;
-mySelect.options[1].selected = true;
-debug((++i) + ") Change multiple attribute to false should update selectedOptions.");
-mySelect.multiple = false;
-shouldBe("mySelect.options.length", "2");
-shouldBe("mySelect.selectedOptions.length", "1");
-shouldBe("mySelect.selectedOptions[0].text", "'two'");
-
-reset(mySelect);
-debug((++i) + ") Even with an option disabled selectedOptions should be updated.");
-mySelect.options[0].disabled = true;
-mySelect.options[0].selected = true;
-shouldBe("mySelect.options.length", "2");
-shouldBe("mySelect.selectedOptions.length", "1");
-shouldBe("mySelect.selectedOptions[0].text", "'one'");
-
-debug((++i) + ") Even with select element disabled, the selectedOptions should be updated.");
-mySelect.disabled = true;
-mySelect.options[1].selected = true;
-shouldBe("mySelect.options.length", "2");
-shouldBe("mySelect.selectedOptions.length", "2");
-shouldBe("mySelect.selectedOptions[0].text", "'one'");
-shouldBe("mySelect.selectedOptions[1].text", "'two'");
-
-debug("");
-</script>
-<script src=""

Modified: trunk/Source/WebCore/ChangeLog (120412 => 120413)


--- trunk/Source/WebCore/ChangeLog	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/Source/WebCore/ChangeLog	2012-06-15 07:13:35 UTC (rev 120413)
@@ -1,3 +1,22 @@
+2012-06-14  Kent Tamura  <[email protected]>
+
+        Unreviewed, rolling out r110340.
+        http://trac.webkit.org/changeset/110340
+        https://bugs.webkit.org/show_bug.cgi?id=88749
+
+        r110340 added a broken implementation of
+        HTMLSelectElement::selectedOptions. This roll out removes
+        HTMLSelectElement::selectedOptions.
+
+        * html/CollectionType.h:
+        * html/HTMLCollection.cpp:
+        (WebCore::HTMLCollection::shouldIncludeChildren):
+        (WebCore::HTMLCollection::isAcceptableElement):
+        * html/HTMLSelectElement.cpp:
+        * html/HTMLSelectElement.h:
+        (HTMLSelectElement):
+        * html/HTMLSelectElement.idl:
+
 2012-06-14  Keishi Hattori  <[email protected]>
 
         Add color property to input type=range

Modified: trunk/Source/WebCore/html/CollectionType.h (120412 => 120413)


--- trunk/Source/WebCore/html/CollectionType.h	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/Source/WebCore/html/CollectionType.h	2012-06-15 07:13:35 UTC (rev 120413)
@@ -51,7 +51,6 @@
     TSectionRows, // all row elements in this table section
     TRCells,      // all cells in this row
     SelectOptions,
-    SelectedOptions,
     DataListOptions,
     MapAreas,
 

Modified: trunk/Source/WebCore/html/HTMLCollection.cpp (120412 => 120413)


--- trunk/Source/WebCore/html/HTMLCollection.cpp	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/Source/WebCore/html/HTMLCollection.cpp	2012-06-15 07:13:35 UTC (rev 120413)
@@ -61,7 +61,6 @@
     case MapAreas:
     case OtherCollection:
     case SelectOptions:
-    case SelectedOptions:
     case DataListOptions:
     case WindowNamedItems:
 #if ENABLE(MICRODATA)
@@ -119,13 +118,6 @@
         return element->hasLocalName(trTag);
     case SelectOptions:
         return element->hasLocalName(optionTag);
-    case SelectedOptions:
-        if (element->hasLocalName(optionTag)) {
-            HTMLOptionElement* option = static_cast<HTMLOptionElement*>(element);
-            if (option->selected())
-                return true;
-        }
-        return false;
     case DataListOptions:
         if (element->hasLocalName(optionTag)) {
             HTMLOptionElement* option = static_cast<HTMLOptionElement*>(element);

Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (120412 => 120413)


--- trunk/Source/WebCore/html/HTMLSelectElement.cpp	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp	2012-06-15 07:13:35 UTC (rev 120413)
@@ -349,13 +349,6 @@
     return childContext.isOnUpperEncapsulationBoundary() && HTMLFormControlElementWithState::childShouldCreateRenderer(childContext);
 }
 
-HTMLCollection* HTMLSelectElement::selectedOptions()
-{
-    if (!m_selectedOptionsCollection)
-        m_selectedOptionsCollection = HTMLCollection::create(this, SelectedOptions);
-    return m_selectedOptionsCollection.get();
-}
-
 HTMLOptionsCollection* HTMLSelectElement::options()
 {
     if (!m_optionsCollection)

Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (120412 => 120413)


--- trunk/Source/WebCore/html/HTMLSelectElement.h	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h	2012-06-15 07:13:35 UTC (rev 120413)
@@ -64,7 +64,6 @@
     void setValue(const String&);
 
     HTMLOptionsCollection* options();
-    HTMLCollection* selectedOptions();
 
     void optionElementChildrenChanged();
 
@@ -180,7 +179,6 @@
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     OwnPtr<HTMLOptionsCollection> m_optionsCollection;
-    OwnPtr<HTMLCollection> m_selectedOptionsCollection;
 
     // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and HTMLHRElement objects.
     mutable Vector<HTMLElement*> m_listItems;

Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (120412 => 120413)


--- trunk/Source/WebCore/html/HTMLSelectElement.idl	2012-06-15 07:11:00 UTC (rev 120412)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl	2012-06-15 07:13:35 UTC (rev 120413)
@@ -53,7 +53,6 @@
 #else
         void remove(in long index);
 #endif
-        readonly attribute HTMLCollection selectedOptions;
         attribute long selectedIndex;
         attribute [TreatNullAs=NullString] DOMString value;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to