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

Add WebKit API to turn off the URL scheme check when linkifying through Data Detectors #693

Conversation

pvollan
Copy link
Contributor

@pvollan pvollan commented May 17, 2022

387b477

Add WebKit API to turn off the URL scheme check when linkifying through Data Detectors
https://bugs.webkit.org/show_bug.cgi?id=239900
<rdar://92026172 >

Reviewed by Geoffrey Garen.

This will enable us to block the Mach service com.apple.lsd.open in the WebContent process for all clients.
The URL scheme check is disabled by default for all clients that are not Web browsers. This choice was made
because we know that com.apple.lsd.open can be blocked for Web browsers without disabling the check, since
we already have blocked it there for quite some time without observing any issues. We also have a couple of
examples of other apps, which are not Mail clients, that would need this to be the default behavior.

* Source/WebCore/PAL/pal/cocoa/DataDetectorsCoreSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/DataDetectorsCoreSoftLink.mm:
* Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h:
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
* Source/WebKit/Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Source/WebKit/Shared/WebProcessCreationParameters.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _disableURLSchemeCheckInDataDetectors]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::disableURLSchemeCheckInDataDetectors const):
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::nonBrowserServices): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/WebProcess.messages.in:
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::disableURLSchemeCheckInDataDetectors const):
* Source/WTF/wtf/PlatformHave.h:

Canonical link: https://commits.webkit.org/250691@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294397 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@pvollan pvollan self-assigned this May 17, 2022
@pvollan pvollan added WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). WebKit Nightly Build labels May 17, 2022
Copy link
Contributor

@geoffreygaren geoffreygaren left a comment

Choose a reason for hiding this comment

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

r=me

Hard to tell by reading if this works in all configs; probably a good idea to test in the supported / unsupported cases before landing.

@pvollan pvollan force-pushed the eng/Add-WebKit-API-to-turn-off-the-URL-scheme-check-when-linkifying-through-Data-Detectors branch from 4775872 to 950b29b Compare May 17, 2022 22:22
@pvollan
Copy link
Contributor Author

pvollan commented May 17, 2022

r=me

Hard to tell by reading if this works in all configs; probably a good idea to test in the supported / unsupported cases before landing.

Thanks! I will check both configurations before landing.

@pvollan pvollan added the merge-queue Applied to send a pull request to merge-queue label May 18, 2022
@webkit-early-warning-system webkit-early-warning-system added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels May 18, 2022
@pvollan pvollan removed merging-blocked Applied to prevent a change from being merged WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). WebKit Nightly Build labels May 18, 2022
@pvollan pvollan force-pushed the eng/Add-WebKit-API-to-turn-off-the-URL-scheme-check-when-linkifying-through-Data-Detectors branch from 950b29b to 8b13381 Compare May 18, 2022 13:39
@pvollan pvollan added WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). WebKit Nightly Build merge-queue Applied to send a pull request to merge-queue labels May 18, 2022
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/Add-WebKit-API-to-turn-off-the-URL-scheme-check-when-linkifying-through-Data-Detectors branch from 8b13381 to 387b477 Compare May 18, 2022 15:46
@webkit-early-warning-system webkit-early-warning-system merged commit 387b477 into WebKit:main May 18, 2022
@webkit-early-warning-system
Copy link
Collaborator

Committed r294397 (250691@main): https://commits.webkit.org/250691@main

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

@webkit-early-warning-system webkit-early-warning-system removed the merge-queue Applied to send a pull request to merge-queue label May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).
Projects
None yet
3 participants