Bug 112154 - [Qt][WK2] Don't send download requests through PageClient::handleDownloadRequest
Summary: [Qt][WK2] Don't send download requests through PageClient::handleDownloadRequest
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jocelyn Turcotte
URL:
Keywords:
Depends on:
Blocks: 112155
  Show dependency treegraph
 
Reported: 2013-03-12 07:55 PDT by Jocelyn Turcotte
Modified: 2014-02-03 03:25 PST (History)
9 users (show)

See Also:


Attachments
Patch (29.31 KB, patch)
2013-03-12 08:20 PDT, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff
Patch (30.06 KB, patch)
2013-03-19 11:44 PDT, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Turcotte 2013-03-12 07:55:22 PDT
[Qt][WK2] Don't send download requests through PageClient::handleDownloadRequest
Comment 1 Jocelyn Turcotte 2013-03-12 08:20:41 PDT
Created attachment 192740 [details]
Patch
Comment 2 Simon Hausmann 2013-03-13 14:11:47 PDT
Comment on attachment 192740 [details]
Patch

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

Overall this looks like a nice change! Lots of red and reduced #ifdefs

> Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:68
> +void QtDownloadManager::didStart(WKContextRef context, WKDownloadRef download, const void *clientInfo)

* placement for clientInfo parameter

> Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:73
> +    QString requestURL = WKURLCopyQString(adoptWK(WKURLRequestCopyURL(request.get())).get());

I suppose you could use adoptToQUrl(WKURLRequestCopyURL(request.get()) here?

> Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:78
> +    ASSERT(q->m_downloadSourceView.size() && q->m_downloadSourceView.first().first == requestURL);

Perhaps a struct instead of a QPair would increase the readability of the code here? :)
Comment 3 Jesus Sanchez-Palencia 2013-03-14 07:26:34 PDT
(In reply to comment #1)
> Created an attachment (id=192740) [details]
> Patch

LWBTM! (Looks way better to me! tm.)
I've never really liked that handleDownloadRequest code path...
Comment 4 Jocelyn Turcotte 2013-03-19 11:44:12 PDT
Created attachment 193881 [details]
Patch

Address Simon's comment.
Comment 5 Benjamin Poulain 2013-03-19 14:45:41 PDT
Comment on attachment 193881 [details]
Patch

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

> Source/WebKit2/ChangeLog:22
> +          - Send the didStart signal to be catched from the UI process

Signal?

> Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h:185
>      QScopedPointer<QQuickWebPage> pageView;
>      QQuickWebView* q_ptr;
>      QQuickWebViewExperimental* experimental;
> -    WebKit::QtWebContext* context;
> +    WebKit::QtWebContext* m_context;

This is the only "m_" prefixed attribute.
Wouldn't it be better to rename them all at once in a separate patch?
Comment 6 Benjamin Poulain 2013-03-19 14:46:08 PDT
I think Alexey would be a better reviewer than me for this.
Comment 7 Anders Carlsson 2013-10-02 21:26:02 PDT
Comment on attachment 193881 [details]
Patch

Qt has been removed, clearing review flags.
Comment 8 Jocelyn Turcotte 2014-02-03 03:25:16 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.