[geary/ThamiMemel/geary-sandboxing_issue_#842: 3/3] Components.WebView: Switch to WebProcess document browser cache model
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/ThamiMemel/geary-sandboxing_issue_#842: 3/3] Components.WebView: Switch to WebProcess document browser cache model
- Date: Wed, 20 Jan 2021 12:07:49 +0000 (UTC)
commit 5421ea466231714cb3f9cfb3d858055bdbc63b27
Author: Michael Gratton <mike vee net>
Date: Wed Jan 20 23:03:40 2021 +1100
Components.WebView: Switch to WebProcess document browser cache model
Now we're using a single long-lived WebProcess for displaying multiple
email, it makes sense to enable some caching.
src/client/components/components-web-view.vala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/client/components/components-web-view.vala b/src/client/components/components-web-view.vala
index 0abc8c58d..6896a6b83 100644
--- a/src/client/components/components-web-view.vala
+++ b/src/client/components/components-web-view.vala
@@ -82,9 +82,9 @@ public abstract class Components.WebView : WebKit.WebView, Geary.BaseInterface {
// Enable WebProcess sandboxing
context.add_path_to_sandbox(web_extension_dir.get_path(), true);
context.set_sandbox_enabled(true);
- // Use the doc viewer model since each web view instance only
- // ever shows a single HTML document.
- context.set_cache_model(WebKit.CacheModel.DOCUMENT_VIEWER);
+ // Use the doc browser model so that we get some caching of
+ // resources between email body loads.
+ context.set_cache_model(WebKit.CacheModel.DOCUMENT_BROWSER);
context.register_uri_scheme("cid", (req) => {
WebView? view = req.get_web_view() as WebView;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]