mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
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`.
This commit is contained in:
parent
1017533297
commit
3398fc017b
163 changed files with 709 additions and 632 deletions
|
@ -14,6 +14,7 @@ path = "lib.rs"
|
|||
chrono = "0.4"
|
||||
|
||||
[dependencies]
|
||||
base = { workspace = true }
|
||||
chrono = "0.4"
|
||||
crossbeam-channel = { workspace = true }
|
||||
devtools_traits = { workspace = true }
|
||||
|
@ -22,7 +23,6 @@ headers = { workspace = true }
|
|||
http = { workspace = true }
|
||||
ipc-channel = { workspace = true }
|
||||
log = { workspace = true }
|
||||
msg = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
servo_config = { path = "../config" }
|
||||
|
|
|
@ -10,10 +10,10 @@ use std::cell::{Cell, RefCell};
|
|||
use std::collections::HashMap;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
|
||||
use devtools_traits::{DevtoolsPageInfo, NavigationState};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ use std::collections::HashMap;
|
|||
use std::net::TcpStream;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use base::id::TEST_PIPELINE_ID;
|
||||
use devtools_traits::EvaluateJSReply::{
|
||||
ActorValue, BooleanValue, NullValue, NumberValue, StringValue, VoidValue,
|
||||
};
|
||||
|
@ -20,7 +21,6 @@ use devtools_traits::{
|
|||
};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use log::debug;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use serde::Serialize;
|
||||
use serde_json::{self, Map, Number, Value};
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
use std::mem;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
use std::cell::RefCell;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use devtools_traits::DevtoolScriptControlMsg::{
|
||||
GetChildren, GetDocumentElement, GetLayout, GetRootNode, ModifyAttribute,
|
||||
};
|
||||
use devtools_traits::{ComputedNodeLayout, DevtoolScriptControlMsg, NodeInfo};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{self, Map, Value};
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ use std::sync::{Arc, Mutex};
|
|||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use devtools_traits::DevtoolScriptControlMsg::{DropTimelineMarkers, SetTimelineMarkers};
|
||||
use devtools_traits::{DevtoolScriptControlMsg, PreciseTime, TimelineMarker, TimelineMarkerType};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ use std::cell::RefCell;
|
|||
use std::collections::HashMap;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use base::id::TEST_PIPELINE_ID;
|
||||
use devtools_traits::DevtoolScriptControlMsg::WantsLiveNotifications;
|
||||
use devtools_traits::{DevtoolScriptControlMsg, WorkerId};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use servo_url::ServoUrl;
|
||||
|
|
|
@ -20,6 +20,7 @@ use std::net::{Shutdown, TcpListener, TcpStream};
|
|||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use devtools_traits::{
|
||||
ChromeToDevtoolsControlMsg, ConsoleMessage, DevtoolScriptControlMsg, DevtoolsControlMsg,
|
||||
|
@ -29,7 +30,6 @@ use devtools_traits::{
|
|||
use embedder_traits::{EmbedderMsg, EmbedderProxy, PromptDefinition, PromptOrigin, PromptResult};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use log::{debug, warn};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use serde::Serialize;
|
||||
use servo_rand::RngCore;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue