Commit 1df43e44 authored by Cédric Bellegarde's avatar Cédric Bellegarde

Revert "Revert "Enable process_swap_on_cross_site_navigation_enabled by default""

This reverts commit 33895abf.
parent 33895abf
Pipeline #162201 failed with stage
in 58 seconds
......@@ -41,7 +41,6 @@ from eolie.database_history import DatabaseHistory
from eolie.database_bookmarks import DatabaseBookmarks
from eolie.database_settings import DatabaseSettings
from eolie.sqlcursor import SqlCursor
from eolie.context import Context
from eolie.search import Search
from eolie.download_manager import DownloadManager
from eolie.menu_pages import PagesMenu
......@@ -351,9 +350,6 @@ class Application(Gtk.Application, NightApplication):
except:
pass
# Init default context
Context(WebKit2.WebContext().get_default())
shortcut_action = Gio.SimpleAction.new('shortcut',
GLib.VariantType.new('s'))
shortcut_action.connect('activate', self.__on_shortcut_action)
......
......@@ -39,13 +39,11 @@ class WebView(WebKit2.WebView):
New webview
@param window as Window
"""
content_manager = WebKit2.UserContentManager.new()
for content_filter in App().content_filters:
if content_filter is not None:
content_manager.add_filter(content_filter)
context = WebKit2.WebContext(
process_swap_on_cross_site_navigation_enabled=True)
Context(context)
webview = WebKit2.WebView.new_with_user_content_manager(
content_manager)
webview = WebKit2.WebView.new_with_context(context)
webview.__class__ = WebViewMeta
webview.__init(None, window)
return webview
......@@ -389,6 +387,10 @@ class WebView(WebKit2.WebView):
self.set_hexpand(True)
self.set_vexpand(True)
self.clear_text_entry()
content_manager = self.get_user_content_manager()
for content_filter in App().content_filters:
if content_filter is not None:
content_manager.add_filter(content_filter)
if related is None:
# Set settings
settings = self.get_settings()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment