···11+--- original
22++++ modified
33+@@ -0,0 +1,25 @@
44++/* SPDX Id: AGPL-3.0-or-later */
55++
66++[Exposed=Window,
77++Func="Embedder::is_allowed_to_embed"]
88++interface ContentBlocker {
99++ // Get blocking state for an origin
1010++ Promise<ContentBlockerOriginState> getOriginState(USVString origin);
1111++
1212++ // Enable/disable blocking for a specific origin
1313++ Promise<undefined> setOriginEnabled(USVString origin, boolean enabled);
1414++
1515++ // Reset counts for an origin
1616++ Promise<undefined> resetCounts(USVString origin);
1717++};
1818++
1919++dictionary ContentBlockerOriginState {
2020++ boolean enabled = true;
2121++ unsigned long blockedCount = 0;
2222++ unsigned long allowedCount = 0;
2323++};
2424++
2525++partial interface Embedder {
2626++ [Func="Embedder::is_allowed_to_embed"]
2727++ readonly attribute ContentBlocker contentBlocker;
2828++};
+5-2
patches/components/servo/lib.rs.patch
···1414 pub use paint::WebRenderDebugOption;
1515 pub use paint_api::rendering_context::{
1616 OffscreenRenderingContext, RenderingContext, SoftwareRenderingContext, WindowRenderingContext,
1717-@@ -56,10 +58,13 @@
1717+@@ -55,11 +57,15 @@
1818+ // This should be replaced with an API on ServoBuilder.
1819 // See <https://github.com/servo/servo/issues/40950>.
1920 pub use resources;
2020- pub use servo_base::generic_channel::GenericSender;
2121+-pub use servo_base::generic_channel::GenericSender;
2122-pub use servo_base::id::WebViewId;
2323++pub use servo_base::generic_channel::{GenericCallback, GenericSender};
2224+pub use servo_base::id::{BrowsingContextId, PipelineId, WebViewId};
2325+pub use servo_config::embedder_prefs::PrefsPersistError;
2426 pub use servo_config::opts::{DiagnosticsLogging, Opts, OutputOptions};
···2729+pub use servo_config::{
2830+ EmbedderPreferences, define_embedder_prefs, embedder_prefs, opts, pref, prefs,
2931+};
3232++pub use servo_constellation_traits::ContentBlockerOriginState;
3033 pub use servo_geometry::{
3134 DeviceIndependentIntRect, DeviceIndependentPixel, convert_rect_to_css_pixel,
3235 };
···210210 /// Mark a new document as active
211211 ActivateDocument,
212212 /// Set the document state for a pipeline (used by screenshot / reftests)
213213-@@ -754,6 +886,122 @@
213213+@@ -754,6 +886,131 @@
214214 /// aggregate lock count and notify the provider only when the count transitions from N to 0.
215215 /// <https://w3c.github.io/screen-wake-lock/#dfn-release-wake-lock>
216216 ReleaseWakeLock(WakeLockType),
···282282+ PairingDisableGuestMode(GenericCallback<Result<(), String>>),
283283+ /// Request guest pairing with a PIN.
284284+ PairingRequestGuestPairing(String, String, GenericCallback<Result<bool, String>>),
285285++ /// Content blocker: get origin state (enabled, blocked_count, allowed_count).
286286++ ContentBlockerGetOriginState(
287287++ String,
288288++ GenericCallback<Result<super::ContentBlockerOriginState, String>>,
289289++ ),
290290++ /// Content blocker: enable/disable blocking for a specific origin.
291291++ ContentBlockerSetOriginEnabled(String, bool, GenericCallback<Result<(), String>>),
292292++ /// Content blocker: reset counts for an origin.
293293++ ContentBlockerResetCounts(String, GenericCallback<Result<(), String>>),
285294+ /// Create a peer stream: create a virtual remote port entangled with a local port,
286295+ /// and send the offer to a remote peer.
287296+ /// Args: peer_id, local_port_id, remote_port_id, target_url, callback.