summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-27 11:39:17 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-27 11:40:56 +0200
commita79bdd2bd544c6111c1e5c2876af4875f613437b (patch)
tree27cf923ab66add87f2521e3ddcfaff722ba4a2ba /Userland/Libraries/LibWeb
parentb0858b2a55814291bf822007a3a0c5aea5455a56 (diff)
downloadserenity-a79bdd2bd544c6111c1e5c2876af4875f613437b.zip
LibWeb+Browser: Make ad blocking work in the multi-process world
We now send the list of content filters over to new WebContent processes after creating an OutOfProcessWebView. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/OutOfProcessWebView.cpp5
-rw-r--r--Userland/Libraries/LibWeb/OutOfProcessWebView.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
index 4bf06133d5..28bd7dffce 100644
--- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
@@ -472,4 +472,9 @@ String OutOfProcessWebView::dump_layout_tree()
return client().dump_layout_tree();
}
+void OutOfProcessWebView::set_content_filters(Vector<String> filters)
+{
+ client().async_set_content_filters(filters);
+}
+
}
diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.h b/Userland/Libraries/LibWeb/OutOfProcessWebView.h
index 9e70436725..b5e1bfeecd 100644
--- a/Userland/Libraries/LibWeb/OutOfProcessWebView.h
+++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.h
@@ -51,6 +51,8 @@ public:
String dump_layout_tree();
+ void set_content_filters(Vector<String>);
+
void notify_server_did_layout(Badge<WebContentClient>, const Gfx::IntSize& content_size);
void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id);
void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, const Gfx::IntRect&);