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

REGRESSION (iOS 16): AR QuickLook banner tap event no longer propagated to anchor if not attached to DOM #6226

Merged
merged 1 commit into from Nov 8, 2022

Conversation

rr-codes
Copy link
Contributor

@rr-codes rr-codes commented Nov 7, 2022

a203e21

REGRESSION (iOS 16): AR QuickLook banner tap event no longer propagated to anchor if not attached to DOM
https://bugs.webkit.org/show_bug.cgi?id=245959
rdar://100952298

Reviewed by Wenson Hsieh.

The commit https://commits.webkit.org/251042@main added a check `!element->isConnected()`
in `Document::dispatchSystemPreviewActionEvent` to ensure the element is part
of the DOM before sending the `_apple_ar_quicklook_button_tapped` event.

However, this broke behavior in the case of a detached element, and so this PR
reverts that check to maintain the existing behavior.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchSystemPreviewActionEvent):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm:
(-[TestSystemPreviewTriggeredHandler userContentController:didReceiveScriptMessage:]):
(-[TestSystemPreviewTriggeredOnDetachedElementHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/system-preview-trigger.html:

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

e2fc55f

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@rr-codes rr-codes self-assigned this Nov 7, 2022
@rr-codes rr-codes added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Nov 7, 2022
@rr-codes rr-codes added the merge-queue Applied to send a pull request to merge-queue label Nov 8, 2022
…ed to anchor if not attached to DOM

https://bugs.webkit.org/show_bug.cgi?id=245959
rdar://100952298

Reviewed by Wenson Hsieh.

The commit https://commits.webkit.org/251042@main added a check `!element->isConnected()`
in `Document::dispatchSystemPreviewActionEvent` to ensure the element is part
of the DOM before sending the `_apple_ar_quicklook_button_tapped` event.

However, this broke behavior in the case of a detached element, and so this PR
reverts that check to maintain the existing behavior.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchSystemPreviewActionEvent):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm:
(-[TestSystemPreviewTriggeredHandler userContentController:didReceiveScriptMessage:]):
(-[TestSystemPreviewTriggeredOnDetachedElementHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/system-preview-trigger.html:

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

Committed 256462@main (a203e21): https://commits.webkit.org/256462@main

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

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
4 participants