diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-05-17 14:28:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 12:28:58 +0000 |
commit | 3398fc017b994fff113342baab47718a44a37752 (patch) | |
tree | 9ec5881db059b0bda7d374ad4d0abe96319e5c25 /components/script/task_source | |
parent | 1017533297889beca40be5f121629347963fbf27 (diff) | |
download | servo-3398fc017b994fff113342baab47718a44a37752.tar.gz servo-3398fc017b994fff113342baab47718a44a37752.zip |
Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)
For a long time, `gfx_traits` has held a lot of things unrelated to graphics
and also unrelated to the `gfx` crate (which is mostly about fonts).
This is a cleanup which does a few things:
1. Move non `gfx` crate things out of `gfx_traits`. This is important in
order to prevent dependency cycles with a different integration between
layout, script, and fonts.
2. Rename the `msg` crate to `base`. It didn't really contain anything
to do with messages and instead mostly holds ids, which are used
across many different crates in Servo. This new crate will hold the
*rare* data types that are widely used.
Details:
- All BackgroundHangMonitor-related things from base to a new
`background_hang_monitor_api` crate.
- Moved `TraversalDirection` to `script_traits`
- Moved `Epoch`-related things from `gfx_traits` to `base`.
- Moved `PrintTree` to base. This should be widely useful in Servo.
- Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it
to `WebRenderFontApi`.
Diffstat (limited to 'components/script/task_source')
-rw-r--r-- | components/script/task_source/dom_manipulation.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/file_reading.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/gamepad.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/history_traversal.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/media_element.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/networking.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/performance_timeline.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/port_message.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/remote_event.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/rendering.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/timer.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/user_interaction.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/websocket.rs | 2 |
13 files changed, 13 insertions, 13 deletions
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs index eaff254a5cf..1469db66155 100644 --- a/components/script/task_source/dom_manipulation.rs +++ b/components/script/task_source/dom_manipulation.rs @@ -5,7 +5,7 @@ use std::fmt; use std::result::Result; -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use servo_atoms::Atom; use crate::dom::bindings::inheritance::Castable; diff --git a/components/script/task_source/file_reading.rs b/components/script/task_source/file_reading.rs index 77e566dbf63..afb1f5c104a 100644 --- a/components/script/task_source/file_reading.rs +++ b/components/script/task_source/file_reading.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::dom::domexception::DOMErrorName; use crate::dom::filereader::{FileReader, GenerationId, ReadMetaData, TrustedFileReader}; diff --git a/components/script/task_source/gamepad.rs b/components/script/task_source/gamepad.rs index e6694f3daea..9d38257bace 100644 --- a/components/script/task_source/gamepad.rs +++ b/components/script/task_source/gamepad.rs @@ -5,7 +5,7 @@ use std::fmt; use std::result::Result; -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; diff --git a/components/script/task_source/history_traversal.rs b/components/script/task_source/history_traversal.rs index 1676461fa99..4bb90a1ffcb 100644 --- a/components/script/task_source/history_traversal.rs +++ b/components/script/task_source/history_traversal.rs @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use base::id::PipelineId; use crossbeam_channel::Sender; -use msg::constellation_msg::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory}; use crate::script_thread::MainThreadScriptMsg; diff --git a/components/script/task_source/media_element.rs b/components/script/task_source/media_element.rs index 64d2f6c2764..944ffc4f5bf 100644 --- a/components/script/task_source/media_element.rs +++ b/components/script/task_source/media_element.rs @@ -5,8 +5,8 @@ use std::fmt; use std::result::Result; +use base::id::PipelineId; use crossbeam_channel::Sender; -use msg::constellation_msg::PipelineId; use servo_atoms::Atom; use crate::dom::bindings::inheritance::Castable; diff --git a/components/script/task_source/networking.rs b/components/script/task_source/networking.rs index b55331af526..f142c1f6ae0 100644 --- a/components/script/task_source/networking.rs +++ b/components/script/task_source/networking.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; diff --git a/components/script/task_source/performance_timeline.rs b/components/script/task_source/performance_timeline.rs index 9f6f56a2cf4..9bcfe4bc1d8 100644 --- a/components/script/task_source/performance_timeline.rs +++ b/components/script/task_source/performance_timeline.rs @@ -9,7 +9,7 @@ use std::fmt; use std::result::Result; -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::dom::bindings::refcounted::Trusted; use crate::dom::globalscope::GlobalScope; diff --git a/components/script/task_source/port_message.rs b/components/script/task_source/port_message.rs index b9bca1e6194..0ca613c647c 100644 --- a/components/script/task_source/port_message.rs +++ b/components/script/task_source/port_message.rs @@ -4,7 +4,7 @@ use std::fmt; -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; diff --git a/components/script/task_source/remote_event.rs b/components/script/task_source/remote_event.rs index cadba9b3016..9a70d2a0234 100644 --- a/components/script/task_source/remote_event.rs +++ b/components/script/task_source/remote_event.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; diff --git a/components/script/task_source/rendering.rs b/components/script/task_source/rendering.rs index 732eb2aef2b..43afa4abb68 100644 --- a/components/script/task_source/rendering.rs +++ b/components/script/task_source/rendering.rs @@ -5,7 +5,7 @@ use std::fmt; use std::result::Result; -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; diff --git a/components/script/task_source/timer.rs b/components/script/task_source/timer.rs index e565a3aaa22..4f8ad10d811 100644 --- a/components/script/task_source/timer.rs +++ b/components/script/task_source/timer.rs @@ -4,7 +4,7 @@ use std::fmt; -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index a16277f2781..9ddc06d9185 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -5,8 +5,8 @@ use std::fmt; use std::result::Result; +use base::id::PipelineId; use crossbeam_channel::Sender; -use msg::constellation_msg::PipelineId; use servo_atoms::Atom; use crate::dom::bindings::inheritance::Castable; diff --git a/components/script/task_source/websocket.rs b/components/script/task_source/websocket.rs index 27ad5202373..2d05067e28b 100644 --- a/components/script/task_source/websocket.rs +++ b/components/script/task_source/websocket.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use msg::constellation_msg::PipelineId; +use base::id::PipelineId; use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use crate::task::{TaskCanceller, TaskOnce}; |