Bug 49628

Summary: Set the original URL for downloads
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch sullivan: review+

Description Anders Carlsson 2010-11-16 15:21:11 PST
Set the original URL for downloads
Comment 1 Anders Carlsson 2010-11-16 15:27:50 PST
Created attachment 74047 [details]
Patch
Comment 2 John Sullivan 2010-11-16 15:46:53 PST
Comment on attachment 74047 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74047&action=review

> WebKit2/WebProcess/Downloads/mac/DownloadMac.mm:68
> +}

It's non-obvious why we can get the originating URL from the back/forward list. The old code in WebFrameLoaderClient.mm included a few comments and a FIXME that make this a little clearer. I think it's worthwhile to reproduce those comments and FIXME here. (I see one of them is now in setOriginalURLForDownload, but the others aren't.)

It might also help to name this function originatingURLFromBackForwardList, since it's only used when there's no referrer.
Comment 3 Anders Carlsson 2010-11-16 15:53:43 PST
Committed r72145: <http://trac.webkit.org/changeset/72145>