mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
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. :^)
This commit is contained in:
parent
b0858b2a55
commit
a79bdd2bd5
8 changed files with 22 additions and 4 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Loader/ContentFilter.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <WebContent/ClientConnection.h>
|
||||
|
@ -338,4 +339,10 @@ Messages::WebContentServer::DumpLayoutTreeResponse ClientConnection::dump_layout
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
void ClientConnection::set_content_filters(Vector<String> const& filters)
|
||||
{
|
||||
for (auto& filter : filters)
|
||||
Web::ContentFilter::the().add_pattern(filter);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue