Bug 15802 - [GTK] webkit_page_clear API
Summary: [GTK] webkit_page_clear API
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-11-02 11:33 PDT by Salvatore De Paolis
Modified: 2007-11-04 17:15 PST (History)
1 user (show)

See Also:


Attachments
Add a API for clear a WebKitPage (975 bytes, patch)
2007-11-02 11:34 PDT, Salvatore De Paolis
mrowe: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore De Paolis 2007-11-02 11:33:31 PDT
Allow a method to clear a WebKitPage.
Comment 1 Salvatore De Paolis 2007-11-02 11:34:27 PDT
Created attachment 16996 [details]
Add a API for clear a WebKitPage
Comment 2 David Kilzer (:ddkilzer) 2007-11-03 08:39:36 PDT
(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 3 Salvatore De Paolis 2007-11-03 11:26:30 PDT
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
Comment 4 Mark Rowe (bdash) 2007-11-04 08:22:14 PST
You can trivially clear a page by loading about:blank into it.  I don't see why this is desirable as API.
Comment 5 Mark Rowe (bdash) 2007-11-04 08:23:11 PST
Comment on attachment 16996 [details]
Add a API for clear a WebKitPage

As mentioned, I don't think this is desirable in the API.