Bug 29731

Summary: [Qt] [Api] Added a QWebFrame::load(QWebLoadRequest) method
Product: WebKit Reporter: Antonio Gomes <tonikitoo>
Component: WebKit QtAssignee: Antonio Gomes <tonikitoo>
Status: RESOLVED WONTFIX    
Severity: Minor CC: ariya.hidayat, hausmann, kenneth, vestbo
Priority: P4 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on: 29248, 29679    
Bug Blocks:    
Attachments:
Description Flags
patch 0.1 none

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