Implement webview formatting clearing.

Mon, 27 Feb 2012 03:15:42 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Mon, 27 Feb 2012 03:15:42 +0000
changeset 32894
2bb8148a567a
parent 32893
6063be322695
child 32895
fbd3b11e535a

Implement webview formatting clearing.

pidgin/gtkwebview.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkwebview.c	Sun Feb 26 05:49:17 2012 +0000
+++ b/pidgin/gtkwebview.c	Mon Feb 27 03:15:42 2012 +0000
@@ -314,6 +314,7 @@
 webview_clear_formatting(GtkWebView *webview)
 {
 	GtkWebViewPriv *priv = GTK_WEBVIEW_GET_PRIVATE(webview);
+	WebKitDOMDocument *dom;
 
 	if (!webkit_web_view_get_editable(WEBKIT_WEB_VIEW(webview)))
 		return;
@@ -335,6 +336,9 @@
 
 	g_free(priv->edit.background);
 	priv->edit.background = NULL;
+
+	dom = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(webview));
+	webkit_dom_document_exec_command(dom, "removeFormat", FALSE, "");
 }
 
 static void

mercurial