mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Add the TaskSourceName to CommonScriptMsg::Task
Update QueuedTaskConversion and the TaskQueue to use it
This commit is contained in:
parent
b211e45bb0
commit
e286fdcc53
18 changed files with 134 additions and 71 deletions
|
@ -2837,7 +2837,14 @@ impl Document {
|
|||
let trusted_pending = Trusted::new(pending);
|
||||
let trusted_promise = TrustedPromise::new(promise.clone());
|
||||
let handler = ElementPerformFullscreenEnter::new(trusted_pending, trusted_promise, error);
|
||||
let script_msg = CommonScriptMsg::Task(ScriptThreadEventCategory::EnterFullscreen, handler, pipeline_id);
|
||||
// NOTE: This steps should be running in parallel
|
||||
// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
|
||||
let script_msg = CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::EnterFullscreen,
|
||||
handler,
|
||||
pipeline_id,
|
||||
TaskSourceName::DOMManipulation,
|
||||
);
|
||||
let msg = MainThreadScriptMsg::Common(script_msg);
|
||||
window.main_thread_script_chan().send(msg).unwrap();
|
||||
|
||||
|
@ -2870,7 +2877,14 @@ impl Document {
|
|||
let trusted_promise = TrustedPromise::new(promise.clone());
|
||||
let handler = ElementPerformFullscreenExit::new(trusted_element, trusted_promise);
|
||||
let pipeline_id = Some(global.pipeline_id());
|
||||
let script_msg = CommonScriptMsg::Task(ScriptThreadEventCategory::ExitFullscreen, handler, pipeline_id);
|
||||
// NOTE: This steps should be running in parallel
|
||||
// https://fullscreen.spec.whatwg.org/#exit-fullscreen
|
||||
let script_msg = CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::ExitFullscreen,
|
||||
handler,
|
||||
pipeline_id,
|
||||
TaskSourceName::DOMManipulation,
|
||||
);
|
||||
let msg = MainThreadScriptMsg::Common(script_msg);
|
||||
window.main_thread_script_chan().send(msg).unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue