https://bugs.webkit.org/show_bug.cgi?id=191141
<rdar://problem/
45717542>
Reviewed by Wenson Hsieh.
If the URL used by the page includes a fragment identifier, use
it when telling QuickLook to open a local file.
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::didFinish): Append original fragment identifier
to the destination URL.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237664
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-10-31 Dean Jackson <dino@apple.com>
+
+ Forward original fragment identifier into System Preview
+ https://bugs.webkit.org/show_bug.cgi?id=191141
+ <rdar://problem/45717542>
+
+ Reviewed by Wenson Hsieh.
+
+ If the URL used by the page includes a fragment identifier, use
+ it when telling QuickLook to open a local file.
+
+ * UIProcess/Cocoa/DownloadClient.mm:
+ (WebKit::DownloadClient::didFinish): Append original fragment identifier
+ to the destination URL.
+
2018-10-31 Zalan Bujtas <zalan@apple.com>
[iOS] Do not paint tap highlight unless it is above a certain threshold
2018-10-31 Zalan Bujtas <zalan@apple.com>
[iOS] Do not paint tap highlight unless it is above a certain threshold
#if USE(SYSTEM_PREVIEW)
if (downloadProxy.isSystemPreviewDownload()) {
if (auto* webPage = downloadProxy.originatingPage()) {
#if USE(SYSTEM_PREVIEW)
if (downloadProxy.isSystemPreviewDownload()) {
if (auto* webPage = downloadProxy.originatingPage()) {
- NSURL *destinationURL = [NSURL fileURLWithPath:(NSString *)downloadProxy.destinationFilename()];
- webPage->systemPreviewController()->finish(WebCore::URL(destinationURL));
+ WebCore::URL destinationURL = WebCore::URL::fileURLWithFileSystemPath(downloadProxy.destinationFilename());
+ if (!destinationURL.fragmentIdentifier().length())
+ destinationURL.setFragmentIdentifier(downloadProxy.request().url().fragmentIdentifier());
+ webPage->systemPreviewController()->finish(destinationURL);
}
releaseActivityTokenIfNecessary(downloadProxy);
return;
}
releaseActivityTokenIfNecessary(downloadProxy);
return;