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

Implement WebDriver BiDi interception in the show file picker algorithm #11030

Merged
merged 17 commits into from
Mar 12, 2025
Merged
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4615,6 +4615,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigable-destroyed">WebDriver BiDi navigable destroyed</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-user-prompt-closed">WebDriver BiDi user prompt closed</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-user-prompt-opened">WebDriver BiDi user prompt opened</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-file-dialog-opened">WebDriver BiDi file dialog opened</dfn></li>
</ul>
</dd>

Expand Down Expand Up @@ -53263,19 +53264,30 @@ You cannot submit this form when the field is incorrect.</samp></pre>
<ol>
<li><p>Optionally, wait until any prior execution of this algorithm has terminated.</p></li>

<li><p>Display a prompt to the user requesting that the user specify some files. If the <code
data-x="attr-input-multiple">multiple</code> attribute is not set on <var>element</var>, there
must be no more than one file selected; otherwise, any number may be selected. Files can be
from the filesystem or created on the fly, e.g., a picture taken from a camera connected to the
user's device.</p></li>
<li><p>Let <var>dismissed</var> be the result of <span>WebDriver BiDi file dialog opened</span>
with <var>element</var>.</p></li>

<li><p>Wait for the user to have made their selection.</p></li>
<li>
<p>If <var>dismissed</var> is false:</p>

<li><p>If the user dismissed the prompt without changing their selection, then <span>queue an
element task</span> on the <span>user interaction task source</span> given <var>element</var>
to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-cancel">cancel</code> at <var>element</var>, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
<ol>
<li><p>Display a prompt to the user requesting that the user specify some files. If the <code
data-x="attr-input-multiple">multiple</code> attribute is not set on <var>element</var>, there
must be no more than one file selected; otherwise, any number may be selected. Files can be
from the filesystem or created on the fly, e.g., a picture taken from a camera connected to the
user's device.</p></li>

<li><p>Wait for the user to have made their selection.</p></li>
</ol>
</li>

<li>
<p>If <var>dismissed</var> is true or if the user dismissed the prompt without changing their
selection, queue an element task</span> on the <span>user interaction task source</span>
given <var>element</var> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-cancel">cancel</code> at <var>element</var>, with the
<code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p>
</li>

<li><p>Otherwise, <span>update the file selection</span> for <var>element</var>.</p></li>
</ol>
Expand Down Expand Up @@ -147558,6 +147570,7 @@ INSERT INTERFACES HERE
Magnus Kristiansen<!-- Dashiva -->,
Maik Merten,
Majid Valipour,
Maksim Sadym,
Malcolm Rowe,
Manish Goregaokar,
Manish Tripathi,
Expand Down