Skip to content
Open
Changes from all 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
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8197,7 +8197,7 @@ <h3>Input state</h3>

<li><p>If <var>source</var> is undefined, set <var>source</var> to
the result of <a>trying</a> to <a>create an input source</a>
with <var>input state</var> and <var>type</var>.
with <var>input state</var>, <var>type</var> and <var>subtype</var>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find!

There is one further thing that I noticed when checking the chain of calls: Within create an input source the subtype is mentioned as optional, while calling create a pointer input source requires the subtype. I think that we should remove the optional from the create an input source algorithm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should still keep optional, as only "pointer input source" requires subtype.
There seems to be a bigger problem now: it seems most of caller don't passes subtype, even for those explicitly creating "pointer" input source, e.g. this.
cc @xiaochengh

I propose to add subtype to all callers that explicitly create "pointer", but keep subtype as optional in create an input source.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's also related to this issue #1925 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yezhizhen good point! I completely missed that. So yes, that makes sense and great that you are going to fix the other freshly detected issues as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So create an input source is called in step 6 of process an input source action sequence. There is no subtype passed in at the moment if it's a pointer input source. In its step 5 the parameters are processed and the subtype is available as parameters.pointerType. That one needs to be passed down.


<li><p>Return success with data <var>source</var>.</p></li>
</ol>
Expand Down Expand Up @@ -8425,8 +8425,8 @@ <h3>Processing actions</h3>
<ol>
<li><p>Let <var>source actions</var> be the result of <a>trying</a>
to <a>process an input source action sequence</a> given <var>input
state</var>, <var>action sequence</var>, and <var>actions
options</var>.
state</var>, <var>action sequence</var>, <var>actions
options</var> and optional <var>subtype</var>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that here we still have a list of )(inner) actions that are getting passed to process an input source action sequence. So we still don't have a type subtype and as such won't need the variable.


<li><p>For each <var>action</var> in <var>source actions</var>:

Expand All @@ -8450,8 +8450,8 @@ <h3>Processing actions</h3>

<p>When required to <dfn>process an input source action
sequence</dfn>, given <var>input state</var>, <var>action
sequence</var>, and <var>actions options</var>, a <a>remote end</a>
must:
sequence</var>, and <var>actions options</var>, and optional <var>subtype</var>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sequence</var>, and <var>actions options</var>, and optional <var>subtype</var>,
sequence</var>, <var>actions options</var>, and optional <var>subtype</var>,

a <a>remote end</a> must:

<ol class="algorithm">
<li><p>Let <var>type</var> be the result of <a>getting a property</a>
Expand Down Expand Up @@ -10297,7 +10297,7 @@ <h3><dfn>Perform Actions</dfn></h3>

<li><p>Let <var>actions by tick</var> be the result of <a>trying</a>
to <a>extract an action sequence</a> with <var>input state</var>,
<var>parameters</var>, and <var>actions options</var>.
<var>parameters</var>, <var>actions options</var> and optional <var>subtype</var>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this level subtype is undefined. It's not part of the outer actions dictionary but part of inner actions (specifically pointer as you pointed out). So we cannot pass subtype here. Here an example:

{
  "actions": [
    {
      "type": "pointer",
      "actions": [
        {
          "type": "pointerMove",
          "x": 49,
          "y": 49,
          "origin": {
            "element-6066-11e4-a52e-4f735466cecf": "32a6492e-a085-405e-a39a-9765c35dcb2e"
          }
        },
        {
          "type": "pointerDown",
          "button": 0
        },
        {
          "type": "pointerMove",
          "x": 149,
          "y": 149,
          "origin": {
            "element-6066-11e4-a52e-4f735466cecf": "32a6492e-a085-405e-a39a-9765c35dcb2e"
          }
        },
        {
          "type": "pointerUp",
          "button": 0
        }
      ],
      "parameters": {
        "pointerType": "mouse"
      },
      "id": "1"
    }
  ]
}


<li><p><a>Dispatch actions</a> with <var>input state</var>,
<var>actions by tick</var>, <a>current browsing context</a>,
Expand Down