diff --git a/source b/source index de407dd6dc0..22bb7f8063e 100644 --- a/source +++ b/source @@ -1794,6 +1794,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute stack of open elements of an HTML parser, then process internal resource links given insertedNode's node document.

+ +
  • Run maybe clone option into select button given + insertedNode.

  • The removing steps for the HTML Standard, given @@ -1838,6 +1841,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

  • If removedNode's popover attribute is not in the no popover state, then run the hide popover algorithm given removedNode, false, false, and false.

  • + +
  • Run maybe clone option into select button given + oldParent.

  • A The child concept

  • The root and shadow-including root concepts
  • The inclusive ancestor, + ancestor, descendant, shadow-including ancestor, shadow-including descendant, @@ -3953,6 +3960,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • The concept widget
  • The concept native appearance
  • The concept primitive appearance
  • +
  • The concept base appearance
  • The concept element with default preferred size
  • The non-devolvable widget and devolvable widget classification, and the related @@ -4153,6 +4161,12 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • 'content-visibility' property
  • 'auto' value for 'content-visibility'
  • + +

    The following terms are defined in CSS Anchor Positioning: CSSANCHOR

    + + @@ -53096,6 +53110,10 @@ interface HTMLButtonElement : HTMLElement {
  • If element's node document is not fully active, then return.

  • +
  • If element's parent is a select element, then + show the picker, if applicable given element's parent and + return.

  • +
  • If element has a form owner then switch on element's type attribute's state, then:

    @@ -54156,6 +54174,89 @@ interface HTMLOptionElement : HTMLElement { +

    To get the option element ancestor select given an option + option:

    + +
      +
    1. +

      For each ancestor of option's ancestors:

      + +
        +
      1. If ancestor is a select, then return + ancestor.

      2. +
      +
    2. + +
    3. Return null.

    4. +
    + +

    To maybe clone option into select button, given an Element + element:

    + +
      +
    1. +

      For each ancestor of element's ancestors:

      + +
        +
      1. +

        If all of the following conditions are true:

        + +
          +
        • ancestor is an option element;

        • + +
        • ancestor has a non-null option element ancestor + select;

        • + +
        • ancestor's option element ancestor select is rendered as a + drop-down box;

        • + +
        • ancestor's selectedness + is true,

        • +
        + +

        then set ancestor's option element ancestor select's select + fallback button text to the value of ancestor's label.

        +
      2. +
      +
    2. +
    + +

    Whenever an option option's selectedness is set to true, run maybe clone + option into select button given option.

    + +

    The activation behavior of an option option is to run the + following steps:

    + +
      +
    1. Let select be the option element ancestor select given + option.

    2. + +
    3. If select is null, then return.

    4. + +
    5. Set option's selectedness to + true.

    6. + +
    7. Set option's dirtiness to + true.

    8. + +
    9. Send select update notifications given + select.

    10. + +
    11. +

      If select is being rendered as a drop-down box with base + appearance:

      + +
        +
      1. Run the hide popover algorithm given the first item in select's + select popover slot's assigned nodes.

      2. +
      +
    12. +
    +
    option.selected
    @@ -135678,12 +135779,98 @@ progress { appearance: auto; } with the element's optgroup element children providing headers for groups of options where applicable.

    + + +

    select elements which render as a drop-down box support a base + appearance in addition to native appearance and primitive + appearance.

    + +

    When a select is being rendered as a drop-down box with a base + appearance, it is expected to render as if it has the following shadow + root:

    + +
    <slot id="select-button-slot">
    +  <div id="select-fallback-button-text"></div>
    +</slot>
    +<div id="select-popover" popover="auto">
    +  <slot id="select-popover-slot"></slot>
    +</div>
    + +

    Since base appearance is determined by computing style, it isn't + possible to swap this DOM structure when switching appearance. Implementations can always include + the DOM structure for base appearance when the select is rendered as a + drop-down box and then choose to include or exclude it from the layout tree in order + to control whether it gets rendered or not.

    + +

    select elements rendered as a drop-down box with base + appearance each contain the following elements as shown with ID attributes in the above + HTML:

    + + + + +

    The implicit anchor element of the select popover element is the + select element shadow host of the shadow host in which select popover + resides.

    + +

    The shadow root used for select's drop-down box + base appearance must have its slot assignment set to "manual". The shadow root must also have delegates focus + set to true if select button slot has an assigned node.

    + +

    Without delegates focus set to true, the select itself + would receive focus instead of the button which is slotted into the select + button slot.

    + +

    select elements rendered as a drop-down box with base + appearance must render as if they are using manual slot assignment with the + following base select slotting algorithm to assign + their child nodes to slots. To perform the base select slotting algorithm, given a + select element select:

    + +
      +
    1. Let firstButton be null.

    2. + +
    3. Let otherChildren be « ».

    4. + +
    5. +

      For each Node child in + select's children:

      + +
        +
      1. If child is a button and firstButton is null, then set + firstButton to child.

      2. + +
      3. Otherwise, append child to + otherChildren.

      4. +
      +
    6. + +
    7. Set select's select button slot's manually assigned + nodes to firstButton.

    8. + +
    9. Set select's select popover slot's manually assigned + nodes to otherChildren.

    10. +
    +

    An optgroup element is expected to be rendered by displaying the element's label attribute.

    An option element is expected to be rendered by displaying the element's label, indented under its optgroup element if it - has one.

    + has one. If the option is being rendered in a select which is being + rendered as a drop-down box with base appearance, then the + option is expected to render all of its children rather than by displaying its label.

    Each sequence of one or more child hr element siblings may be rendered as a single separator.

    @@ -143126,6 +143313,9 @@ INSERT INTERFACES HERE
    [CSSALIGN]
    CSS Box Alignment, E. Etemad, T. Atkins. W3C.
    +
    [CSSANCHOR]
    +
    CSS Anchor Positioning, T. Atkins, E. Etemad, I. Kilpatrick. W3C.
    +
    [CSSANIMATIONS]
    CSS Animations, D. Jackson, D. Hyatt, C. Marrin, S. Galineau, L. Baron. W3C.