Title: [237664] trunk/Source/WebKit
- Revision
- 237664
- Author
- d...@apple.com
- Date
- 2018-10-31 18:03:09 -0700 (Wed, 31 Oct 2018)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (237663 => 237664)
--- trunk/Source/WebKit/ChangeLog 2018-11-01 00:39:38 UTC (rev 237663)
+++ trunk/Source/WebKit/ChangeLog 2018-11-01 01:03:09 UTC (rev 237664)
@@ -1,3 +1,18 @@
+2018-10-31 Dean Jackson <d...@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 <za...@apple.com>
[iOS] Do not paint tap highlight unless it is above a certain threshold
Modified: trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm (237663 => 237664)
--- trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm 2018-11-01 00:39:38 UTC (rev 237663)
+++ trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm 2018-11-01 01:03:09 UTC (rev 237664)
@@ -212,8 +212,10 @@
#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;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes