[epiphany/pgriffis/web-extension-beastify: 5/6] WebExtensions: Create custom CSS in private world
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/pgriffis/web-extension-beastify: 5/6] WebExtensions: Create custom CSS in private world
- Date: Fri, 20 May 2022 18:55:24 +0000 (UTC)
commit 68bcb104cadb3b42b5f2428fc5a6e0e25dc1feb7
Author: Patrick Griffis <pgriffis igalia com>
Date: Fri May 20 13:42:46 2022 -0500
WebExtensions: Create custom CSS in private world
src/webextension/ephy-web-extension.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/webextension/ephy-web-extension.c b/src/webextension/ephy-web-extension.c
index 1d9d75945..28d70d5b9 100644
--- a/src/webextension/ephy-web-extension.c
+++ b/src/webextension/ephy-web-extension.c
@@ -1129,7 +1129,11 @@ web_extension_custom_css_new (EphyWebExtension *self,
WebExtensionCustomCSS *css = g_malloc0 (sizeof (WebExtensionCustomCSS));
css->code = g_strdup (code);
- css->style = webkit_user_style_sheet_new (css->code, WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
WEBKIT_USER_STYLE_LEVEL_USER, NULL, NULL);
+ css->style = webkit_user_style_sheet_new_for_world (css->code,
+ WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
+ WEBKIT_USER_STYLE_LEVEL_USER,
+ ephy_web_extension_get_guid (self),
+ NULL, NULL);
self->custom_css = g_list_append (self->custom_css, css);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]