Skip to content

Commit 9fb6731

Browse files
committed
actions: update additional properties section
Create optional properties table Update pointer actions dispatch sections to take the additional properties into account
1 parent 120397c commit 9fb6731

File tree

1 file changed

+108
-9
lines changed

1 file changed

+108
-9
lines changed

index.html

+108-9
Original file line numberDiff line numberDiff line change
@@ -6909,20 +6909,56 @@ <h3 id=input-source-state>State</h3>
69096909
a <code>pressed</code> property which is a set of unsigned integers,
69106910
an <code>x</code> property which is an unsigned integer,
69116911
and a <code>y</code> property which is an unsigned integer.
6912-
Additionally, it also contains optional properties
6913-
<code>width</code>, <code>height</code>, <code>pressure</code>, and
6914-
<code>tangentialPressure</code> which are floating-point numbers, and
6915-
<code>tiltX</code>, <code>tiltY</code>, and <code>twist</code> which
6916-
are integers in accordance with the requirements of [[!POINTER-EVENTS]].
6912+
6913+
<p>Additionally, a <a>pointer input state</a> object also contains
6914+
<dfn>optional pointer properties</dfn> as shown in the table below
6915+
in accordance with the requirements of [[!POINTER-EVENTS]].
6916+
6917+
<table class=simple>
6918+
<thead>
6919+
<tr>
6920+
<th>Property
6921+
<th>Type
6922+
</tr>
6923+
</thead>
6924+
<tr>
6925+
<td><code>width</code>
6926+
<td><a>floating-point number</a>
6927+
</tr>
6928+
<tr>
6929+
<td><code>height</code>
6930+
<td><a>floating-point number</a>
6931+
</tr>
6932+
<tr>
6933+
<td><code>pressure</code>
6934+
<td><a>floating-point number</a>
6935+
</tr>
6936+
<tr>
6937+
<td><code>tangentialPressure</code>
6938+
<td><a>floating-point number</a>
6939+
</tr>
6940+
<tr>
6941+
<td><code>tiltX</code>
6942+
<td><a>integer</a>
6943+
</tr>
6944+
<tr>
6945+
<td><code>tiltY</code>
6946+
<td><a>integer</a>
6947+
</tr>
6948+
<tr>
6949+
<td><code>twist</code>
6950+
<td><a>integer</a>
6951+
</tr>
6952+
</table>
69176953

69186954
<p>When required to <dfn>create a new pointer input state</dfn> object
69196955
with arguments <var>subtype</var> an implementation must return
69206956
a <a>pointer input state</a> object with <code>subtype</code> set
69216957
to <var>subtype</var>, <code>pressed</code> set to an empty set,
6922-
both <code>x</code> and <code>y</code> set to <code>0</code>, and
6958+
both <code>x</code> and <code>y</code> set to <code>0</code>,
69236959
<code>width</code>, <code>height</code>, <code>pressure</code>,
69246960
<code>tangentialPressure</code>, <code>tiltX</code>, <code>tiltY</code>,
6925-
and <code>twist</code> are set to null.
6961+
and <code>twist</code> set to <a>null</a>.
69266962

69276963
<p>Each <a>session</a> has an associated <dfn>input state table</dfn>.
69286964
This is a map between <a>input id</a>
@@ -8250,6 +8286,9 @@ <h2>Pointer actions</h2>
82508286
<var>input state</var>’s <code>pressed</code> property, and
82518287
let <var>buttons</var> be the resulting value of that property.
82528288

8289+
<li><p><a>Set input state optional pointer properties</a> with
8290+
arguments <var>action object</var>, <var>input state</var>.
8291+
82538292
<li><p>Append a copy of <var>action object</var> with
82548293
the <var>subtype</var> property changed to <var>pointerUp</var> to
82558294
the <a>current session</a>’s <a>input cancel list</a>.
@@ -8259,7 +8298,9 @@ <h2>Pointer actions</h2>
82598298
numbered <var>button</var> on the pointer with ID
82608299
<var>source id</var>, having type <var>pointerType</var> at
82618300
viewport x coordinate <var>x</var>, viewport y
8262-
coordinate <var>y</var>, with buttons <var>buttons</var> depressed
8301+
coordinate <var>y</var>, with buttons <var>buttons</var> depressed,
8302+
and type specific properties set to the <var>input state</var>’s
8303+
<a>optional pointer properties</a> that are not <a>null</a>,
82638304
in accordance with the requirements of [[!UI-EVENTS]] and
82648305
[[!POINTER-EVENTS]]. The generated events must
82658306
set <code>ctrlKey</code>, <code>shiftKey</code>, <code>altKey</code>,
@@ -8297,6 +8338,9 @@ <h2>Pointer actions</h2>
82978338
<li><p>Let <var>y</var> be equal to <var>input state</var>’s
82988339
<code>y</code> property.
82998340

8341+
<li><p><a>Set input state optional pointer properties</a> with
8342+
arguments <var>action object</var>, <var>input state</var>.
8343+
83008344
<li><p>Remove <var>button</var> from the set corresponding
83018345
to <var>input state</var>’s <code>pressed</code> property, and
83028346
let <var>buttons</var> be the resulting value of that
@@ -8308,6 +8352,8 @@ <h2>Pointer actions</h2>
83088352
<var>source id</var> having type <var>pointerType</var> at
83098353
viewport x coordinate <var>x</var>, viewport y
83108354
coordinate <var>y</var>, with buttons <var>buttons</var> depressed,
8355+
and type specific properties set to the <var>input state</var>’s
8356+
<a>optional pointer properties</a> that are not <a>null</a>,
83118357
in accordance with the requirements of [[!UI-EVENTS]] and
83128358
[[!POINTER-EVENTS]]. The generated events must
83138359
set <code>ctrlKey</code>, <code>shiftKey</code>, <code>altKey</code>,
@@ -8385,6 +8431,9 @@ <h2>Pointer actions</h2>
83858431
return <a>error</a> with error code <a>move target out of
83868432
bounds</a>.
83878433

8434+
<li><p><a>Set input state optional pointer properties</a> with
8435+
arguments <var>action object</var>, <var>input state</var>.
8436+
83888437
<li><p>Let <var>duration</var> be equal to
83898438
<var>action object</var>’s <code>duration</code> property if it
83908439
is not <a>undefined</a>, or <var>tick duration</var>
@@ -8456,7 +8505,9 @@ <h2>Pointer actions</h2>
84568505
viewport x coordinate <var>current x</var>, viewport y
84578506
coordinate <var>y</var> to viewport x coordinate <var>x</var> and
84588507
viewport y coordinate <var>y</var>, with
8459-
buttons <var>buttons</var> depressed, in accordance with the
8508+
buttons <var>buttons</var> depressed, and type specific properties
8509+
set to the <var>input state</var>’s <a>optional pointer properties</a>
8510+
that are not <a>null</a>, in accordance with the
84608511
requirements of [[!UI-EVENTS]] and [[!POINTER-EVENTS]]. The
84618512
generated events must set <code>ctrlKey</code>, <code>shiftKey</code>,
84628513
<code>altKey</code>, and <code>metaKey</code> from the
@@ -8509,6 +8560,54 @@ <h2>Pointer actions</h2>
85098560

85108561
</ol>
85118562

8563+
<p>When required to <dfn>set input state optional pointer properties</dfn>
8564+
with arguments <var>action object</var>, <var>input state</var>,
8565+
an implementation must run the following steps:
8566+
8567+
<ol>
8568+
<li><p>Let <var>width</var> be equal to
8569+
<var>action object</var>’s <code>width</code> property.
8570+
8571+
<li><p>If <var>width</var> is not <a>undefined</a>, let <var>input state</var>’s
8572+
<code>width</code> property equal <var>width</var>.
8573+
8574+
<li><p>Let <var>height</var> be equal to
8575+
<var>action object</var>’s <code>height</code> property.
8576+
8577+
<li><p>If <var>height</var> is not <a>undefined</a>, let <var>input state</var>’s
8578+
<code>height</code> property equal <var>height</var>.
8579+
8580+
<li><p>Let <var>pressure</var> be equal to
8581+
<var>action object</var>’s <code>pressure</code> property.
8582+
8583+
<li><p>If <var>pressure</var> is not <a>undefined</a>, let <var>input state</var>’s
8584+
<code>pressure</code> property equal <var>pressure</var>.
8585+
8586+
<li><p>Let <var>tangentialPressure</var> be equal to
8587+
<var>action object</var>’s <code>tangentialPressure</code> property.
8588+
8589+
<li><p>If <var>tangentialPressure</var> is not <a>undefined</a>, let <var>input state</var>’s
8590+
<code>tangentialPressure</code> property equal <var>tangentialPressure</var>.
8591+
8592+
<li><p>Let <var>tiltX</var> be equal to
8593+
<var>action object</var>’s <code>tiltX</code> property.
8594+
8595+
<li><p>If <var>tiltX</var> is not <a>undefined</a>, let <var>input state</var>’s
8596+
<code>tiltX</code> property equal <var>tiltX</var>.
8597+
8598+
<li><p>Let <var>tiltY</var> be equal to
8599+
<var>action object</var>’s <code>tiltY</code> property.
8600+
8601+
<li><p>If <var>tiltY</var> is not <a>undefined</a>, let <var>input state</var>’s
8602+
<code>tiltY</code> property equal <var>tiltY</var>.
8603+
8604+
<li><p>Let <var>twist</var> be equal to
8605+
<var>action object</var>’s <code>twist</code> property.
8606+
8607+
<li><p>If <var>twist</var> is not <a>undefined</a>, let <var>input state</var>’s
8608+
<code>twist</code> property equal <var>twist</var>.
8609+
</ol>
8610+
85128611
<p>When required to <dfn>dispatch a pointerCancel action</dfn> with
85138612
arguments <var>source id</var>, <var>action object</var>,
85148613
<var>input state</var> and <var>tick duration</var> a

0 commit comments

Comments
 (0)