webdriver: Do not unwrap when clear undo_actions#95
Merged
madsmtm merged 2 commits intorust-windowing:mainfrom Dec 16, 2025
Merged
webdriver: Do not unwrap when clear undo_actions#95madsmtm merged 2 commits intorust-windowing:mainfrom
undo_actions#95madsmtm merged 2 commits intorust-windowing:mainfrom
Conversation
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
yezhizhen
commented
Dec 15, 2025
| actions.sort_unstable(); | ||
| for action in actions { | ||
| result.push(self.dispatch_keyup(action).unwrap().into()); | ||
| // When we `dispatch_typeable`, we may have already dispatched keyup |
Contributor
Author
There was a problem hiding this comment.
This happens at
keyboard-types/src/webdriver.rs
Line 398 in 24446d6
madsmtm
approved these changes
Dec 15, 2025
Member
madsmtm
left a comment
There was a problem hiding this comment.
Thanks! Could you add a test case?
Contributor
Author
You mean unit-test right? I will check the rule here :) |
Member
That is what I meant, yeah. I know that there aren't any atm. |
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Contributor
Author
|
Done. Pls kindly check :) |
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When we call
keyboard-types/src/webdriver.rs
Line 432 in 24446d6
"\u{e008}y", we would always end up with panic.We should avoid unwarp here.
See: servo/servo#41007 (comment)