Title: [288174] trunk
Revision
288174
Author
[email protected]
Date
2022-01-18 18:31:32 -0800 (Tue, 18 Jan 2022)

Log Message

When inserting a selected <option> in a <select> element, its selected state should remain
https://bugs.webkit.org/show_bug.cgi?id=235237

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

* web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed-expected.txt:
* web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt:

Source/WebCore:

When inserting a selected <option> in a <select> element, its selected state should remain and other selected
options should be de-selected.

This is as per the specification [1] that says:
"""
If the multiple attribute is absent, whenever an option element in the select element's list of options has
its selectedness set to true, and whenever an option element with its selectedness set to true is added to
the select element's list of options, the user agent must set the selectedness of all the other option
elements in its list of options to false.
"""

Firefox and Chrome correctly implement this.

WebKit was trying to implement this logic from inside HTMLOptionElement::insertedIntoAncestor(). However,
there were several issues with that:
1. It was checking m_isSelected after calling updateValidity(). updateValidity() would call recalcListItems(),
   which could update m_isSelected. This part could have been addressed by saving m_isSelected before
   calling updateValidity() but would not have addressed the following issues.
2. In the case where an <optgroup> containing several <option> elements is inserted into a <select>,
   insertedIntoAncestor() gets called from each options being inserted. When calling insertedIntoAncestor()
   from the first <option> and if this <option> is selected, it would deselect all following <option> elements
   even though insertedIntoAncestor() has not yet been called for them. As a result, we would end up selecting
   the first inserted <option> that had the selected state, instead of the last one.
3. When more than one <option> is inserted at once, the current implementation would be really inefficient as
   every <option> would dirty and recalc the item list from insertedIntoAncestor().

To address these issues, I got rid of HTMLOptionElement::insertedIntoAncestor(). Instead we now deal with
<option> insertion from inside HTMLSelectElement::childrenChanged() and HTMLOptGroupElement::childrenChanged().
Using the parent element's childrenChanged() is useful because it only gets called once when several <option>
elements are inserted at once. I added logic to those childrenChanged() functions to keep track of the last
selected <option> element being inserted. Then, after we recalc the item list (which may change <option>s'
selected state, I make sure to this <option> is selected. This is similar to the logic that was previously
in HTMLOptionElement::insertedIntoAncestor().

[1] https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element

No new tests, rebaselined existing tests.

* dom/CharacterData.cpp:
(WebCore::makeChildChange):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
(WebCore::makeChildChangeForRemoval):
(WebCore::makeChildChangeForInsertion):
(WebCore::ContainerNode::childrenChanged):
(WebCore::affectsElements): Deleted.
* dom/ContainerNode.h:
(WebCore::ContainerNode::ChildChange::isInsertion const):
(WebCore::ContainerNode::ChildChange::affectsElements const):
- Add 'siblingChanged' member to ChildChange in addition to the previous / next siblings.
  This is useful for HTMLOptGroupElement and HTMLSelectElement where we want to know
  if a newly inserted child is an HTMLOptionElement (and if it is selected).
- Move affectsElements() to the header so that it can be reused by HTMLOptGroupElement
  and HTMLOptionElement.

* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::childrenChanged):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::insertedIntoAncestor): Deleted.
* html/HTMLOptionElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::optionToSelectFromChildChangeScope): Added.
(WebCore::HTMLSelectElement::childrenChanged):

LayoutTests:

Rebaseline WPT test that is now passing.

* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (288173 => 288174)


--- trunk/LayoutTests/ChangeLog	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/LayoutTests/ChangeLog	2022-01-19 02:31:32 UTC (rev 288174)
@@ -1,3 +1,14 @@
+2022-01-18  Chris Dumez  <[email protected]>
+
+        When inserting a selected <option> in a <select> element, its selected state should remain
+        https://bugs.webkit.org/show_bug.cgi?id=235237
+
+        Reviewed by Darin Adler.
+
+        Rebaseline WPT test that is now passing.
+
+        * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt:
+
 2022-01-18  Alan Bujtas  <[email protected]>
 
         [LFC][Integration] Use IFC for preferred width computation for inline boxes

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288173 => 288174)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-19 02:31:32 UTC (rev 288174)
@@ -1,5 +1,17 @@
 2022-01-18  Chris Dumez  <[email protected]>
 
+        When inserting a selected <option> in a <select> element, its selected state should remain
+        https://bugs.webkit.org/show_bug.cgi?id=235237
+
+        Reviewed by Darin Adler.
+
+        Rebaseline WPT tests that are now passing.
+
+        * web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed-expected.txt:
+        * web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt:
+
+2022-01-18  Chris Dumez  <[email protected]>
+
         input.labels doesn't work inside shadow DOM
         https://bugs.webkit.org/show_bug.cgi?id=235326
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed-expected.txt (288173 => 288174)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed-expected.txt	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed-expected.txt	2022-01-19 02:31:32 UTC (rev 288174)
@@ -1,7 +1,7 @@
 
 
 PASS The last selected OPTION should win; Inserted by parser
-FAIL The last selected OPTION should win; Inserted by DOM API assert_equals: expected "Second" but got "First"
+PASS The last selected OPTION should win; Inserted by DOM API
 PASS The last selected OPTION should win; Inserted by jQuery append()
 PASS The last selected OPTION should win; Inserted by innerHTML
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt (288173 => 288174)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt	2022-01-19 02:31:32 UTC (rev 288174)
@@ -4,5 +4,5 @@
 PASS Validation on selects with display size set as more than one
 PASS Validation on selects with multiple set
 PASS Validation on selects with non-empty disabled option
-FAIL Remove and add back the placeholder label option assert_false: If the placeholder label option is selected, required select element shouldn't be valid. expected false got true
+PASS Remove and add back the placeholder label option
 

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt (288173 => 288174)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt	2022-01-19 02:31:32 UTC (rev 288174)
@@ -4,5 +4,5 @@
 FAIL Validation on selects with display size set as more than one assert_false: If no options are selected the select must be seen as invalid. expected false got true
 PASS Validation on selects with multiple set
 PASS Validation on selects with non-empty disabled option
-FAIL Remove and add back the placeholder label option assert_false: If the placeholder label option is selected, required select element shouldn't be valid. expected false got true
+PASS Remove and add back the placeholder label option
 

Modified: trunk/Source/WebCore/ChangeLog (288173 => 288174)


--- trunk/Source/WebCore/ChangeLog	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/ChangeLog	2022-01-19 02:31:32 UTC (rev 288174)
@@ -1,3 +1,76 @@
+2022-01-18  Chris Dumez  <[email protected]>
+
+        When inserting a selected <option> in a <select> element, its selected state should remain
+        https://bugs.webkit.org/show_bug.cgi?id=235237
+
+        Reviewed by Darin Adler.
+
+        When inserting a selected <option> in a <select> element, its selected state should remain and other selected
+        options should be de-selected.
+
+        This is as per the specification [1] that says:
+        """
+        If the multiple attribute is absent, whenever an option element in the select element's list of options has
+        its selectedness set to true, and whenever an option element with its selectedness set to true is added to
+        the select element's list of options, the user agent must set the selectedness of all the other option
+        elements in its list of options to false.
+        """
+
+        Firefox and Chrome correctly implement this.
+
+        WebKit was trying to implement this logic from inside HTMLOptionElement::insertedIntoAncestor(). However,
+        there were several issues with that:
+        1. It was checking m_isSelected after calling updateValidity(). updateValidity() would call recalcListItems(),
+           which could update m_isSelected. This part could have been addressed by saving m_isSelected before
+           calling updateValidity() but would not have addressed the following issues.
+        2. In the case where an <optgroup> containing several <option> elements is inserted into a <select>,
+           insertedIntoAncestor() gets called from each options being inserted. When calling insertedIntoAncestor()
+           from the first <option> and if this <option> is selected, it would deselect all following <option> elements
+           even though insertedIntoAncestor() has not yet been called for them. As a result, we would end up selecting
+           the first inserted <option> that had the selected state, instead of the last one.
+        3. When more than one <option> is inserted at once, the current implementation would be really inefficient as
+           every <option> would dirty and recalc the item list from insertedIntoAncestor().
+
+        To address these issues, I got rid of HTMLOptionElement::insertedIntoAncestor(). Instead we now deal with
+        <option> insertion from inside HTMLSelectElement::childrenChanged() and HTMLOptGroupElement::childrenChanged().
+        Using the parent element's childrenChanged() is useful because it only gets called once when several <option>
+        elements are inserted at once. I added logic to those childrenChanged() functions to keep track of the last
+        selected <option> element being inserted. Then, after we recalc the item list (which may change <option>s'
+        selected state, I make sure to this <option> is selected. This is similar to the logic that was previously
+        in HTMLOptionElement::insertedIntoAncestor().
+
+
+        [1] https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element
+
+        No new tests, rebaselined existing tests.
+
+        * dom/CharacterData.cpp:
+        (WebCore::makeChildChange):
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
+        (WebCore::makeChildChangeForRemoval):
+        (WebCore::makeChildChangeForInsertion):
+        (WebCore::ContainerNode::childrenChanged):
+        (WebCore::affectsElements): Deleted.
+        * dom/ContainerNode.h:
+        (WebCore::ContainerNode::ChildChange::isInsertion const):
+        (WebCore::ContainerNode::ChildChange::affectsElements const):
+        - Add 'siblingChanged' member to ChildChange in addition to the previous / next siblings.
+          This is useful for HTMLOptGroupElement and HTMLSelectElement where we want to know
+          if a newly inserted child is an HTMLOptionElement (and if it is selected).
+        - Move affectsElements() to the header so that it can be reused by HTMLOptGroupElement
+          and HTMLOptionElement.
+
+        * html/HTMLOptGroupElement.cpp:
+        (WebCore::HTMLOptGroupElement::childrenChanged):
+        * html/HTMLOptGroupElement.h:
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::insertedIntoAncestor): Deleted.
+        * html/HTMLOptionElement.h:
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::optionToSelectFromChildChangeScope): Added.
+        (WebCore::HTMLSelectElement::childrenChanged):
+
 2022-01-18  Michael Catanzaro  <[email protected]>
 
         Fix -Wmultichar warnings in HEVCUtilities.cpp

Modified: trunk/Source/WebCore/dom/CharacterData.cpp (288173 => 288174)


--- trunk/Source/WebCore/dom/CharacterData.cpp	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/dom/CharacterData.cpp	2022-01-19 02:31:32 UTC (rev 288174)
@@ -78,6 +78,7 @@
 {
     return {
         ContainerNode::ChildChange::Type::TextChanged,
+        nullptr,
         ElementTraversal::previousSibling(characterData),
         ElementTraversal::nextSibling(characterData),
         source

Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (288173 => 288174)


--- trunk/Source/WebCore/dom/ContainerNode.cpp	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp	2022-01-19 02:31:32 UTC (rev 288174)
@@ -112,7 +112,7 @@
 
     disconnectSubframesIfNeeded(*this, DescendantsOnly);
 
-    ContainerNode::ChildChange childChange { ChildChange::Type::AllChildrenRemoved, nullptr, nullptr, source };
+    ContainerNode::ChildChange childChange { ChildChange::Type::AllChildrenRemoved, nullptr, nullptr, nullptr, source };
 
     WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
     ScriptDisallowedScope::InMainThread scriptDisallowedScope;
@@ -152,6 +152,7 @@
 
     return {
         changeType,
+        dynamicDowncast<Element>(childToRemove),
         ElementTraversal::previousSibling(childToRemove),
         ElementTraversal::nextSibling(childToRemove),
         source
@@ -225,7 +226,7 @@
 static ContainerNode::ChildChange makeChildChangeForInsertion(ContainerNode& containerNode, Node& child, Node* beforeChild, ContainerNode::ChildChange::Source source, ReplacedAllChildren replacedAllChildren)
 {
     if (replacedAllChildren == ReplacedAllChildren::Yes)
-        return { ContainerNode::ChildChange::Type::AllChildrenReplaced, nullptr, nullptr, source };
+        return { ContainerNode::ChildChange::Type::AllChildrenReplaced, nullptr, nullptr, nullptr, source };
 
     auto changeType = [&] {
         if (is<Element>(child))
@@ -237,6 +238,7 @@
 
     return {
         changeType,
+        dynamicDowncast<Element>(child),
         beforeChild ? ElementTraversal::previousSibling(*beforeChild) : ElementTraversal::lastChild(containerNode),
         !beforeChild || is<Element>(*beforeChild) ? downcast<Element>(beforeChild) : ElementTraversal::nextSibling(*beforeChild),
         source
@@ -826,30 +828,11 @@
     return appendChild(newChild);
 }
 
-static bool affectsElements(const ContainerNode::ChildChange& change)
-{
-    switch (change.type) {
-    case ContainerNode::ChildChange::Type::ElementInserted:
-    case ContainerNode::ChildChange::Type::ElementRemoved:
-    case ContainerNode::ChildChange::Type::AllChildrenRemoved:
-    case ContainerNode::ChildChange::Type::AllChildrenReplaced:
-        return true;
-    case ContainerNode::ChildChange::Type::TextInserted:
-    case ContainerNode::ChildChange::Type::TextRemoved:
-    case ContainerNode::ChildChange::Type::TextChanged:
-    case ContainerNode::ChildChange::Type::NonContentsChildInserted:
-    case ContainerNode::ChildChange::Type::NonContentsChildRemoved:
-        return false;
-    }
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
 void ContainerNode::childrenChanged(const ChildChange& change)
 {
     document().incDOMTreeVersion();
 
-    if (affectsElements(change))
+    if (change.affectsElements())
         document().invalidateAccessKeyCache();
 
     // FIXME: Unclear why it's always safe to skip this when parser is adding children.

Modified: trunk/Source/WebCore/dom/ContainerNode.h (288173 => 288174)


--- trunk/Source/WebCore/dom/ContainerNode.h	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/dom/ContainerNode.h	2022-01-19 02:31:32 UTC (rev 288174)
@@ -80,6 +80,7 @@
         enum class Source : bool { Parser, API };
 
         ChildChange::Type type;
+        Element* siblingChanged;
         Element* previousSiblingElement;
         Element* nextSiblingElement;
         ChildChange::Source source;
@@ -102,6 +103,25 @@
             ASSERT_NOT_REACHED();
             return false;
         }
+
+        bool affectsElements() const
+        {
+            switch (type) {
+            case ChildChange::Type::ElementInserted:
+            case ChildChange::Type::ElementRemoved:
+            case ChildChange::Type::AllChildrenRemoved:
+            case ChildChange::Type::AllChildrenReplaced:
+                return true;
+            case ChildChange::Type::TextInserted:
+            case ChildChange::Type::TextRemoved:
+            case ChildChange::Type::TextChanged:
+            case ChildChange::Type::NonContentsChildInserted:
+            case ChildChange::Type::NonContentsChildRemoved:
+                return false;
+            }
+            ASSERT_NOT_REACHED();
+            return false;
+        }
     };
     virtual void childrenChanged(const ChildChange&);
 

Modified: trunk/Source/WebCore/html/HTMLOptGroupElement.cpp (288173 => 288174)


--- trunk/Source/WebCore/html/HTMLOptGroupElement.cpp	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/html/HTMLOptGroupElement.cpp	2022-01-19 02:31:32 UTC (rev 288174)
@@ -77,6 +77,15 @@
 
 void HTMLOptGroupElement::childrenChanged(const ChildChange& change)
 {
+    bool isRelevant = change.affectsElements();
+    RefPtr select = isRelevant ? ownerSelectElement() : nullptr;
+    if (!isRelevant || !select) {
+        HTMLElement::childrenChanged(change);
+        return;
+    }
+
+    auto selectOptionIfNecessaryScope = select->optionToSelectFromChildChangeScope(change, this);
+
     recalcSelectOptions();
     HTMLElement::childrenChanged(change);
 }

Modified: trunk/Source/WebCore/html/HTMLOptionElement.cpp (288173 => 288174)


--- trunk/Source/WebCore/html/HTMLOptionElement.cpp	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/html/HTMLOptionElement.cpp	2022-01-19 02:31:32 UTC (rev 288174)
@@ -315,23 +315,6 @@
     return downcast<HTMLOptGroupElement>(*parentNode()).isDisabledFormControl();
 }
 
-Node::InsertedIntoAncestorResult HTMLOptionElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
-{
-    if (RefPtr select = ownerSelectElement()) {
-        select->setRecalcListItems();
-        select->updateValidity();
-        // Do not call selected() since calling updateListItemSelectedStates()
-        // at this time won't do the right thing. (Why, exactly?)
-        // FIXME: Might be better to call this unconditionally, always passing m_isSelected,
-        // rather than only calling it if we are selected.
-        if (m_isSelected)
-            select->optionSelectionStateChanged(*this, true);
-        select->scrollToSelection();
-    }
-
-    return HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
-}
-
 String HTMLOptionElement::collectOptionInnerText() const
 {
     StringBuilder text;

Modified: trunk/Source/WebCore/html/HTMLOptionElement.h (288173 => 288174)


--- trunk/Source/WebCore/html/HTMLOptionElement.h	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/html/HTMLOptionElement.h	2022-01-19 02:31:32 UTC (rev 288174)
@@ -61,6 +61,7 @@
     String textIndentedToRespectGroupLabel() const;
 
     void setSelectedState(bool);
+    bool selectedWithoutUpdate() const { return m_isSelected; }
 
 private:
     HTMLOptionElement(const QualifiedName&, Document&);
@@ -71,7 +72,6 @@
 
     void parseAttribute(const QualifiedName&, const AtomString&) final;
 
-    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     bool accessKeyAction(bool) final;
 
     void childrenChanged(const ChildChange&) final;

Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (288173 => 288174)


--- trunk/Source/WebCore/html/HTMLSelectElement.cpp	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp	2022-01-19 02:31:32 UTC (rev 288174)
@@ -371,8 +371,47 @@
         recalcListItems();
 }
 
+CompletionHandlerCallingScope HTMLSelectElement::optionToSelectFromChildChangeScope(const ContainerNode::ChildChange& change, HTMLOptGroupElement* parentOptGroup)
+{
+    if (multiple())
+        return { };
+
+    auto getLastSelectedOption = [](HTMLOptGroupElement& optGroup) -> HTMLOptionElement* {
+        for (auto* option = Traversal<HTMLOptionElement>::lastChild(optGroup); option; option = Traversal<HTMLOptionElement>::previousSibling(*option)) {
+            if (option->selectedWithoutUpdate())
+                return option;
+        }
+        return nullptr;
+    };
+
+    RefPtr<HTMLOptionElement> optionToSelect;
+    if (change.type == ChildChange::Type::ElementInserted) {
+        if (is<HTMLOptionElement>(change.siblingChanged)) {
+            auto& option = downcast<HTMLOptionElement>(*change.siblingChanged);
+            if (option.selectedWithoutUpdate())
+                optionToSelect = &option;
+        } else if (!parentOptGroup && is<HTMLOptGroupElement>(change.siblingChanged))
+            optionToSelect = getLastSelectedOption(*downcast<HTMLOptGroupElement>(change.siblingChanged));
+    } else if (parentOptGroup && change.type == ContainerNode::ChildChange::Type::AllChildrenReplaced)
+        optionToSelect = getLastSelectedOption(*parentOptGroup);
+
+    return CompletionHandlerCallingScope { [optionToSelect = WTFMove(optionToSelect), isInsertion = change.isInsertion(), select = Ref { *this }] {
+        if (optionToSelect)
+            select->optionSelectionStateChanged(*optionToSelect, true);
+        else if (isInsertion)
+            select->scrollToSelection();
+    } };
+}
+
 void HTMLSelectElement::childrenChanged(const ChildChange& change)
 {
+    if (!change.affectsElements()) {
+        HTMLFormControlElementWithState::childrenChanged(change);
+        return;
+    }
+
+    auto selectOptionIfNecessaryScope = optionToSelectFromChildChangeScope(change);
+
     setRecalcListItems();
     updateValidity();
     m_lastOnChangeSelection.clear();

Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (288173 => 288174)


--- trunk/Source/WebCore/html/HTMLSelectElement.h	2022-01-19 01:48:56 UTC (rev 288173)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h	2022-01-19 02:31:32 UTC (rev 288174)
@@ -27,6 +27,7 @@
 
 #include "HTMLFormControlElementWithState.h"
 #include "TypeAhead.h"
+#include <wtf/CompletionHandler.h>
 
 namespace WebCore {
 
@@ -105,6 +106,8 @@
     void optionSelectionStateChanged(HTMLOptionElement&, bool optionIsSelected);
     bool allowsNonContiguousSelection() const { return m_allowsNonContiguousSelection; };
 
+    CompletionHandlerCallingScope optionToSelectFromChildChangeScope(const ChildChange&, HTMLOptGroupElement* parentOptGroup = nullptr);
+
 protected:
     HTMLSelectElement(const QualifiedName&, Document&, HTMLFormElement*);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to