Skip to content

Commit 09ad1b9

Browse files
Implement WebDriver BiDi interception in the show file picker algorithm
See w3c/webdriver-bidi#494 and w3c/webdriver-bidi#883.
1 parent 3c65193 commit 09ad1b9

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

source

+22-11
Original file line numberDiff line numberDiff line change
@@ -4617,6 +4617,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
46174617
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigable-destroyed">WebDriver BiDi navigable destroyed</dfn></li>
46184618
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-user-prompt-closed">WebDriver BiDi user prompt closed</dfn></li>
46194619
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-user-prompt-opened">WebDriver BiDi user prompt opened</dfn></li>
4620+
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-file-dialog-opened">WebDriver BiDi file dialog opened</dfn></li>
46204621
</ul>
46214622
</dd>
46224623

@@ -53265,19 +53266,28 @@ You cannot submit this form when the field is incorrect.</samp></pre>
5326553266
<ol>
5326653267
<li><p>Optionally, wait until any prior execution of this algorithm has terminated.</p></li>
5326753268

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

53274-
<li><p>Wait for the user to have made their selection.</p></li>
53272+
<li>
53273+
<p>If <var>dismissed</var> is false:</p>
5327553274

53276-
<li><p>If the user dismissed the prompt without changing their selection, then <span>queue an
53277-
element task</span> on the <span>user interaction task source</span> given <var>element</var>
53278-
to <span data-x="concept-event-fire">fire an event</span> named <code
53279-
data-x="event-cancel">cancel</code> at <var>element</var>, with the <code
53280-
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
53275+
<ol>
53276+
<li><p>Display a prompt to the user requesting that the user specify some files. If the <code
53277+
data-x="attr-input-multiple">multiple</code> attribute is not set on <var>element</var>, there
53278+
must be no more than one file selected; otherwise, any number may be selected. Files can be
53279+
from the filesystem or created on the fly, e.g., a picture taken from a camera connected to the
53280+
user's device.</p></li>
53281+
53282+
<li><p>Wait for the user to have made their selection.</p></li>
53283+
</ol>
53284+
</li>
53285+
53286+
<li><p>If <var>dismissed</var> is true or if the user dismissed the prompt without changing
53287+
their selection, then <span>queue an element task</span> on the <span>user interaction task
53288+
source</span> given <var>element</var> to <span data-x="concept-event-fire">fire an
53289+
event</span> named <code data-x="event-cancel">cancel</code> at <var>element</var>, with the
53290+
<code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
5328153291

5328253292
<li><p>Otherwise, <span>update the file selection</span> for <var>element</var>.</p></li>
5328353293
</ol>
@@ -147560,6 +147570,7 @@ INSERT INTERFACES HERE
147560147570
Magnus Kristiansen<!-- Dashiva -->,
147561147571
Maik Merten,
147562147572
Majid Valipour,
147573+
Maksim Sadym,
147563147574
Malcolm Rowe,
147564147575
Manish Goregaokar,
147565147576
Manish Tripathi,

0 commit comments

Comments
 (0)