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