Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add invoke popover defaults #9875

Closed

Conversation

keithamus
Copy link
Contributor

@keithamus keithamus commented Oct 22, 2023

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


/browsers.html ( diff )
/form-elements.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/input.html ( diff )
/interaction.html ( diff )
/popover.html ( diff )
/rendering.html ( diff )
/web-messaging.html ( diff )
/webappapis.html ( diff )
/webstorage.html ( diff )
/workers.html ( diff )
/invokers.html ( diff )

This specifies some of the detail within the Invokers proposal (whatwg#9625).

This introduces 2 new IDLs:

- InvokeEvent: A new event that has `action` and `invoker`.
- InvokeElement: A mixin applied to Buttons to add
  `invokeTargetElement`/`invokeAction`

It also adds the `invoketarget` & `invokeaction` attributes which are
reflected to the IDL properties.

It also adds the steps for invocation: button activation checks if the
node has an invokeTarget and dispatches an InvokeEvent if so.

Things NOT covered in this commit that are included in the propoal (whatwg#9625):

- Default per element behaviours (invocation action algorithms), this
  will be dealt with in subsequent individual commits.

- `interestaction` and `interesttarget`.
This specifies what buttons with an invoketarget pointing to an element
with `popover` should do, based on the Invokers proposal (whatwg#9625).

This introduces new specifications just within the "invoke target attribute activation behavior" algorithm such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the logic and be passed over to the "invocation action algorithm" for
the invokee element, if present.

Things NOT covered in this commit that are included in the propoal (whatwg#9625):

- Default per element behaviours (invocation action algorithms) beyond
  popovers. These will be dealt with in subsequent commits adding each
  elements "invocation action algorithm".

- `interestaction` and `interesttarget`.
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 23, 2023
This adds logic on how buttons with an invoketarget pointing to an element
with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 24, 2023
This adds logic on how buttons with an invoketarget pointing to an element
with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 24, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 25, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 26, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 26, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
aarongable pushed a commit to chromium/chromium that referenced this pull request Oct 26, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 26, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 26, 2023
This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 14, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 15, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 16, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarharchromium.org>
Reviewed-by: Mason Freed <masonfchromium.org>
Commit-Queue: Luke <lukewarlow156gmail.com>
Cr-Commit-Position: refs/heads/main{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679

UltraBlame original commit: b27368ba33d1f944a4095e9da65a5ba0f9e7468c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 16, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarharchromium.org>
Reviewed-by: Mason Freed <masonfchromium.org>
Commit-Queue: Luke <lukewarlow156gmail.com>
Cr-Commit-Position: refs/heads/main{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679

UltraBlame original commit: b27368ba33d1f944a4095e9da65a5ba0f9e7468c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 16, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarharchromium.org>
Reviewed-by: Mason Freed <masonfchromium.org>
Commit-Queue: Luke <lukewarlow156gmail.com>
Cr-Commit-Position: refs/heads/main{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679

UltraBlame original commit: b27368ba33d1f944a4095e9da65a5ba0f9e7468c
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 20, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Nov 20, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Luke <lukewarlow156@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 21, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarharchromium.org>
Reviewed-by: Mason Freed <masonfchromium.org>
Commit-Queue: Luke <lukewarlow156gmail.com>
Cr-Commit-Position: refs/heads/main{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679

UltraBlame original commit: 58967bcff55d26afac9d0ad9e5de05b06a5faf41
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 21, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarharchromium.org>
Reviewed-by: Mason Freed <masonfchromium.org>
Commit-Queue: Luke <lukewarlow156gmail.com>
Cr-Commit-Position: refs/heads/main{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679

UltraBlame original commit: 58967bcff55d26afac9d0ad9e5de05b06a5faf41
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 21, 2023
…utton DefaultEventHandler, a=testonly

Automatic update from web-platform-tests
Add invoketarget logic for popovers in button DefaultEventHandler

This adds logic on how buttons with an invoketarget pointing to an
element with `popover` should behave, based on the Invokers proposal.

See explainer section here:
https://open-ui.org/components/invokers.explainer/#defaults.

See related spec PR here: whatwg/html#9875

This introduces new behavior just within the HTML Form Control
`DefaultEventHandler` function such that:

 - If an `invoketarget` points to an element with `popover`
    - If the `invokeaction` is `auto` or `togglePopover`, try to toggle
      the popover
    - If the `invokeaction` is `hidePopover`, try to hide the popover
    - If the `invokeaction` is `showPopover`, try to show the popover

If the `invokeaction` is none of the above, then it will fall through
the to `HandleInvokeInternal` which is passed the lowercased atom so
element subclasses can handle their individual behaviors.

Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <jarharchromium.org>
Reviewed-by: Mason Freed <masonfchromium.org>
Commit-Queue: Luke <lukewarlow156gmail.com>
Cr-Commit-Position: refs/heads/main{#1215820}

--

wpt-commits: a86d7454b3b6c8e33fed6a05b08ff081d62bf680
wpt-pr: 42679

UltraBlame original commit: 58967bcff55d26afac9d0ad9e5de05b06a5faf41
data-x="dom-invokeevent-invoker">invoker</code> set to <var>node</var>, and its <code
data-x="dom-Event-cancelable">cancelable</code> attribute initialized to true.</p></li>

<li>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like it'd be easier to read if each element had a map of "invoke actions" to algorithms. Then you'd be able to see at a glance which actions were supported by an element, without reading through prose.

@keithamus
Copy link
Contributor Author

This is now part of #9841

@keithamus keithamus closed this Feb 13, 2024
@keithamus keithamus deleted the keithamus/add-invoke-popover-defaults branch February 13, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants