mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Rename Runnable to Task
The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
This commit is contained in:
parent
52a6f63608
commit
56117d3185
38 changed files with 370 additions and 332 deletions
|
@ -113,7 +113,7 @@ use net_traits::response::HttpsState;
|
|||
use num_traits::ToPrimitive;
|
||||
use script_layout_interface::message::{Msg, ReflowQueryType};
|
||||
use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
||||
use script_thread::{MainThreadScriptMsg, Runnable, ScriptThread};
|
||||
use script_thread::{MainThreadScriptMsg, ScriptThread, Task};
|
||||
use script_traits::{AnimationState, CompositorEvent, DocumentActivity};
|
||||
use script_traits::{MouseButton, MouseEventType, MozBrowserEvent};
|
||||
use script_traits::{MsDuration, ScriptMsg, TouchpadPressurePhase};
|
||||
|
@ -2609,7 +2609,7 @@ 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::RunnableMsg(ScriptThreadEventCategory::EnterFullscreen, handler);
|
||||
let script_msg = CommonScriptMsg::Task(ScriptThreadEventCategory::EnterFullscreen, handler);
|
||||
let msg = MainThreadScriptMsg::Common(script_msg);
|
||||
window.main_thread_script_chan().send(msg).unwrap();
|
||||
|
||||
|
@ -2641,7 +2641,7 @@ impl Document {
|
|||
let trusted_element = Trusted::new(element.r());
|
||||
let trusted_promise = TrustedPromise::new(promise.clone());
|
||||
let handler = ElementPerformFullscreenExit::new(trusted_element, trusted_promise);
|
||||
let script_msg = CommonScriptMsg::RunnableMsg(ScriptThreadEventCategory::ExitFullscreen, handler);
|
||||
let script_msg = CommonScriptMsg::Task(ScriptThreadEventCategory::ExitFullscreen, handler);
|
||||
let msg = MainThreadScriptMsg::Common(script_msg);
|
||||
window.main_thread_script_chan().send(msg).unwrap();
|
||||
|
||||
|
@ -4016,8 +4016,8 @@ impl DocumentProgressHandler {
|
|||
}
|
||||
}
|
||||
|
||||
impl Runnable for DocumentProgressHandler {
|
||||
fn handler(self: Box<DocumentProgressHandler>) {
|
||||
impl Task for DocumentProgressHandler {
|
||||
fn run(self: Box<Self>) {
|
||||
let document = self.addr.root();
|
||||
let window = document.window();
|
||||
if window.is_alive() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue