[Webkit-unassigned] [Bug 29975] [Qt] Inform the application when a new request is created.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 6 07:16:36 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29975





--- Comment #12 from Benjamin Meyer <ben at meyerhome.net>  2009-10-06 07:16:36 PDT ---
    * What exactly is the use-case that requires an assocation of network
requests with frames?

When you get the unsupportedContent signal you want to know what frame it came
from so you should know how to handle the error.   If it is the main frame then
you load up a large error page.  If it is a subframe then you do something
different.

In the existing Wallet support of Arora we must wait until the createRequest
comes through to QNetworkAccessManager to be able to read the outgoingData
which contains the final form data.  At this point in time We only have a
QNetworkRequest and need a way to make a request->qwebframe to find the form in
the frame.  Not only do we want the frame, but we want the
QWebPage::NavigationType.

On the status bar Arora currently only shows a percentage of the webpage that
was loaded.  If we had a way to see what frame requests came from we could
provide better information about what a page is downloading.

All of the QNetworkAccessManager signals that bring up a dialog currently only
give you a QNetworkReply

void authenticationRequired ( QNetworkReply * reply, QAuthenticator *
authenticator )
void finished ( QNetworkReply * reply )
void proxyAuthenticationRequired ( const QNetworkProxy & proxy, QAuthenticator
* authenticator )
void sslErrors ( QNetworkReply * reply, const QList<QSslError> & errors )

Because of this if you have multiple QWebPages you must block the entire
application rather then just the QWebPage that need to prompt the user for
something.

QtWebKit actively encourages that application have only 1 QNetworkAccessManager
that is shared among all of the existing QWebPages.  There are a number of
valid reasons for this
- Only X number of connections to a host at a time
- QNetworkCookieJar and QNetworkDiskCache syncing issues
- Memory and cpu usage of running multiple of these of course

While you can go through and setup a QNetworkAccessManager that is a proxy for
each QWebPage this has many downsides such as more confusing code, memory
overhead for each manager/cookiejar object.  You can see this approach in Arora
today here: http://github.com/Arora/arora/tree/master/src/utils/

Talking with Thiago back in the day about this he mentioned how
QNetworkAccessManager and QNetworkRequest were designed so that it was
QNetworkRequest that had the ability for developers to add data to that would
be sent through the system using QNetworkRequest::User
http://doc.trolltech.com/4.5/qnetworkrequest.html#Attribute-enum

Having a QNetworkAccessManager proxy is working around the fact that QtWebKit
currently actively doesn't let you set anything in QNetworkRequests.

-- 
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