Bug 29731 - [Qt] [Api] Added a QWebFrame::load(QWebLoadRequest) method
Summary: [Qt] [Api] Added a QWebFrame::load(QWebLoadRequest) method
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P4 Minor
Assignee: Antonio Gomes
URL:
Keywords: Qt
Depends on: 29248 29679
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-24 20:05 PDT by Antonio Gomes
Modified: 2009-09-28 12:29 PDT (History)
4 users (show)

See Also:


Attachments
patch 0.1 (12.37 KB, patch)
2009-09-24 20:18 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2009-09-24 20:05:41 PDT
I liked the idea from https://bugs.webkit.org/show_bug.cgi?id=29248#c30

(In reply to comment #30)
> Discussing this with Kent just gave me an alternate idea to fix the API:
> 
> setHtml("<html>...", QUrl("file://..."), QUrl("...");
> 
> is not very readable. I don't know what the difference between the second and
> third argument is. I would prefer something slightly more readable:
> 
> QWebLoadRequest request;
> request.baseUrl = "file://....";
> request.mimeType = "text/html";
> request.contentData = "<html>..";
> request.historyURl = "about:foo";
> webFrame->load(request);

That way we can have a more robust substitution load mechanism, including "dataContent", "mimeType", "encoding", "urlForHistory" and whatever. it helps on a better "error pages" handling , see bug 29679.
Comment 1 Antonio Gomes 2009-09-24 20:18:09 PDT
Created attachment 40097 [details]
patch 0.1

Patch does:

* Add a QWebLoadRequest (not yet inheriting from QNetworkRequest - maybe no need to).
* Add a QWebFrame::load method that take a QWebLoadRequest as parameter
* Adap QWebFrame's setHtml and setContent implementation to use QWebLoadRequest.
* Make 'Substitution' load to not emit urlChanged.

i am requesting review to get comments, since i probably needs a api discussion.
Comment 2 Antonio Gomes 2009-09-25 11:24:35 PDT
clearing r=? flag since it is now clean if we are going to follow this approach ( add a new class specifically to do this )

and also downgrading the importance/priority
Comment 3 Antonio Gomes 2009-09-28 12:29:16 PDT
right, per discussion to tor arne last friday on IRC, there is no need to add this extra / specific class just for it.

setting as wontfix