Allow a method to clear a WebKitPage.
Created attachment 16996 [details] Add a API for clear a WebKitPage
(In reply to comment #1) > Created an attachment (id=16996) [edit] > Add a API for clear a WebKitPage Please set the "review?" flag if you would like your patch reviewed. Thanks!
Comment on attachment 16996 [details] Add a API for clear a WebKitPage >Index: WebKit/gtk/Api/webkitgtkpage.cpp >=================================================================== >--- WebKit/gtk/Api/webkitgtkpage.cpp (revision 27376) >+++ WebKit/gtk/Api/webkitgtkpage.cpp (working copy) >@@ -498,6 +498,11 @@ > frameData->frame->loader()->load(ResourceRequest(KURL(string))); > } > >+void webkit_page_clear(WebKitPage *page) >+{ >+ webkit_page_load_html_string(page, "<html><body></body></html>", "about:blank"); >+} >+ > void webkit_page_reload(WebKitPage* page) > { > WebKitPagePrivate* pageData = WEBKIT_PAGE_GET_PRIVATE(page); >Index: WebKit/gtk/Api/webkitgtkpage.h >=================================================================== >--- WebKit/gtk/Api/webkitgtkpage.h (revision 27376) >+++ WebKit/gtk/Api/webkitgtkpage.h (working copy) >@@ -136,6 +136,9 @@ > webkit_page_open (WebKitPage* page, const gchar* url); > > WEBKIT_API void >+webkit_page_clear (WebKitPage *page); >+ >+WEBKIT_API void > webkit_page_reload (WebKitPage *page); > > WEBKIT_API void
You can trivially clear a page by loading about:blank into it. I don't see why this is desirable as API.
Comment on attachment 16996 [details] Add a API for clear a WebKitPage As mentioned, I don't think this is desirable in the API.