| CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
libservo: Remove MouseButtonAction::Click from the API
#39705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
yezhizhen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change!
| // TODO: Click should be handled internally in the `Document`. | ||
| if let InputEvent::MouseButton(event) = &event { | ||
| if event.action == MouseButtonAction::Click { | ||
| self.pressed_mouse_buttons = 0; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is some leftover. Semantically dead code.
|
Would anything be changed if you run try action with servodriver? |
I don't think so, but I definitely want to double-check the WebDriver conformance tests before landing. |
MouseButtonAction::Click from the API
|
🔨 Triggering try run (#18305654575) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18305654575): Flaky unexpected result (20)
Stable unexpected results that are known to be intermittent (22)
|
|
✨ Try run (#18305654575) succeeded. |
The embedder should never be responsible for triggering click events, so this change removes that possibility from the API. In addition, triggering of click events is simplified by moving the logic to the `DocumentEventHandler`. This has the benefit of making behavior consistent between in-process and out-of-process `<iframe>`s. Now click events are never triggered when the button up and down cross frame boundaries. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
1d5fc47 to
d3d8f1e
Compare
|
🔨 Triggering try run (#18312643709) for Android |
|
✨ Try run (#18312643709) succeeded. |
The Android interface needs some way to communciate click events to Servo, so the JNI layer needs to expose a click event. Even though there is no longer a "click" action in the API, we can implement this behavior via a mouse button down and then mouse button up event, which should be a more complete implementation in the DOM. This fixes a regression from servo#39705. Fixes servo#39742.
The Android interface needs some way to communciate click events to Servo, so the JNI layer needs to expose a click event. Even though there is no longer a "click" action in the API, we can implement this behavior via a mouse button down and then mouse button up event, which should be a more complete implementation in the DOM. This fixes a regression from servo#39705. Fixes servo#39742. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
The Android interface needs some way to communciate click events to Servo, so the JNI layer needs to expose a click event. Even though there is no longer a "click" action in the API, we can implement this behavior via a mouse button down and then mouse button up event, which should be a more complete implementation in the DOM. This fixes a regression from #39705. Testing: There currently aren't tests for Android interaction via the Java layer (which is one reason why this regression happened sadly). Fixes #39742. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
The embedder should never be responsible for triggering click events, so
this change removes that possibility from the API. In addition,
triggering of click events is simplified by moving the logic to the
DocumentEventHandler. This has the benefit of making behaviorconsistent between in-process and out-of-process
<iframe>s. Now clickevents are never triggered when the button up and down cross frame
boundaries.
Testing: This should be covered by existing tests.