Closed Bug 1930845 Opened 6 days ago Closed 4 days ago

When dispatching actions the "input cancel list" is wrongly updated before the actual action is dispatched

Categories

(Remote Protocol :: Agent, defect, P3)

defect
Points:
2

Tracking

(firefox-esr128 unaffected, firefox132 unaffected, firefox133 fixed, firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox132 --- unaffected
firefox133 --- fixed
firefox134 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [webdriver:m13], [wptsync upstream])

Attachments

(4 files)

I noticed this problem when working on the patch on bug 1930530. It can be seen especially for pointer related actions of subtype pen which we do not have support for yet. That means that dispatching a pointerDown will fail with an unsupported error but because the input cancel list was already updated before with a new pointerUp action to reset the state of the input device, we will see another unexpected error when the release actions are automatically performed.

Per WebDriver specification we need to do:

7. Let algorithm be the value of the column dispatch action algorithm from the following table where the source type column is source type and the subtype column is equal to subtype.
source type 	subtype 	Dispatch action algorithm
"none" 	"pause" 	Dispatch a pause action
"key" 	"pause" 	Dispatch a pause action
"key" 	"keyDown" 	Dispatch a keyDown action
"key" 	"keyUp" 	Dispatch a keyUp action
"pointer" 	"pause" 	Dispatch a pause action
"pointer" 	"pointerDown" 	Dispatch a pointerDown action
"pointer" 	"pointerUp" 	Dispatch a pointerUp action
"pointer" 	"pointerMove" 	Dispatch a pointerMove action
"pointer" 	"pointerCancel" 	Dispatch a pointerCancel action
"wheel" 	"pause" 	Dispatch a pause action
"wheel" 	"scroll" 	Dispatch a scroll action

8.Try to run algorithm with arguments action object, source, global key state, tick duration, browsing context, and actions options.

9. If subtype is "keyDown", append a copy of action object with the subtype property changed to "keyUp" to input state's input cancel list.

10. If subtype is "pointerDown", append a copy of action object with the subtype property changed to "pointerUp" to input state's input cancel list. 

https://searchfox.org/mozilla-central/rev/55837bbe3e47f9b4fa91ef83a44b53823626f01d/remote/shared/webdriver/Actions.sys.mjs#1374-1377

This as well applies to other input sources as well.

This bug blocks my work on bug 1930530.

This wasn't visible yet because my patch on bug 1915798 accidentally introduced a regression in release actions due to a missing await. Due to that we did not see the error for pen as mentioned above. I'm still not sure why we even didn't see it before this patch landed.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Keywords: regression
Regressed by: 1915798
Severity: -- → S3
Points: --- → 2
Priority: -- → P3
Whiteboard: [webdriver:m13]

Set release status flags based on info from the regressing bug 1915798

Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/53ab6d394f59 [wdspec] Update release_actions/sequence_tentative.py test to run in a new tab. r=webdriver-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/c71ce74e6512 [remote] Add reverse action to "input cancel list" after trying to dispatch the action. r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49171 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m13] → [webdriver:m13], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Upstream PR merged by moz-wptsync-bot
Attachment #9437934 - Flags: approval-mozilla-beta?
Attachment #9437935 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: For WebDriver users a race condition would be visible when Actions are performed and released.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: None
  • Risk associated with taking this patch: low
  • Explanation of risk level: Just adds an await for the affected calls to methods returning a Promise.
  • String changes made/needed: no
  • Is Android affected?: yes

beta Uplift Approval Request

  • User impact if declined: For WebDriver users a race condition would be visible when Actions are performed and released.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: None
  • Risk associated with taking this patch: low
  • Explanation of risk level: Just adds an await for the affected calls to methods returning a Promise.
  • String changes made/needed: No
  • Is Android affected?: yes
Attachment #9437935 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9437934 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: