-
Couldn't load subscription status.
- Fork 209
Pass subtype to "create an input source"
#1929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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>. | ||||||
|
|
||||||
| <li><p>Return success with data <var>source</var>.</p></li> | ||||||
| </ol> | ||||||
|
|
@@ -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>. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that here we still have a list of )(inner) |
||||||
|
|
||||||
| <li><p>For each <var>action</var> in <var>source actions</var>: | ||||||
|
|
||||||
|
|
@@ -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>, | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| a <a>remote end</a> must: | ||||||
|
|
||||||
| <ol class="algorithm"> | ||||||
| <li><p>Let <var>type</var> be the result of <a>getting a property</a> | ||||||
|
|
@@ -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>. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this level |
||||||
|
|
||||||
| <li><p><a>Dispatch actions</a> with <var>input state</var>, | ||||||
| <var>actions by tick</var>, <a>current browsing context</a>, | ||||||
|
|
||||||
There was a problem hiding this comment.
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 sourcethesubtypeis mentioned as optional, while callingcreate a pointer input sourcerequires thesubtype. I think that we should remove theoptionalfrom thecreate an input sourcealgorithm.There was a problem hiding this comment.
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
subtypeto all callers that explicitly create "pointer", but keepsubtypeas optional in create an input source.There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So
create an input sourceis called in step 6 ofprocess an input source action sequence. There is nosubtypepassed in at the moment if it's a pointer input source. In its step 5 the parameters are processed and the subtype is available asparameters.pointerType. That one needs to be passed down.