WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176000
Add WKUIDelegatePrivate equivalent of WKPageUIClient's saveDataToFileInDownloadsFolder
https://bugs.webkit.org/show_bug.cgi?id=176000
Summary
Add WKUIDelegatePrivate equivalent of WKPageUIClient's saveDataToFileInDownlo...
Alex Christensen
Reported
2017-08-25 16:06:48 PDT
Add WKUIDelegatePrivate equivalent of WKPageUIClient's saveDataToFileInDownloadsFolder
Attachments
Patch
(22.08 KB, patch)
2017-08-25 16:08 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(22.39 KB, patch)
2017-08-25 16:24 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2017-08-25 16:08:25 PDT
Created
attachment 319109
[details]
Patch
Andy Estes
Comment 2
2017-08-25 16:17:16 PDT
Comment on
attachment 319109
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319109&action=review
> Source/WebKit/UIProcess/WebPageProxy.cpp:6126 > + saveDataToFileInDownloadsFolder(WTFMove(suggestedFilename), "application/pdf", WTFMove(originatingURL),
Can you use ASCIILiteral() for "application/pdf"?
> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/UIDelegate.mm:178 > + EXPECT_EQ(webView, saveDataToFileArguments.webView); > + EXPECT_TRUE([saveDataToFileArguments.data isEqualToData:[NSData dataWithContentsOfURL:pdfURL]]); > + EXPECT_STREQ([saveDataToFileArguments.suggestedFilename UTF8String], "test.pdf"); > + EXPECT_STREQ([saveDataToFileArguments.mimeType UTF8String], "application/pdf"); > + EXPECT_STREQ([[saveDataToFileArguments.url absoluteString] UTF8String], [[pdfURL absoluteString] UTF8String]);
This is fine, but you could just move these EXPECTs into -_webView:saveDataToFile:suggestedFilename:mimeType:originatingURL: and avoid creating a struct.
Alex Christensen
Comment 3
2017-08-25 16:24:19 PDT
Created
attachment 319113
[details]
Patch
Build Bot
Comment 4
2017-08-25 16:25:39 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Alex Christensen
Comment 5
2017-08-25 17:14:01 PDT
http://trac.webkit.org/r221216
Radar WebKit Bug Importer
Comment 6
2017-08-25 17:14:35 PDT
<
rdar://problem/34092924
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug