Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Günther Wagner
gnome-builder
Commits
7038e57a
Commit
7038e57a
authored
Sep 03, 2015
by
Christian Hergert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webkit: disable webkit local storage
Until the bug is fixed upstream, keep this disabled.
parent
47e02dee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
plugins/devhelp/gb-devhelp-view.c
plugins/devhelp/gb-devhelp-view.c
+18
-3
plugins/html-preview/html_preview_plugin/__init__.py
plugins/html-preview/html_preview_plugin/__init__.py
+4
-3
No files found.
plugins/devhelp/gb-devhelp-view.c
View file @
7038e57a
...
...
@@ -22,7 +22,6 @@
#include <webkit2/webkit2.h>
#include "gb-devhelp-view.h"
#include "gb-webkit.h"
#include "gb-widget.h"
struct
_GbDevhelpView
...
...
@@ -48,6 +47,22 @@ enum {
static
GParamSpec
*
gParamSpecs
[
LAST_PROP
];
static
void
apply_settings
(
WebKitWebView
*
view
)
{
g_return_if_fail
(
WEBKIT_IS_WEB_VIEW
(
view
));
/*
* TODO: Consider whether HTML5 local storage should be enabled. It could only
* possibly be useful for complex web sites, but if you're building a web site
* with Builder then it might be useful to have. But leave disabled until
* https://bugs.webkit.org/show_bug.cgi?id=143245 has been fixed.
*/
g_object_set
(
webkit_web_view_get_settings
(
view
),
"enable-html5-local-storage"
,
FALSE
,
NULL
);
}
GbView
*
gb_devhelp_view_new
(
GbDevhelpDocument
*
document
)
{
...
...
@@ -152,7 +167,7 @@ gb_devhelp_view_set_split_view (GbView *view,
self
->
web_view2
=
g_object_new
(
WEBKIT_TYPE_WEB_VIEW
,
"visible"
,
TRUE
,
NULL
);
gb_webkit_web_view_
apply_settings
(
self
->
web_view2
);
apply_settings
(
self
->
web_view2
);
gtk_container_add_with_properties
(
GTK_CONTAINER
(
self
->
paned
),
GTK_WIDGET
(
self
->
web_view2
),
"shrink"
,
FALSE
,
"resize"
,
TRUE
,
...
...
@@ -267,5 +282,5 @@ gb_devhelp_view_init (GbDevhelpView *self)
{
gtk_widget_init_template
(
GTK_WIDGET
(
self
));
gb_webkit_web_view_
apply_settings
(
self
->
web_view1
);
apply_settings
(
self
->
web_view1
);
}
plugins/html-preview/html_preview_plugin/__init__.py
View file @
7038e57a
...
...
@@ -44,9 +44,6 @@ class HtmlPreviewData(GObject.Object, Builder.ApplicationAddin):
MARKDOWN_VIEW_JS
=
None
def
do_load
(
self
,
app
):
settings
=
WebKit2
.
Settings
()
settings
.
enable_html5_local_storage
=
False
HtmlPreviewData
.
MARKDOWN_CSS
=
self
.
get_data
(
'markdown.css'
)
HtmlPreviewData
.
MARKED_JS
=
self
.
get_data
(
'marked.js'
)
HtmlPreviewData
.
MARKDOWN_VIEW_JS
=
self
.
get_data
(
'markdown-view.js'
)
...
...
@@ -106,6 +103,10 @@ class HtmlPreviewView(Builder.View):
self
.
webview
=
WebKit2
.
WebView
(
visible
=
True
,
expand
=
True
)
self
.
add
(
self
.
webview
)
settings
=
self
.
webview
.
get_settings
()
settings
.
enable_html5_local_storage
=
False
language
=
document
.
get_language
()
if
language
and
language
.
get_id
()
==
'markdown'
:
self
.
markdown
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment