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



commit 9339dfe15b78299f3ce5bb9ef558fdb1a762e252
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 file changed, 7 insertions(+)
---
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]