@@ -5756,7 +5756,7 @@ <h4><dfn>Element Click</dfn></h4>
57565756 UUID</ a > .
57575757
57585758 < li > < p > Let < var > source</ var > be the result of < a > create an input
5759- source</ a > with "< code > pointer</ code > ".
5759+ source</ a > with < var > input state </ var > , and "< code > pointer</ code > ".
57605760
57615761 < li > < p > < a > Add an input source</ a > with < var > input
57625762 state</ var > , < var > input id</ var > and < var > source</ var > .
@@ -6321,8 +6321,8 @@ <h4><dfn>Element Send Keys</dfn></h4>
63216321 < li > < p > Let < var > input id</ var > be a the result of < a > generating a
63226322 UUID</ a > .
63236323
6324- < li > < p > Let < var > source</ var > be the result of < a > create an
6325- input source</ a > with "< code > key</ code > ".
6324+ < li > < p > Let < var > source</ var > be the result of < a > create an input
6325+ source</ a > with < var > input state </ var > , and "< code > key</ code > ".
63266326
63276327 < li > < p > < a > Add an input source</ a > with < var > input
63286328 state</ var > , < var > input id</ var > and < var > source</ var > .
@@ -7276,8 +7276,8 @@ <h3>Input sources</h3>
72767276 the type of the input source. Each input source has an < dfn > input
72777277 id</ dfn > which is stored as a key in the < a > input state map</ a > .
72787278
7279- < p > To < dfn > create an input source</ dfn > given < var > type </ var > and
7280- optional < var > subtype</ var > :
7279+ < p > To < dfn > create an input source</ dfn > given < var > input
7280+ state </ var > , < var > type </ var > and optional < var > subtype</ var > :
72817281
72827282< ol >
72837283 < li > < p > Run the substeps matching the first matching value
@@ -7294,7 +7294,7 @@ <h3>Input sources</h3>
72947294
72957295 < dt > "< code > pointer</ code > "
72967296 < dd > Let < var > source</ var > be the result of < a > create a pointer
7297- input source</ a > with < var > subtype</ var > .
7297+ input source</ a > with < var > input state </ var > and < var > subtype</ var > .
72987298
72997299 < dt > "< code > wheel</ code > "
73007300 < dd > Let < var > source</ var > be the result of < a > create a wheel input
@@ -7417,6 +7417,12 @@ <h4>Pointer input source</h4>
74177417 "< code > pen</ code > ", or "< code > touch</ code > ".
74187418 < td >
74197419 </ tr >
7420+ < tr >
7421+ < td > pointerId
7422+ < td > The numeric id of the pointing device. This is a positive
7423+ integer, with the values 0 and 1 reserved for mouse-type pointers.
7424+ < td >
7425+ </ tr >
74207426 < tr >
74217427 < td > pressed
74227428 < td > A set of unsigned integers representing the pointer buttons that
@@ -7468,10 +7474,12 @@ <h4>Pointer input source</h4>
74687474 </ tr >
74697475</ table >
74707476
7471- < p > To < dfn > create a pointer input source</ dfn > object
7472- given < var > subtype</ var > , return a new < a > pointer input source</ a >
7473- with subtype set to < var > subtype</ var > , and the other items set to
7474- their default values.
7477+ < p > To < dfn > create a pointer input source</ dfn > object given < var > input
7478+ state</ var > , and < var > subtype</ var > , return a new < a > pointer input
7479+ source</ a > with subtype set to < var > subtype</ var > , pointerId set
7480+ to < a > get a pointer id</ a > with < var > input state</ a >
7481+ and < var > subtype</ var > , and the other items set to their default
7482+ values.
74757483
74767484</ section > <!-- /Pointer input source -->
74777485
@@ -7587,7 +7595,7 @@ <h3>Input state</h3>
75877595
75887596 < li > < p > If < var > source</ var > is undefined, set < var > source</ var > to
75897597 the result of < a > trying</ a > to < a > create an input source</ a >
7590- with < var > type</ var > .
7598+ with < var > input state </ var > and < var > type</ var > .
75917599
75927600 < li > < p > Return success with data < var > source</ var > .</ p > </ li >
75937601</ ol >
@@ -7634,6 +7642,29 @@ <h3>Input state</h3>
76347642 < li > < p > Return < var > key state</ var > .
76357643</ ol >
76367644
7645+ < p > To < dfn > get a pointer id</ dfn > given < var > input state</ var >
7646+ and < var > subtype</ var > :
7647+
7648+ < ol class =algorithm >
7649+ < li > Let < var > minimum id</ var > be 0 if < var > subtype</ var > is
7650+ "< code > mouse</ code > ', or 2 otherwise.
7651+
7652+ < li > Let < var > pointer ids</ var > be an empty set.
7653+
7654+ < li > < p > Let < var > sources</ var > be the result of [=map/getting the
7655+ values=] with < var > input state</ var > 's < a > input state map</ a > .
7656+
7657+ < li > < p > For each < var > source</ var > in < var > sources</ var > .:
7658+ < ol >
7659+ < li > < p > If < var > source</ var > is a < a > pointer input source</ a > ,
7660+ append < var > source</ var > 's pointerId to < var > pointer ids</ var > .
7661+ </ ol >
7662+
7663+ < li > < p > Return the smallest integer that is greater than or equal
7664+ to < var > minimum id</ var > and that is not contained in < var > pointer
7665+ ids</ var > .
7666+ </ ol >
7667+
76377668</ section > <!-- /input state -->
76387669
76397670< section >
@@ -8583,9 +8614,9 @@ <h3>Dispatching actions</h3>
85838614</ table >
85848615
85858616 < li > < a > Try</ a > to run < var > algorithm</ var > with arguments
8586- < var > input id </ var > , < var > action object </ var > ,
8587- < var > source < /var > , < var > global key state </ var > , < var > tick
8588- duration </ var > , and < var > browsing context</ var > .
8617+ < var > action object </ var > , < var > source </ var > , < var > global key
8618+ state < /var > , < var > tick duration </ var > , and < var > browsing
8619+ context</ var > .
85898620
85908621 < li > < p > If < var > subtype</ var > is "< code > keyDown</ code > ", append
85918622 a copy of < var > action object</ var > with the < var > subtype</ var >
@@ -8625,8 +8656,8 @@ <h3>Dispatching actions</h3>
86258656< section >
86268657< h4 > General actions</ h4 >
86278658
8628- < p > To < dfn > dispatch a pause action</ dfn > given < var > input
8629- id </ var > , < var > action object</ var > , < var > source</ var > , < var > global key
8659+ < p > To < dfn > dispatch a pause action</ dfn > given < var > action
8660+ object</ var > , < var > source</ var > , < var > global key
86308661state</ var > , < var > tick duration</ var > , and < var > browsing
86318662context</ var > :
86328663
@@ -8895,8 +8926,7 @@ <h4>Keyboard actions</h4>
88958926 < tr > < td > < code > \uE05D</ code > </ td > < td > Numpad Delete< td > < code > 3</ code > </ td > </ tr >
88968927</ table >
88978928
8898- < p > To < dfn > dispatch a keyDown action</ dfn > given
8899- < var > input id</ var > , < var > action object</ var > ,
8929+ < p > To < dfn > dispatch a keyDown action</ dfn > given < var > action object</ var > ,
89008930< var > source</ var > , < var > global key state</ var > , < var > tick
89018931duration</ var > , and < var > browsing context</ var > :
89028932
@@ -8997,8 +9027,8 @@ <h4>Keyboard actions</h4>
89979027 key repetition.
89989028</ aside >
89999029
9000- < p > To < dfn > dispatch a keyUp action</ dfn > given < var > input
9001- id </ var > , < var > action object</ var > , < var > source</ var > ,
9030+ < p > To < dfn > dispatch a keyUp action</ dfn > given, < var > action
9031+ object</ var > , < var > source</ var > ,
90029032< var > global key state</ var > , < var > tick duration</ var > ,
90039033and < var > browsing context</ var > :</ p >
90049034
@@ -9075,7 +9105,7 @@ <h4>Keyboard actions</h4>
90759105< section >
90769106< h4 > Pointer actions</ h4 >
90779107
9078- < p > To < dfn > dispatch a pointerDown action</ dfn > given < var > input id </ var > ,
9108+ < p > To < dfn > dispatch a pointerDown action</ dfn > given
90799109 < var > action object</ var > , < var > input state</ var > , < var > global key state</ var > ,
90809110 < var > tick duration</ var > , and < var > browsing context</ var > :
90819111
@@ -9128,10 +9158,10 @@ <h4>Pointer actions</h4>
91289158
91299159 < li > < p > < a > Perform implementation-specific action dispatch steps</ a >
91309160 on < var > browsing context</ var > equivalent to pressing the button
9131- numbered < var > button</ var > on the pointer with ID
9132- < var > input id </ var > , having type < var > pointerType </ var > at
9133- viewport x coordinate < var > x</ var > , viewport y
9134- coordinate < var > y</ var > , < var > width</ var > , < var > height</ var > ,
9161+ numbered < var > button</ var > on the pointer with pointerId equal
9162+ to < var > input source </ var > 's pointerId , having
9163+ type < var > pointerType </ var > at viewport x coordinate < var > x</ var > ,
9164+ viewport y coordinate < var > y</ var > , < var > width</ var > , < var > height</ var > ,
91359165 < var > pressure</ var > , < var > tangentialPressure</ var > , < var > tiltX</ var > ,
91369166 < var > tiltY</ var > , < var > twist</ var > , < var > altitudeAngle</ var > ,
91379167 < var > azimuthAngle</ var > , with buttons < var > buttons</ var > depressed
@@ -9150,8 +9180,8 @@ <h4>Pointer actions</h4>
91509180 < li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
91519181</ ol >
91529182
9153- < p > To < dfn > dispatch a pointerUp action</ dfn > given < var > input
9154- id </ var > , < var > action object</ var > , < var > source</ var > ,
9183+ < p > To < dfn > dispatch a pointerUp action</ dfn > given, < var > action
9184+ object</ var > , < var > source</ var > ,
91559185< var > global key state</ var > , < var > tick duration</ var > ,
91569186and < var > browsing context</ var > :
91579187
@@ -9179,12 +9209,13 @@ <h4>Pointer actions</h4>
91799209
91809210 < li > < p > < a > Perform implementation-specific action dispatch steps</ a >
91819211 on < var > browsing context</ var > equivalent to releasing the button
9182- numbered < var > button</ var > on the pointer of ID
9183- < var > input id</ var > having type < var > pointerType</ var > at viewport x
9184- coordinate < var > x</ var > , viewport y coordinate < var > y</ var > , with
9185- buttons < var > buttons</ var > depressed, in accordance with the
9186- requirements of [[UI-EVENTS]] and [[POINTER-EVENTS]]. The generated
9187- events must set < code > ctrlKey</ code > , < code > shiftKey</ code > ,
9212+ numbered < var > button</ var > on the pointer with pointerId equal
9213+ to < var > input source</ var > 's pointerId, having
9214+ type < var > pointerType</ var > at viewport x coordinate < var > x</ var > ,
9215+ viewport y coordinate < var > y</ var > , with buttons < var > buttons</ var >
9216+ depressed, in accordance with the requirements of [[UI-EVENTS]] and
9217+ [[POINTER-EVENTS]]. The generated events must
9218+ set < code > ctrlKey</ code > , < code > shiftKey</ code > ,
91889219 < code > altKey</ code > , and < code > metaKey</ code > equal to the
91899220 corresponding items in < var > global key state</ var > . Type specific
91909221 properties for the pointer that are not exposed through the
@@ -9198,7 +9229,7 @@ <h4>Pointer actions</h4>
91989229 < li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
91999230</ ol >
92009231
9201- < p > To < dfn > dispatch a pointerMove action</ dfn > given < var > input id </ var > ,
9232+ < p > To < dfn > dispatch a pointerMove action</ dfn > given
92029233< var > action object</ var > , < var > source</ var > , < var > global key state</ var > ,
92039234< var > tick duration</ var > , and < var > browsing context</ var > :
92049235
@@ -9302,22 +9333,21 @@ <h4>Pointer actions</h4>
93029333 < code > azimuthAngle</ code > property.
93039334
93049335 < li > < p > < a > Perform a pointer move</ a > with arguments
9305- < var > input id</ var > , < var > source</ var > , < var > global key
9306- state</ var > , < var > duration</ var > , < var > start x</ var > , < var > start
9307- y</ var > , < var > x</ var > , < var > y</ var > , < var > width</ var > , < var > height</ var > ,
9308- < var > pressure</ var > , < var > tangentialPressure</ var > , < var > tiltX</ var > ,
9309- < var > tiltY</ var > , < var > twist</ var > , < var > altitudeAngle</ var > ,
9310- < var > azimuthAngle</ var > .
9336+ < var > source</ var > , < var > global key state</ var > , < var > duration</ var > ,
9337+ < var > start x</ var > , < var > start y</ var > , < var > x</ var > , < var > y</ var > ,
9338+ < var > width</ var > , < var > height</ var > , < var > pressure</ var > ,
9339+ < var > tangentialPressure</ var > , < var > tiltX</ var > , < var > tiltY</ var > ,
9340+ < var > twist</ var > , < var > altitudeAngle</ var > , < var > azimuthAngle</ var > .
93119341
93129342 < li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
93139343</ ol >
93149344
9315- < p > To < dfn > perform a pointer move</ dfn > given < var > input id </ var > ,
9316- < var > source </ var > , < var > global key state </ var > , < var > duration </ var > ,
9317- < var > start x </ var > , < var > start y </ var > , < var > target x </ var > ,
9318- < var > target y </ var > , < var > width </ var > , < var > height </ var > , < var > pressure </ var > ,
9319- < var > tangentialPressure </ var > , < var > tiltX </ var > , < var > tiltY </ var > ,
9320- < var > twist </ var > , < var > altitudeAngle </ var > , and < var > azimuthAngle</ var > :
9345+ < p > To < dfn > perform a pointer move</ dfn > given < var > source </ var > ,
9346+ < var > global key state </ var > , < var > duration </ var > , < var > start x </ var > ,
9347+ < var > start y </ var > , < var > target x </ var > , < var > target y </ var > , < var > width </ var > ,
9348+ < var > height </ var > , < var > pressure </ var > , < var > tangentialPressure </ var > ,
9349+ < var > tiltX </ var > , < var > tiltY </ var > , < var > twist </ var > , < var > altitudeAngle </ var > ,
9350+ and < var > azimuthAngle</ var > :
93219351
93229352< ol class ="algorithm ">
93239353 < li > < p > Let < var > time delta</ var > be the time since the beginning of
@@ -9358,8 +9388,9 @@ <h4>Pointer actions</h4>
93589388
93599389 < li > < p > < a > Perform implementation-specific action dispatch steps</ a >
93609390 on < var > browsing context</ var > equivalent to moving the pointer
9361- with ID < var > input id</ var > having type < var > pointerType</ var >
9362- from viewport x coordinate < var > current x</ var > , viewport y
9391+ with pointerId equal to < var > input source</ var > 's pointerId,
9392+ having type < var > pointerType</ var > from viewport x
9393+ coordinate < var > current x</ var > , viewport y
93639394 coordinate < var > current y</ var > to viewport x
93649395 coordinate < var > x</ var > and viewport y
93659396 coordinate < var > y</ var > , < var > width</ var > , < var > height</ var > ,
@@ -9413,23 +9444,23 @@ <h4>Pointer actions</h4>
94139444 vsync).</ aside >
94149445
94159446 < li > < p > < a > Perform a pointer move</ a > with arguments
9416- < var > input id </ var > , < var > input state</ var > , < var > duration</ var > ,
9447+ < var > input state</ var > , < var > duration</ var > ,
94179448 < var > start x</ var > , < var > start y</ var > , < var > target x</ var > ,
94189449 < var > target y</ var > .
94199450 </ ol >
94209451
94219452</ ol >
94229453
9423- < p > To < dfn > dispatch a pointerCancel action</ dfn > given < var > input id </ var > ,
9454+ < p > To < dfn > dispatch a pointerCancel action</ dfn > given
94249455< var > action object</ var > , < var > source</ var > , < var > global key state</ var > ,
94259456< var > tick duration</ var > , and < var > browsing context</ var > :
94269457
94279458< ol class ="algorithm ">
94289459 < li > < p > < a > Perform implementation-specific action dispatch steps</ a >
94299460 on < var > browsing context</ var > equivalent to cancelling the any
9430- action of the pointer with ID < var > input id </ var > having
9431- type < var > pointerType</ var > , in accordance with the requirements of
9432- [[UI-EVENTS]] and [[POINTER-EVENTS]].
9461+ action of the pointer with pointerId equal to < var > source </ var > 's
9462+ pointerId item. having type < var > pointerType</ var > , in accordance
9463+ with the requirements of [[UI-EVENTS]] and [[POINTER-EVENTS]].
94339464
94349465 < li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
94359466</ ol >
@@ -9439,7 +9470,7 @@ <h4>Pointer actions</h4>
94399470< section >
94409471< h4 > Wheel actions</ h4 >
94419472
9442- < p > To < dfn > dispatch a scroll action</ dfn > given < var > input id </ var > ,
9473+ < p > To < dfn > dispatch a scroll action</ dfn > given
94439474< var > action object</ var > , < var > source</ var > , < var > global key state</ var > ,
94449475< var > tick duration</ var > , and < var > browsing context</ var > :
94459476
@@ -9511,14 +9542,14 @@ <h4>Wheel actions</h4>
95119542 </ li >
95129543
95139544 < li > < p > < a > Perform a scroll</ a > with arguments
9514- < var > input id </ var > , < var > global key state</ var > , < var > duration</ var > ,
9545+ < var > global key state</ var > , < var > duration</ var > ,
95159546 < var > x</ var > , < var > y</ var > , < var > delta x</ var > , < var > delta y</ var > ,
95169547 < var > 0</ var > , < var > 0</ var > .
95179548
95189549 < li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
95199550</ ol >
95209551
9521- < p > To < dfn > perform a scroll</ dfn > given < var > input id </ var > ,
9552+ < p > To < dfn > perform a scroll</ dfn > given
95229553 < var > duration</ var > , < var > x</ var > , < var > y</ var > ,
95239554 < var > target delta x</ var > , < var > target delta y</ var > ,
95249555 < var > current delta x</ var > and < var > current delta y</ var > :
@@ -9555,12 +9586,12 @@ <h4>Wheel actions</h4>
95559586
95569587 < ol >
95579588 < li > < p > < a > Perform implementation-specific action dispatch steps</ a >
9558- on < var > browsing context</ var > equivalent to wheel scroll with
9559- ID < var > input id </ var > at viewport x coordinate < var > x</ var > ,
9560- viewport y coordinate < var > y</ var > , deltaX value < var > delta
9561- x </ var > , deltaY value < var > delta y</ var > , in accordance with the
9562- requirements of [[UI-EVENTS]]. The generated
9563- events must set < code > ctrlKey</ code > , < code > shiftKey</ code > ,
9589+ on < var > browsing context</ var > equivalent to wheel scroll at
9590+ viewport x coordinate < var > x</ var > , viewport y
9591+ coordinate < var > y</ var > , deltaX value < var > delta x </ var > , deltaY
9592+ value < var > delta y</ var > , in accordance with the requirements of
9593+ [[UI-EVENTS]]. The generated events must
9594+ set < code > ctrlKey</ code > , < code > shiftKey</ code > ,
95649595 < code > altKey</ code > , and < code > metaKey</ code > equal to the
95659596 corresponding items in < var > global key state</ var > .
95669597
@@ -9598,8 +9629,7 @@ <h4>Wheel actions</h4>
95989629 vsync).</ aside >
95999630
96009631 < li > < p > < a > Perform a scroll</ a > with arguments
9601- < var > input id</ var > , < var > duration</ var > ,
9602- < var > x</ var > , < var > y</ var > ,
9632+ < var > duration</ var > , < var > x</ var > , < var > y</ var > ,
96039633 < var > target delta x</ var > , < var > target delta y</ var > ,
96049634 < var > current delta x</ var > , < var > current delta y</ var > .
96059635 </ ol >
0 commit comments