Skip to content
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

Verifying user gestures doesn’t work when opening a window on a key event #21983

Conversation

charliewolfe
Copy link
Member

@charliewolfe charliewolfe commented Dec 18, 2023

0345820

Verifying user gestures doesn’t work when opening a window on a key event
https://bugs.webkit.org/show_bug.cgi?id=266590
rdar://119826688

Reviewed by Pascoe.

We weren’t passing the authorization token to `UserGestureIndicator` and it was lost when converting
the event to a platform key event.

Also remove a redundant call to `recordUserGestureAuthorizationToken()`. It’s called in `sendKeyEvent()`

* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::internalKeyEvent):
* Source/WebKit/Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleKeyboardEvent):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/VerifyUserGestureFromUIProcess.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/272246@main

832c818

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim

@charliewolfe charliewolfe self-assigned this Dec 18, 2023
@charliewolfe charliewolfe added the WebKit Process Model Bugs related to WebKit's multi-process architecture label Dec 18, 2023
@charliewolfe charliewolfe added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Dec 18, 2023
…vent

https://bugs.webkit.org/show_bug.cgi?id=266590
rdar://119826688

Reviewed by Pascoe.

We weren’t passing the authorization token to `UserGestureIndicator` and it was lost when converting
the event to a platform key event.

Also remove a redundant call to `recordUserGestureAuthorizationToken()`. It’s called in `sendKeyEvent()`

* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::internalKeyEvent):
* Source/WebKit/Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleKeyboardEvent):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/VerifyUserGestureFromUIProcess.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/272246@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Verifying-user-gestures-doesnt-work-when-opening-a-window-on-a-key-event branch from 832c818 to 0345820 Compare December 18, 2023 23:06
@webkit-commit-queue
Copy link
Collaborator

Committed 272246@main (0345820): https://commits.webkit.org/272246@main

Reviewed commits have been landed. Closing PR #21983 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 0345820 into WebKit:main Dec 18, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Process Model Bugs related to WebKit's multi-process architecture
Projects
None yet
4 participants