[Webkit-unassigned] [Bug 52916] Expose "suggested filename" for a resource based on its resource response.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 21 13:54:01 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=52916
Adam Roben (aroben) <aroben at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #79784|review? |review+
Flag| |
--- Comment #3 from Adam Roben (aroben) <aroben at apple.com> 2011-01-21 13:54:01 PST ---
(From update of attachment 79784)
View in context: https://bugs.webkit.org/attachment.cgi?id=79784&action=review
> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:206
> +WKStringRef WKBundleFrameCopySuggestedFilenameForResourceURL(WKBundleFrameRef frameRef, WKURLRef urlRef)
Maybe "...ForSubresourceWithURL" would be more accurate?
Are the "Ref" suffixes really needed on the parameters?
> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:208
> + return toCopiedAPI(toImpl(frameRef)->suggestedFilenameForResourceURL(WebCore::KURL(WebCore::KURL(), toImpl(urlRef)->string())));
So we don't get to assume that all strings from WKURLRefs can be used with KURL's ParsedURLStringTag constructor?
> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h:62
> +WK_EXPORT WKStringRef WKBundleFrameCopySuggestedFilenameForResourceURL(WKBundleFrameRef page, WKURLRef url);
"page" seems wrong.
> Source/WebKit2/WebProcess/WebPage/WebFrame.cpp:538
> + if (DocumentLoader* loader = m_coreFrame->loader()->documentLoader()) {
> + if (RefPtr<ArchiveResource> subresource = loader->subresource(url))
> + return subresource->response().suggestedFilename();
> + }
I think early returns would be nicer.
> Source/WebKit2/WebProcess/WebPage/WebFrame.h:112
> + String suggestedFilenameForResourceURL(const WebCore::KURL& url) const;
No need for "url" here.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list