RESOLVED FIXED Bug 176557
[WK2] Add C API to retrieve the originating page of a WKDownload
https://bugs.webkit.org/show_bug.cgi?id=176557
Summary [WK2] Add C API to retrieve the originating page of a WKDownload
Chris Dumez
Reported 2017-09-07 13:09:38 PDT
Add C API to retrieve the original page of a WKDownload. This is the C API equivalent to _WKDownload.originatingWebView in ObjC.
Attachments
Patch (16.55 KB, patch)
2017-09-07 14:11 PDT, Chris Dumez
no flags
Patch (17.10 KB, patch)
2017-09-07 15:21 PDT, Chris Dumez
no flags
Radar WebKit Bug Importer
Comment 1 2017-09-07 13:09:59 PDT
Chris Dumez
Comment 2 2017-09-07 14:11:44 PDT
Alex Christensen
Comment 3 2017-09-07 14:33:07 PDT
Comment on attachment 320177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320177&action=review > Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp:102 > + m_originatingPage = page ? page->createWeakPtr() : WeakPtr<WebPageProxy>(); will nullptr not work? > Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:265 > +void PageClientImpl::handleDownloadRequest(DownloadProxy*) > { > - ASSERT_ARG(download, download); > - ASSERT([download->wrapper() isKindOfClass:[_WKDownload class]]); > - [static_cast<_WKDownload *>(download->wrapper()) setOriginatingWebView:m_webView]; > } It would be nice if we could remove this PageClient call completely and make all platforms do this the same way. It seems like that's all GTK is doing here, and WPE is in progress.
Chris Dumez
Comment 4 2017-09-07 15:21:27 PDT
Build Bot
Comment 5 2017-09-07 15:23:36 PDT
Attachment 320189 [details] did not pass style-queue: ERROR: Source/WTF/wtf/WeakPtr.h:95: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 6 2017-09-07 15:50:01 PDT
Comment on attachment 320189 [details] Patch Clearing flags on attachment: 320189 Committed r221766: <http://trac.webkit.org/changeset/221766>
WebKit Commit Bot
Comment 7 2017-09-07 15:50:03 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.