Skip to content

[WPE] Click count leaking through successive layout test within the same WPEView #47417

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lauromoura
Copy link
Contributor

@lauromoura lauromoura commented Jul 1, 2025

9d8a6e6

[WPE] Click count leaking through successive layout test within the same WPEView
https://bugs.webkit.org/show_bug.cgi?id=295252

Reviewed by NOBODY (OOPS!).

Add a new function to reset click count tracking between tests, avoiding
accidental double and triple clicks.

Found this issue while rebaselining the fast/html/details-* tests after
296203@main. Some rebaselines were flaky as the tests were affected by
this when running together.

* Source/WebKit/WPEPlatform/wpe/WPEView.cpp:
(wpe_view_clear_press_count): Added.
* Source/WebKit/WPEPlatform/wpe/WPEView.h:
* Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformConfigureViewForTest): Reset click count
between tests.

9d8a6e6

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@lauromoura lauromoura self-assigned this Jul 1, 2025
@lauromoura lauromoura added the WPE WebKit WebKit WPE component label Jul 1, 2025
* wpe_view_clear_press_count
* @view: a #WPEView
*
* Clear any button press being tracket.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: tracket.

@@ -138,6 +138,7 @@ WPE_API guint wpe_view_compute_press_count (WPEView
gdouble y,
guint button,
guint32 time);
WPE_API void wpe_view_clear_press_count (WPEView *view);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems counter-intuitive that an external entity has to tell the view that it has to clear something, because of a navigation/load action. I guess there is never a situation where we want to preserve that press count between such events, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIUC, WPEView is in charge of lower level operations like delivering events to the WebKitWebView and forwarding buffers received from it. Something like a "shell" around WebKitWebView. So, WPEView would not have knowledge of web operations like loading, navigation, etc.

Maybe instead of the EventSender directly calling this new function, should we make WebKitWebView call it when those cases happen, like loading a new page?

Another option, if we want to avoid creating a new function, would be creating something like a WPEEventType::WPE_EVENT_RESET, that, when sent through wpe_view_event(event), tells the WPEView to reset its event state tracking.

@lauromoura lauromoura force-pushed the eng/WPE-Click-count-leaking-through-successive-layout-test-within-the-same-WPEView branch from 17c9db0 to 3d6d515 Compare July 1, 2025 13:25
…ame WPEView

https://bugs.webkit.org/show_bug.cgi?id=295252

Reviewed by NOBODY (OOPS!).

Add a new function to reset click count tracking between tests, avoiding
accidental double and triple clicks.

Found this issue while rebaselining the fast/html/details-* tests after
296203@main. Some rebaselines were flaky as the tests were affected by
this when running together.

* Source/WebKit/WPEPlatform/wpe/WPEView.cpp:
(wpe_view_clear_press_count): Added.
* Source/WebKit/WPEPlatform/wpe/WPEView.h:
* Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformConfigureViewForTest): Reset click count
between tests.
@lauromoura lauromoura force-pushed the eng/WPE-Click-count-leaking-through-successive-layout-test-within-the-same-WPEView branch from 3d6d515 to 9d8a6e6 Compare July 1, 2025 13:27
@lauromoura lauromoura requested a review from carlosgcampos July 1, 2025 15:04
@lauromoura lauromoura marked this pull request as ready for review July 1, 2025 15:10
@lauromoura lauromoura requested a review from a team as a code owner July 1, 2025 15:10
@lauromoura
Copy link
Contributor Author

Code ready for review, will update with the related baselines (s/selection/caret) after #47433 lands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WPE WebKit WebKit WPE component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants