[evolution/webkit-composer: 25/147] Fix loading local images



commit e5ad27fecb1ac1c8d9f42683c5094c80c41c0d6e
Author: Dan VrÃtil <dvratil redhat com>
Date:   Fri Aug 3 17:39:47 2012 +0200

    Fix loading local images

 e-util/e-editor-widget.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index 9341c54..4b55200 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -388,6 +388,7 @@ e_editor_widget_init (EEditorWidget *editor)
 		G_OBJECT (settings),
 		"enable-developer-extras", TRUE,
 		"enable-dom-paste", TRUE,
+		"enable-file-access-from-file-uris", TRUE,
 	        "enable-plugins", FALSE,
 		"enable-spell-checking", enable_spellchecking,
 	        "enable-scripts", FALSE,
@@ -410,6 +411,12 @@ e_editor_widget_init (EEditorWidget *editor)
 
 	editor->priv->selection = e_editor_selection_new (
 					WEBKIT_WEB_VIEW (editor));
+
+
+	/* Make WebKit think we are displaying a local file, so that it
+	 * does not block loading resources from file:// protocol */
+	webkit_web_view_load_string (
+		WEBKIT_WEB_VIEW (editor), "", "text/html", "UTF-8", "file://");
 }
 
 EEditorWidget *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]