This commit is contained in:
Tony 2025-05-24 22:49:54 +02:00 committed by GitHub
commit 0b89e23f45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 103 additions and 10 deletions

View file

@ -76,7 +76,7 @@ use net_traits::request::{Referrer, RequestId};
use net_traits::response::ResponseInit;
use net_traits::storage_thread::StorageType;
use net_traits::{
FetchMetadata, FetchResponseListener, FetchResponseMsg, Metadata, NetworkError,
FetchMetadata, FetchResponseListener, FetchResponseMsg, Metadata, NetworkError, Protocols,
ResourceFetchTiming, ResourceThreads, ResourceTimingType,
};
use percent_encoding::percent_decode;
@ -336,6 +336,10 @@ pub struct ScriptThread {
/// The screen coordinates where the primary mouse button was pressed.
#[no_trace]
relative_mouse_down_point: Cell<Point2D<f32, DevicePixel>>,
/// Registered custom protocols
#[no_trace]
protocols: Arc<Protocols>,
}
struct BHMExitSignal {
@ -752,6 +756,7 @@ impl ScriptThread {
#[cfg(feature = "webgpu")]
gpu_id_hub: script_thread.gpu_id_hub.clone(),
inherited_secure_context: script_thread.inherited_secure_context,
protocols: script_thread.protocols.clone(),
};
Rc::new(WorkletThreadPool::spawn(init))
})
@ -957,6 +962,7 @@ impl ScriptThread {
inherited_secure_context: state.inherited_secure_context,
layout_factory,
relative_mouse_down_point: Cell::new(Point2D::zero()),
protocols: Arc::new(state.protocols),
}
}
@ -3228,6 +3234,7 @@ impl ScriptThread {
#[cfg(feature = "webgpu")]
self.gpu_id_hub.clone(),
incomplete.load_data.inherited_secure_context,
self.protocols.clone(),
);
let _realm = enter_realm(&*window);