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

iOS: click event doesn't get dispatched when there is a click event listener on ShadowRoot #2043

Merged
merged 1 commit into from Jul 3, 2022

Conversation

rniwa
Copy link
Member

@rniwa rniwa commented Jul 3, 2022

b01e405

iOS: click event doesn't get dispatched when there is a click event listener on ShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=218923

Reviewed by Wenson Hsieh.

The bug was caused by WebPage::commitPotentialTap falsely treating ShadowRoot as an invalid tap target
because it doesn't have a renderer. Fixed the bug by checking the shadow host's renderer instead
much like http://commits.webkit.org/r246404 for display: contents.

* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::commitPotentialTap): Fixed the bug.

* LayoutTests/fast/shadow-dom/click-eventlistener-on-shadow-root-expected.txt: Added.
* LayoutTests/fast/shadow-dom/click-eventlistener-on-shadow-root.html: Added.

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

@rniwa rniwa self-assigned this Jul 3, 2022
@rniwa rniwa added Safari 14 UI Events For bugs related to user interactions like keyboard, mouse, and touch events. labels Jul 3, 2022
@rniwa rniwa requested review from anttijk and graouts July 3, 2022 20:37
Copy link
Member

@whsieh whsieh left a comment

Choose a reason for hiding this comment

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

LGTM.

Perhaps we should rename the test from click-eventlistener-on-shadow-root-ios.html to just click-eventlistener-on-shadow-root.html, if it's meant to be run on all platforms?

@rniwa
Copy link
Member Author

rniwa commented Jul 3, 2022

Perhaps we should rename the test from click-eventlistener-on-shadow-root-ios.html to just click-eventlistener-on-shadow-root.html, if it's meant to be run on all platforms?

Sure, we can do that.

@rniwa rniwa added the merge-queue Applied to send a pull request to merge-queue label Jul 3, 2022
…istener on ShadowRoot

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

Reviewed by Wenson Hsieh.

The bug was caused by WebPage::commitPotentialTap falsely treating ShadowRoot as an invalid tap target
because it doesn't have a renderer. Fixed the bug by checking the shadow host's renderer instead
much like http://commits.webkit.org/r246404 for display: contents.

* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::commitPotentialTap): Fixed the bug.

* LayoutTests/fast/shadow-dom/click-eventlistener-on-shadow-root-expected.txt: Added.
* LayoutTests/fast/shadow-dom/click-eventlistener-on-shadow-root.html: Added.

Canonical link: https://commits.webkit.org/252107@main
@webkit-commit-queue
Copy link
Collaborator

Committed 252107@main (b01e405): https://commits.webkit.org/252107@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit b01e405 into WebKit:main Jul 3, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 3, 2022
@rniwa rniwa deleted the fix218923 branch July 17, 2022 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Events For bugs related to user interactions like keyboard, mouse, and touch events.
Projects
None yet
4 participants