Skip to content

Commit c67730b

Browse files
LanWei22AutomatedTester
authored andcommitted
Update index.html
1 parent 8b7bc12 commit c67730b

File tree

1 file changed

+191
-2
lines changed

1 file changed

+191
-2
lines changed

index.html

Lines changed: 191 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7951,8 +7951,8 @@ <h3>Dispatching actions</h3>
79517951
<tr><td>"<code>pointer</code>" <td>"<code>pointerUp</code>" <td><a>Dispatch a pointerUp action</a>
79527952
<tr><td>"<code>pointer</code>" <td>"<code>pointerMove</code> <td><a>Dispatch a pointerMove action</a>
79537953
<tr><td>"<code>pointer</code>" <td>"<code>pointerCancel</code> <td><a>Dispatch a pointerCancel action</a>
7954-
<tr><td>"<code>wheel</code>" <td>"<code>pause</code>" <td><a>Dispatch a pause action</a>
7955-
<tr><td>"<code>wheel</code>" <td>"<code>scroll</code>" <td><a>Dispatch a scroll action</a>
7954+
<tr><td>"<code>wheel</code>" <td>"<code>pause</code>" <td><a>Dispatch a pause action</a>
7955+
<tr><td>"<code>wheel</code>" <td>"<code>scroll</code>" <td><a>Dispatch a scroll action</a>
79567956
</table>
79577957

79587958
<li><a>Try</a> to run <var>algorithm</var> with arguments
@@ -8721,6 +8721,195 @@ <h4>Pointer actions</h4>
87218721
<li><p>Return <a>success</a> with data <a><code>null</code></a>.
87228722
</ol>
87238723
</section> <!-- /pointer-actions -->
8724+
8725+
8726+
<section>
8727+
<h4>Wheel actions</h4>
8728+
8729+
<p>When required to <dfn>dispatch a scroll action</dfn> with
8730+
arguments <var>source id</var>, <var>action object</var>,
8731+
<var>input state</var> and <var>tick duration</var> a
8732+
<a>remote end</a> must run the following steps:
8733+
8734+
<ol>
8735+
<li><p>Let <var>x offset</var> be equal to the <code>x</code>
8736+
property of <var>action object</var>.
8737+
8738+
<li><p>Let <var>y offset</var> be equal to the <code>y</code>
8739+
property of <var>action object</var>.
8740+
8741+
<li><p>Let <var>start x</var> be equal to the <code>x</code>
8742+
property of <var>input state</var>.
8743+
8744+
<li><p>Let <var>start y</var> be equal to the <code>y</code>
8745+
property of <var>input state</var>.
8746+
8747+
<li><p>Let <var>origin</var> be equal to the <code>origin</code>
8748+
property of <var>action object</var>.
8749+
8750+
<li><p>Run the substeps of the first matching value
8751+
of <var>origin</var>:
8752+
8753+
<dl>
8754+
<dt>"<code>viewport</code>"
8755+
<dd><p>Let <var>x</var> equal <var>x offset</var> and
8756+
<var>y</var> equal <var>y offset</var>.</dd>
8757+
8758+
<dt>"<code>pointer</code>"
8759+
<dd><p>Let <var>x</var> equal <var>start x</var> +
8760+
<var>x offset</var> and <var>y</var> equal
8761+
<var>start y</var> + <var>y offset</var>.</dd>
8762+
8763+
<dt>An object that <a>represents a web element</a></dt>
8764+
<dd>
8765+
<ol>
8766+
<li><p>Let <var>element</var> be equal to the result
8767+
of <a>trying</a> to <a>get a known connected element</a> with
8768+
argument <var>origin</var>.
8769+
8770+
<li><p>Let <var>x element</var> and <var>y element</var> be the
8771+
result of calculating the <a>in-view center point</a>
8772+
of <var>element</var>.
8773+
8774+
<li><p>Let <var>x</var> equal <var>x element</var> +
8775+
<var>x offset</var>, and <var>y</var> equal
8776+
<var>y element</var> + <var>y offset</var>.
8777+
</ol>
8778+
</dd>
8779+
</dl>
8780+
8781+
<li><p>If <var>x</var> is less than 0 or greater than the width of
8782+
the viewport in <a>CSS pixels</a>, then
8783+
return <a>error</a> with error code <a>move target out of
8784+
bounds</a>.
8785+
8786+
<li><p>If <var>y</var> is less than 0 or greater than the height of
8787+
the viewport in <a>CSS pixels</a>, then
8788+
return <a>error</a> with error code <a>move target out of
8789+
bounds</a>.
8790+
8791+
<li><p>Let <var>delta x</var> be equal to the <code>delta x</code>
8792+
property of <var>action object</var>.
8793+
8794+
<li><p>Let <var>delta y</var> be equal to the <code>delta y</code>
8795+
property of <var>action object</var>.
8796+
8797+
<li><p>Let <var>duration</var> be equal to
8798+
<var>action object</var>’s <code>duration</code> property if it
8799+
is not <a>undefined</a>, or <var>tick duration</var>
8800+
otherwise.
8801+
8802+
<li><p>If <var>duration</var> is greater than 0 and inside any
8803+
implementation-defined bounds, <a>asynchronously wait</a> for an
8804+
implementation defined amount of time to pass.
8805+
8806+
<aside><p>This wait allows the implementation to model the overall
8807+
pointer move as a series of small movements occurring at an
8808+
implementation defined rate (e.g. one movement per
8809+
vsync).</p></aside>
8810+
</li>
8811+
8812+
<li><p><a>Perform a scroll</a> with arguments
8813+
<var>source id</var>, <var>input state</var>, <var>duration</var>,
8814+
<var>x</var>, <var>y</var>, <var>delta x</var>, <var>delta y</var>.
8815+
8816+
<li><p>Return <a>success</a> with data <a><code>null</code></a>.
8817+
</ol>
8818+
8819+
<p>When required to <dfn>perform a scroll</dfn> with
8820+
arguments <var>source id</var>, <var>input state</var>,
8821+
<var>duration</var>, <var>x</var>, <var>y</var>,
8822+
<var>target delta x</var> and <var>target delta y</var>,
8823+
an implementation must run the following steps:
8824+
8825+
<ol>
8826+
<li><p>Let <var>time delta</var> be the time since the beginning of
8827+
the current <a>tick</a>, measured in milliseconds on a monotonic
8828+
clock.
8829+
8830+
<li><p>Let <var>duration ratio</var> be the ratio of
8831+
<var>time delta</var> and <var>duration</var>, if <var>duration</var>
8832+
is greater than 0, or 1 otherwise.
8833+
8834+
<li><p>If <var>duration ratio</var> is 1, or close enough to 1 that
8835+
the implementation will not further subdivide the move action,
8836+
let <var>last</var> be true. Otherwise let <var>last</var>
8837+
be <code>false</code>.
8838+
8839+
<li><p>Let <var>current delta x</var> equal the <code>delta x</code>
8840+
property of <var>input state</var>.
8841+
8842+
<li><p>Let <var>current delta y</var> equal the <code>delta y</code>
8843+
property of <var>input state</var>.
8844+
8845+
<li><p>If <var>last</var> is true, let <var>delta x</var> equal
8846+
<var>target delta x</var> - <var>current delta x</var> and
8847+
<var>delta y</var> equal <var>target delta y</var> -
8848+
<var>current delta y</var>.
8849+
8850+
<p>Otherwise let <var>delta x</var> equal an approximation
8851+
to <var>duration ratio</var> &times; <var>target delta x</var>,
8852+
and <var>delta y</var> equal an approximation to
8853+
<var>duration ratio</var> &times; <var>target delta y</var>.
8854+
8855+
<li><p>If <var>current delta x</var> is not equal to
8856+
<var>target delta x</var> or <var>current delta y</var> is not equal
8857+
to <var>target delta y</var>, run the following steps:
8858+
8859+
<ol>
8860+
<li><p><a>Perform implementation-specific
8861+
action dispatch steps</a> equivalent to wheel scroll with
8862+
ID <var>source id</var> at viewport x coordinate <var>x</var>,
8863+
viewport y coordinate <var>y</var>, <var>delta x</var>,
8864+
<var>delta y</var>, in accordance with the
8865+
requirements of [[UI-EVENTS]].
8866+
8867+
<li><p>Let <var>input state</var>’s <code>x</code> property
8868+
equal <var>x</var> and <code>y</code> property
8869+
equal <var>y</var>.
8870+
8871+
<li><p>Let <var>input state</var>’s <code>delta x</code> property
8872+
equal <var>delta x</var> + <var>current delta x</var> and
8873+
<code>delta y</code> property equal
8874+
<var>delta y</var> + <var>current delta y</var>.
8875+
</ol>
8876+
8877+
<li><p>If <var>last</var> is true, return.
8878+
8879+
<li><p>Run the following substeps <a>in parallel</a>:
8880+
8881+
<aside class=note>
8882+
<p>This algorithm may trigger multiple events spread across some
8883+
duration. Parallelism is applied intentionally in order to manage the
8884+
scheduling of these events relative to the events triggered by other
8885+
actions in the same tick.
8886+
8887+
<p>The initial scroll is performed synchronously. This ensures
8888+
determinism in the sequence of the first event triggered by each
8889+
action in the tick.
8890+
8891+
<p>Subsequent scrolls (if any) are performed asynchronously. This allows
8892+
events from two <a>scroll</a> actions in the tick to be interspersed.
8893+
</aside>
8894+
8895+
<ol>
8896+
<li><p><a>Asynchronously wait</a> for an implementation defined
8897+
amount of time to pass.
8898+
8899+
<aside><p>This wait allows the implementation to model the overall
8900+
scroll as a series of small scrolls occurring at an
8901+
implementation defined rate (e.g. one scroll per
8902+
vsync).</aside>
8903+
8904+
<li><p><a>Perform a scroll</a> with arguments
8905+
<var>source id</var>, <var>input state</var>, <var>duration</var>,
8906+
<var>x</var>, <var>y</var>, <var>delta x</var>, <var>delta y</var>,
8907+
<var>target delta x</var>, <var>target delta y</var>.
8908+
</ol>
8909+
8910+
</ol>
8911+
8912+
</section> <!-- /wheel-actions -->
87248913
</section> <!-- /dispatching-actions -->
87258914

87268915

0 commit comments

Comments
 (0)