Skip to content

webdriver: Support interspersed scroll actions via event queue#43126

Merged
yezhizhen merged 3 commits intoservo:mainfrom
yezhizhen:interspersed-scroll
Mar 11, 2026
Merged

webdriver: Support interspersed scroll actions via event queue#43126
yezhizhen merged 3 commits intoservo:mainfrom
yezhizhen:interspersed-scroll

Conversation

@yezhizhen
Copy link
Copy Markdown
Member

@yezhizhen yezhizhen commented Mar 10, 2026

Scroll and PointerMove is quite similar. We did so for PointeMove in #42289 + #42946.

Imagine having 3 non-zero duration scroll actions with origin at different Elements.
Previously we would wait for one to be fully dispatched before moving to next action,
instead of interspersed.

We also consolidate PendingPointerMove and
newly added PendingScroll into enum PendingActions.

Testing:
Existing tests behaviour not changing.. Added a wdspec test.
Previously: ['wheel', 'wheel', 'wheel', 'wheel', 'wheel', 'wheel', 'wheel', 'wheel', 'wheel', 'move']
Now: ['wheel', 'move', 'wheel', 'move', 'wheel', 'move', 'move', 'wheel', 'wheel', 'move', 'move', 'wheel', 'wheel', 'move', 'move', 'wheel']

Signed-off-by: Euclid Ye <[email protected]>
Signed-off-by: Euclid Ye <[email protected]>
@yezhizhen yezhizhen requested a review from xiaochengh March 10, 2026 04:55
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 10, 2026
Copy link
Copy Markdown
Member Author

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

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

Pls just check the second commit. First commit removes the loop, and does fmt.

}

pub(crate) struct PendingPointerMove {
#[expect(private_interfaces)]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is to suppress

warning: type `PendingScroll` is more private than the item `PendingActions::Scroll::0`
  --> components\webdriver_server\actions.rs:69:12
   |
69 |     Scroll(PendingScroll),
   |            ^^^^^^^^^^^^^ field `PendingActions::Scroll::0` is reachable at visibility `pub(crate)`

For our case, we just need PendingActions to be seen in lib.rs to declare Vec<PendingActions>.

pending_pointer_moves: Vec<PendingPointerMove>,
/// Ongoing [`PointerMoveAction`] or [`WheelScrollAction`] that are being incrementally
/// processed across multiple execution cycles within the current tick.
pending_actions: Vec<PendingActions>,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this one.

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#58388) with upstreamable changes.

@yezhizhen yezhizhen added the T-webdriver Do a try run of the WebDriver conformance tests label Mar 10, 2026
@github-actions github-actions bot removed the T-webdriver Do a try run of the WebDriver conformance tests label Mar 10, 2026
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#22895449385) for Linux (WPT)

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58388) title and body.

1 similar comment
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58388) title and body.

@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#22895449385):

Flaky unexpected result (1)
  • OK /webdriver/tests/classic/get_alert_text/get.py
    • FAIL [expected PASS] subtest: test_get_confirm_text

      AssertionError: no such alert (404): No user prompt is currently active.
      

@github-actions
Copy link
Copy Markdown

✨ Try run (#22895449385) succeeded.

@yezhizhen yezhizhen force-pushed the interspersed-scroll branch from b3b4e97 to b6c5db3 Compare March 10, 2026 09:42
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58388).

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58388) title and body.

@yezhizhen yezhizhen force-pushed the interspersed-scroll branch from b6c5db3 to c8a7267 Compare March 10, 2026 10:28
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58388).

@yezhizhen yezhizhen force-pushed the interspersed-scroll branch 2 times, most recently from c230ee1 to 97c7a8c Compare March 10, 2026 11:18
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58388).

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58388) title and body.

@yezhizhen yezhizhen force-pushed the interspersed-scroll branch from 97c7a8c to 7c724b1 Compare March 10, 2026 11:56
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58388).

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58388) title and body.

@yezhizhen yezhizhen added the T-webdriver Do a try run of the WebDriver conformance tests label Mar 10, 2026
@github-actions github-actions bot removed the T-webdriver Do a try run of the WebDriver conformance tests label Mar 10, 2026
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#22903188798) for Linux (WPT)

@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#22903188798):

Flaky unexpected result (1)
  • OK /webdriver/tests/classic/get_alert_text/get.py
    • FAIL [expected PASS] subtest: test_get_confirm_text

      AssertionError: no such alert (404): No user prompt is currently active.
      

Stable unexpected results (1)
  • TIMEOUT [expected OK] /webdriver/tests/classic/perform_actions/perform.py

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#22903188798) failed!

@yezhizhen
Copy link
Copy Markdown
Member Author

New test is intermittent for Servo. Seems to be a bug in script.
Fixing in another PR.

@yezhizhen
Copy link
Copy Markdown
Member Author

Filed #43136

github-merge-queue bot pushed a commit that referenced this pull request Mar 10, 2026
…vent` when coalescing wheel events (#43138)

Basically, any testdriver tests with scroll duration 
more than `16ms` can be intermittent due to this.

Fixes: #43136
Fixes: #43110
Testing: This fixes the issue where newly added test 
in #43126 randomly TIMEOUT with very high probability: 
https://github.com/servo/servo/actions/runs/22906496902

Signed-off-by: Euclid Ye <[email protected]>
Copy link
Copy Markdown
Contributor

@xiaochengh xiaochengh left a comment

Choose a reason for hiding this comment

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

Makes sense, LGTM.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Mar 11, 2026
@yezhizhen yezhizhen added this pull request to the merge queue Mar 11, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 11, 2026
Merged via the queue into servo:main with commit 605291b Mar 11, 2026
48 of 50 checks passed
@yezhizhen yezhizhen deleted the interspersed-scroll branch March 11, 2026 04:17
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants