Repository navigation
Fix origin relative coordinate for wheel scroll and refactoring - #36985
Merged
Merged
Conversation
PotatoCP
force-pushed
the
wheel-element-origin
branch
from
May 13, 2025 02:46
4984b0b to
85b23da
Compare
yezhizhen
reviewed
May 13, 2025
Comment on lines
+666
to
+671
| match response? { | ||
| Some(point) => Ok(point), | ||
| None => Err(ErrorStatus::UnknownError), | ||
| } |
Member
There was a problem hiding this comment.
This is a nice change! Previously, we would always return Err(ErrorStatus::UnknownError) even if response has other ErrorStatus here.
Contributor
Author
There was a problem hiding this comment.
Yes. Actually I am the one who caused the issue in #36928 🤦, initially it was fine.
Signed-off-by: PotatoCP <[email protected]>
PotatoCP
force-pushed
the
wheel-element-origin
branch
from
May 13, 2025 05:17
85b23da to
790d492
Compare
jdm
approved these changes
May 13, 2025
xiaochengh
approved these changes
May 13, 2025
Comment on lines
+520
to
+523
| PointerOrigin::Pointer => return Err(ErrorStatus::InvalidArgument), | ||
| PointerOrigin::Element(ref web_element) => { | ||
| self.get_element_origin_relative_coordinates(web_element)? | ||
| }, |
Contributor
There was a problem hiding this comment.
Suggested change
| PointerOrigin::Pointer => return Err(ErrorStatus::InvalidArgument), | |
| PointerOrigin::Element(ref web_element) => { | |
| self.get_element_origin_relative_coordinates(web_element)? | |
| }, | |
| PointerOrigin::Element(ref web_element) => { | |
| self.get_element_origin_relative_coordinates(web_element)? | |
| }, | |
| PointerOrigin::Pointer => return Err(ErrorStatus::InvalidArgument), |
nit: let's don't put error handling in the middle of a match statement
Contributor
Author
There was a problem hiding this comment.
Hmm, the PR is merged. Should we open new PR or just wait until someone refactor?
Member
There was a problem hiding this comment.
I think Xiaocheng means it is a good practice that we can pay attention to in the future :)
Contributor
Author
There was a problem hiding this comment.
Oh I see. Okay" :D
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.
Testing: Partially
tests/wpt/tests/infrastructure/testdriver/actions/wheelScroll.html, but we still have synchronization problem. You can try to add sleep in the test to see OK result.cc: @xiaochengh @longvatrong111 @yezhizhen