Skip to content

script: Notify embedder input events that "update the rendering" will never dispatch - #50321

Open
yezhizhen wants to merge 2 commits into
servo:mainfrom
yezhizhen:wd-reply
Open

yezhizhen wants to merge 2 commits into
servo:mainfrom
yezhizhen:wd-reply

Conversation

@yezhizhen

@yezhizhen yezhizhen commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

A no longer fully active document is skipped by update the rendering,
so input events accepted just before a navigation were never dispatched.
Now we reply InputEventResult::DispatchFailed when document is not active.

Unlike notify_embedder_that_events_were_handled, this reply is sent
synchronously instead of through async task.

Testing: Newly pass webdriver/tests/classic/perform_actions/navigation.py. Following issues no longer intermittent.
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-mouseup.html
Fixes: #38822
Fixes: #38621
Fixes: #48744

@yezhizhen
yezhizhen marked this pull request as ready for review November 29, 2026 10:16
@yezhizhen
yezhizhen requested a review from gterzian as a code owner November 29, 2026 10:16
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 29, 2026
@yezhizhen yezhizhen changed the title script: Answer input events that "update the rendering" will never dispatch script: Notify embedder input events that "update the rendering" will never dispatch Nov 29, 2026
drag_gesture: DomRefCell<Option<DragGesture>>,
}

struct PendingInputEvents {

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.

As a follow-up, we can replace several fields of DocumentEventHandler with just this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

2 participants