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

The WKWebView method loadFileRequest should support loading file reference URLs #28406

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

Conversation

pvollan
Copy link
Contributor

@pvollan pvollan commented May 10, 2024

d1aa597

The WKWebView method loadFileRequest should support loading file reference URLs
https://bugs.webkit.org/show_bug.cgi?id=274015
rdar://127869291

Reviewed by NOBODY (OOPS!).

WebKit API should support loading file reference URLs with the form file:///.file/id=...
A file reference URL can be resolved to the actual file with the NSURL method filePathURL.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadFileRequest:allowingReadAccessToURL:]):

d1aa597

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

…rence URLs

https://bugs.webkit.org/show_bug.cgi?id=274015
rdar://127869291

Reviewed by NOBODY (OOPS!).

WebKit API should support loading file reference URLs with the form file:///.file/id=...
A file reference URL can be resolved to the actual file with the NSURL method filePathURL.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadFileRequest:allowingReadAccessToURL:]):
@pvollan pvollan requested a review from cdumez as a code owner May 10, 2024 21:21
@pvollan pvollan self-assigned this May 10, 2024
@pvollan pvollan added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label May 10, 2024
Copy link
Contributor

@szewai szewai left a comment

Choose a reason for hiding this comment

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

Is it possible to write an API test for this? Does WebKit currently fail the navigation for file references URLs?

@pvollan
Copy link
Contributor Author

pvollan commented May 13, 2024

Is it possible to write an API test for this? Does WebKit currently fail the navigation for file references URLs?

That is a good point, and should be possible. I will look into this!

Thanks for reviewing!

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