mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -31,7 +31,9 @@ accountable-refcell = { workspace = true, optional = true }
|
|||
app_units = { workspace = true }
|
||||
arrayvec = { workspace = true }
|
||||
atomic_refcell = { workspace = true }
|
||||
background_hang_monitor_api = { workspace = true }
|
||||
backtrace = { workspace = true }
|
||||
base = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
bitflags = { workspace = true }
|
||||
bluetooth_traits = { workspace = true }
|
||||
|
@ -74,7 +76,6 @@ media = { path = "../media" }
|
|||
metrics = { path = "../metrics" }
|
||||
mime = { workspace = true }
|
||||
mime_guess = { workspace = true }
|
||||
msg = { workspace = true }
|
||||
net_traits = { workspace = true }
|
||||
num_cpus = { workspace = true }
|
||||
num-traits = { workspace = true }
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
use std::cell::Cell;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use cssparser::ToCss;
|
||||
use fxhash::{FxHashMap, FxHashSet};
|
||||
use libc::c_void;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_traits::{AnimationState as AnimationsPresentState, ScriptMsg, UntrustedNodeAddress};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use style::animation::{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use std::rc::Rc;
|
||||
use std::str;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use devtools_traits::{
|
||||
AutoMargins, ComputedNodeLayout, EvaluateJSReply, Modification, NodeInfo, TimelineMarker,
|
||||
TimelineMarkerType,
|
||||
|
@ -12,7 +13,6 @@ use devtools_traits::{
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::ToString;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use dom_struct::dom_struct;
|
||||
use js::rust::HandleObject;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions};
|
||||
|
||||
use crate::dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions};
|
||||
|
|
|
@ -8,10 +8,10 @@ use std::collections::{HashMap, VecDeque};
|
|||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use base::id::PipelineId;
|
||||
use dom_struct::dom_struct;
|
||||
use js::rust::CustomAutoRooterGuard;
|
||||
use js::typedarray::ArrayBuffer;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_media::audio::context::{
|
||||
AudioContext, AudioContextOptions, OfflineAudioContextOptions, ProcessingState,
|
||||
RealTimeAudioContextOptions,
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::collections::HashMap;
|
|||
use std::os::raw;
|
||||
use std::ptr;
|
||||
|
||||
use base::id::{BlobId, MessagePortId};
|
||||
use js::glue::{
|
||||
CopyJSStructuredCloneData, DeleteJSAutoStructuredCloneBuffer, GetLengthOfJSStructuredCloneData,
|
||||
NewJSAutoStructuredCloneBuffer, WriteBytesToJSStructuredCloneData,
|
||||
|
@ -22,7 +23,6 @@ use js::jsapi::{
|
|||
use js::jsval::UndefinedValue;
|
||||
use js::rust::wrappers::{JS_ReadStructuredClone, JS_WriteStructuredClone};
|
||||
use js::rust::{CustomAutoRooterGuard, HandleValue, MutableHandleValue};
|
||||
use msg::constellation_msg::{BlobId, MessagePortId};
|
||||
use script_traits::serializable::BlobImpl;
|
||||
use script_traits::transferable::MessagePortImpl;
|
||||
use script_traits::StructuredSerializedData;
|
||||
|
|
|
@ -7,11 +7,11 @@ use std::num::NonZeroU32;
|
|||
use std::ptr::NonNull;
|
||||
use std::rc::Rc;
|
||||
|
||||
use base::id::{BlobId, BlobIndex, PipelineNamespaceId};
|
||||
use dom_struct::dom_struct;
|
||||
use encoding_rs::UTF_8;
|
||||
use js::jsapi::JSObject;
|
||||
use js::rust::HandleObject;
|
||||
use msg::constellation_msg::{BlobId, BlobIndex, PipelineNamespaceId};
|
||||
use net_traits::filemanager_thread::RelativePos;
|
||||
use script_traits::serializable::BlobImpl;
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::sync::atomic::AtomicBool;
|
|||
use std::sync::Arc;
|
||||
use std::thread::{self, JoinHandle};
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
|
@ -15,7 +16,6 @@ use ipc_channel::router::ROUTER;
|
|||
use js::jsapi::{Heap, JSContext, JSObject, JS_AddInterruptCallback};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use net_traits::request::{
|
||||
CredentialsMode, Destination, ParserMetadata, Referrer, RequestBuilder, RequestMode,
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* 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 dom_struct::dom_struct;
|
||||
use js::jsapi::{Heap, JSObject};
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_traits::{ScriptMsg, StructuredSerializedData};
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use std::rc::Rc;
|
|||
use std::slice::from_ref;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use base::id::BrowsingContextId;
|
||||
use canvas_traits::webgl::{self, WebGLContextId, WebGLMsg};
|
||||
use content_security_policy::{self as csp, CspList};
|
||||
use cookie::Cookie;
|
||||
|
@ -33,7 +34,6 @@ use metrics::{
|
|||
ProgressiveWebMetric,
|
||||
};
|
||||
use mime::{self, Mime};
|
||||
use msg::constellation_msg::BrowsingContextId;
|
||||
use net_traits::pub_domains::is_pub_domain;
|
||||
use net_traits::request::RequestBuilder;
|
||||
use net_traits::response::HttpsState;
|
||||
|
|
|
@ -15,6 +15,7 @@ use std::{fmt, mem};
|
|||
use cssparser::match_ignore_ascii_case;
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::InputMethodType;
|
||||
use euclid::default::{Rect, Size2D};
|
||||
use html5ever::serialize::TraversalScope::{ChildrenOnly, IncludeNode};
|
||||
use html5ever::serialize::{SerializeOpts, TraversalScope};
|
||||
|
@ -25,7 +26,6 @@ use html5ever::{
|
|||
use js::jsapi::Heap;
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::HandleObject;
|
||||
use msg::constellation_msg::InputMethodType;
|
||||
use net_traits::request::CorsSettings;
|
||||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::ReflowGoal;
|
||||
|
|
|
@ -14,6 +14,10 @@ use std::thread::JoinHandle;
|
|||
use std::time::Instant;
|
||||
use std::{mem, ptr};
|
||||
|
||||
use base::id::{
|
||||
BlobId, BroadcastChannelRouterId, MessagePortId, MessagePortRouterId, PipelineId,
|
||||
ServiceWorkerId, ServiceWorkerRegistrationId,
|
||||
};
|
||||
use content_security_policy::CspList;
|
||||
use crossbeam_channel::Sender;
|
||||
use devtools_traits::{PageError, ScriptToDevtoolsControlMsg};
|
||||
|
@ -34,10 +38,6 @@ use js::rust::{
|
|||
MutableHandleValue, ParentRuntime, Runtime,
|
||||
};
|
||||
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
|
||||
use msg::constellation_msg::{
|
||||
BlobId, BroadcastChannelRouterId, MessagePortId, MessagePortRouterId, PipelineId,
|
||||
ServiceWorkerId, ServiceWorkerRegistrationId,
|
||||
};
|
||||
use net_traits::blob_url_store::{get_blob_origin, BlobBuf};
|
||||
use net_traits::filemanager_thread::{
|
||||
FileManagerResult, FileManagerThreadMsg, ReadFileProgress, RelativePos,
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
use std::cell::Cell;
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use base::id::HistoryStateId;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::Heap;
|
||||
use js::jsval::{JSVal, NullValue, UndefinedValue};
|
||||
use js::rust::HandleValue;
|
||||
use msg::constellation_msg::{HistoryStateId, TraversalDirection};
|
||||
use net_traits::{CoreResourceMsg, IpcSend};
|
||||
use profile_traits::ipc;
|
||||
use profile_traits::ipc::channel;
|
||||
use script_traits::{ScriptMsg, StructuredSerializedData};
|
||||
use script_traits::{ScriptMsg, StructuredSerializedData, TraversalDirection};
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods;
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
use std::cell::Cell;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use bitflags::bitflags;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use profile_traits::ipc as ProfiledIpc;
|
||||
use script_layout_interface::ReflowGoal;
|
||||
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
|
|
|
@ -9,6 +9,7 @@ use std::sync::{Arc, Mutex};
|
|||
use std::{char, i32, mem};
|
||||
|
||||
use app_units::{Au, AU_PER_PX};
|
||||
use base::id::PipelineId;
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Point2D;
|
||||
|
@ -19,7 +20,6 @@ use ipc_channel::router::ROUTER;
|
|||
use js::jsapi::JSAutoRealm;
|
||||
use js::rust::HandleObject;
|
||||
use mime::{self, Mime};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache::{
|
||||
CorsStatus, ImageCache, ImageCacheResult, ImageOrMetadataAvailable, ImageResponse,
|
||||
|
|
|
@ -11,7 +11,7 @@ use std::{f64, ptr};
|
|||
use chrono::naive::{NaiveDate, NaiveDateTime};
|
||||
use chrono::{DateTime, Datelike, Weekday};
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::FilterPattern;
|
||||
use embedder_traits::{FilterPattern, InputMethodType};
|
||||
use encoding_rs::Encoding;
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::jsapi::{
|
||||
|
@ -21,7 +21,6 @@ use js::jsapi::{
|
|||
use js::jsval::UndefinedValue;
|
||||
use js::rust::jsapi_wrapped::{ExecuteRegExpNoStatics, ObjectIsRegExp};
|
||||
use js::rust::{HandleObject, MutableHandleObject};
|
||||
use msg::constellation_msg::InputMethodType;
|
||||
use net_traits::blob_url_store::get_blob_origin;
|
||||
use net_traits::filemanager_thread::FileManagerThreadMsg;
|
||||
use net_traits::{CoreResourceMsg, IpcSend};
|
||||
|
|
|
@ -12,6 +12,7 @@ use std::ptr;
|
|||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use base::id::PipelineId;
|
||||
use content_security_policy as csp;
|
||||
use dom_struct::dom_struct;
|
||||
use encoding_rs::Encoding;
|
||||
|
@ -24,7 +25,6 @@ use js::rust::{
|
|||
transform_str_to_source_text, CompileOptionsWrapper, FinishOffThreadStencil, HandleObject,
|
||||
Stencil,
|
||||
};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::{
|
||||
CorsSettings, CredentialsMode, Destination, ParserMetadata, RequestBuilder,
|
||||
};
|
||||
|
|
|
@ -8,10 +8,10 @@ use std::convert::TryInto;
|
|||
use std::num::NonZeroU32;
|
||||
use std::rc::Rc;
|
||||
|
||||
use base::id::{MessagePortId, MessagePortIndex, PipelineNamespaceId};
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::{Heap, JSObject, MutableHandleObject};
|
||||
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
|
||||
use msg::constellation_msg::{MessagePortId, MessagePortIndex, PipelineNamespaceId};
|
||||
use script_traits::PortMessageTask;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
|
|
|
@ -13,6 +13,7 @@ use std::sync::Arc as StdArc;
|
|||
use std::{cmp, iter};
|
||||
|
||||
use app_units::Au;
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use bitflags::bitflags;
|
||||
use devtools_traits::NodeInfo;
|
||||
use dom_struct::dom_struct;
|
||||
|
@ -22,7 +23,6 @@ use js::jsapi::JSObject;
|
|||
use js::rust::HandleObject;
|
||||
use libc::{self, c_void, uintptr_t};
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use script_layout_interface::{
|
||||
GenericLayoutData, HTMLCanvasData, HTMLMediaData, LayoutElementType, LayoutNodeType, QueryMsg,
|
||||
|
|
|
@ -7,9 +7,9 @@ use std::rc::Rc;
|
|||
use std::sync::{mpsc, Arc, Mutex};
|
||||
use std::thread::Builder;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use dom_struct::dom_struct;
|
||||
use js::rust::HandleObject;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_media::audio::context::OfflineAudioContextOptions as ServoMediaOfflineAudioContextOptions;
|
||||
|
||||
use crate::dom::audiobuffer::{AudioBuffer, MAX_SAMPLE_RATE, MIN_SAMPLE_RATE};
|
||||
|
|
|
@ -10,6 +10,7 @@ use std::sync::{Arc, Mutex};
|
|||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use crossbeam_channel::{unbounded, Sender};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Scale, Size2D};
|
||||
|
@ -20,7 +21,6 @@ use js::jsapi::{
|
|||
use js::jsval::{JSVal, ObjectValue, UndefinedValue};
|
||||
use js::rust::wrappers::{Call, Construct1};
|
||||
use js::rust::{HandleValue, Runtime};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use pixels::PixelFormat;
|
||||
use profile_traits::ipc;
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
use std::cell::Cell;
|
||||
|
||||
use base::id::ServiceWorkerId;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::{Heap, JSObject};
|
||||
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
|
||||
use msg::constellation_msg::ServiceWorkerId;
|
||||
use script_traits::{DOMMessage, ScriptMsg};
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::sync::Arc;
|
|||
use std::thread::{self, JoinHandle};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use base::id::PipelineId;
|
||||
use crossbeam_channel::{after, unbounded, Receiver, Sender};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
|
@ -14,7 +15,6 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
|||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::{JSContext, JS_AddInterruptCallback};
|
||||
use js::jsval::UndefinedValue;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::{CredentialsMode, Destination, ParserMetadata, Referrer, RequestBuilder};
|
||||
use net_traits::{CustomResponseMediator, IpcSend};
|
||||
use parking_lot::Mutex;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
use std::cell::Cell;
|
||||
|
||||
use base::id::ServiceWorkerRegistrationId;
|
||||
use devtools_traits::WorkerId;
|
||||
use dom_struct::dom_struct;
|
||||
use msg::constellation_msg::ServiceWorkerRegistrationId;
|
||||
use script_traits::{ScopeThings, WorkerScriptLoadOrigin};
|
||||
use servo_url::ServoUrl;
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -6,6 +6,7 @@ use std::borrow::Cow;
|
|||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use base64::engine::general_purpose;
|
||||
use base64::Engine as _;
|
||||
use content_security_policy::{self as csp, CspList};
|
||||
|
@ -20,7 +21,6 @@ use html5ever::tree_builder::{ElementFlags, NextParserState, NodeOrText, QuirksM
|
|||
use html5ever::{local_name, namespace_url, ns, Attribute, ExpandedName, LocalName, QualName};
|
||||
use hyper_serde::Serde;
|
||||
use mime::{self, Mime};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::{
|
||||
FetchMetadata, FetchResponseListener, Metadata, NetworkError, ResourceFetchTiming,
|
||||
ResourceTimingType,
|
||||
|
|
|
@ -2,6 +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 base::id::PipelineId;
|
||||
use html5ever::buffer_queue::BufferQueue;
|
||||
use html5ever::tokenizer::states::RawKind;
|
||||
use html5ever::tokenizer::{
|
||||
|
@ -9,7 +10,6 @@ use html5ever::tokenizer::{
|
|||
};
|
||||
use html5ever::{local_name, Attribute, LocalName};
|
||||
use js::jsapi::JSTracer;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::{CorsSettings, CredentialsMode, ParserMetadata, Referrer};
|
||||
use net_traits::{CoreResourceMsg, FetchChannels, IpcSend, ReferrerPolicy, ResourceThreads};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use crossbeam_channel::Sender;
|
||||
use dom_struct::dom_struct;
|
||||
use js::rust::Runtime;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
|
|
|
@ -16,6 +16,7 @@ use std::{cmp, env, mem};
|
|||
|
||||
use app_units::Au;
|
||||
use backtrace::Backtrace;
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use base64::Engine;
|
||||
use bluetooth_traits::BluetoothRequest;
|
||||
use canvas_traits::webgl::WebGLChan;
|
||||
|
@ -26,7 +27,6 @@ use dom_struct::dom_struct;
|
|||
use embedder_traits::{EmbedderMsg, PromptDefinition, PromptOrigin, PromptResult};
|
||||
use euclid::default::{Point2D as UntypedPoint2D, Rect as UntypedRect};
|
||||
use euclid::{Point2D, Rect, Scale, Size2D, Vector2D};
|
||||
use gfx_traits::combine_id_with_fragment_type;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::conversions::ToJSValConvertible;
|
||||
|
@ -38,7 +38,6 @@ use js::rust::{
|
|||
};
|
||||
use malloc_size_of::MallocSizeOf;
|
||||
use media::WindowGLContext;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image_cache::{
|
||||
ImageCache, ImageResponder, ImageResponse, PendingImageId, PendingImageResponse,
|
||||
};
|
||||
|
@ -50,7 +49,8 @@ use profile_traits::ipc as ProfiledIpc;
|
|||
use profile_traits::mem::ProfilerChan as MemProfilerChan;
|
||||
use profile_traits::time::ProfilerChan as TimeProfilerChan;
|
||||
use script_layout_interface::{
|
||||
Layout, PendingImageState, QueryMsg, Reflow, ReflowGoal, ScriptReflow, TrustedNodeAddress,
|
||||
combine_id_with_fragment_type, FragmentType, Layout, PendingImageState, QueryMsg, Reflow,
|
||||
ReflowGoal, ScriptReflow, TrustedNodeAddress,
|
||||
};
|
||||
use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
||||
use script_traits::{
|
||||
|
@ -2110,10 +2110,7 @@ impl Window {
|
|||
.borrow_mut()
|
||||
.insert(node.to_opaque(), Vector2D::new(x_ as f32, y_ as f32));
|
||||
let scroll_id = ExternalScrollId(
|
||||
combine_id_with_fragment_type(
|
||||
node.to_opaque().id(),
|
||||
gfx_traits::FragmentType::FragmentBody,
|
||||
),
|
||||
combine_id_with_fragment_type(node.to_opaque().id(), FragmentType::FragmentBody),
|
||||
self.pipeline_id().into(),
|
||||
);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use std::cell::Cell;
|
||||
use std::ptr;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use html5ever::local_name;
|
||||
|
@ -27,7 +28,6 @@ use js::jsval::{JSVal, NullValue, PrivateValue, UndefinedValue};
|
|||
use js::rust::wrappers::{JS_TransplantObject, NewWindowProxy, SetWindowProxy};
|
||||
use js::rust::{get_object_class, Handle, MutableHandle};
|
||||
use js::JSCLASS_IS_GLOBAL;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use net_traits::request::Referrer;
|
||||
use script_traits::{
|
||||
AuxiliaryBrowsingContextLoadInfo, HistoryEntryReplacement, LoadData, LoadOrigin, NewLayoutInfo,
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::rc::Rc;
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
use base::id::{PipelineId, PipelineNamespace};
|
||||
use crossbeam_channel::Receiver;
|
||||
use devtools_traits::{DevtoolScriptControlMsg, WorkerId};
|
||||
use dom_struct::dom_struct;
|
||||
|
@ -14,7 +15,6 @@ use ipc_channel::ipc::IpcSender;
|
|||
use js::jsval::UndefinedValue;
|
||||
use js::panic::maybe_resume_unwind;
|
||||
use js::rust::{HandleValue, ParentRuntime};
|
||||
use msg::constellation_msg::{PipelineId, PipelineNamespace};
|
||||
use net_traits::request::{
|
||||
CredentialsMode, Destination, ParserMetadata, RequestBuilder as NetRequestInit,
|
||||
};
|
||||
|
|
|
@ -18,11 +18,11 @@ use std::sync::atomic::{AtomicIsize, Ordering};
|
|||
use std::sync::Arc;
|
||||
use std::thread;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::{GCReason, JSGCParamKey, JSTracer, JS_GetGCParameter, JS_GC};
|
||||
use malloc_size_of::malloc_size_of_is_0;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::{Destination, RequestBuilder, RequestMode};
|
||||
use net_traits::IpcSend;
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
use std::borrow::Cow;
|
||||
use std::sync::Arc;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use crossbeam_channel::Sender;
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::Runtime;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use net_traits::ResourceThreads;
|
||||
use parking_lot::Mutex;
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::{self as ipc_crate, IpcReceiver};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use profile_traits::ipc;
|
||||
use servo_config::pref;
|
||||
use webxr_api::{Error as XRError, Frame, Session, SessionInit, SessionMode};
|
||||
|
|
|
@ -8,9 +8,9 @@ use std::borrow::Cow;
|
|||
use std::fmt;
|
||||
use std::sync::Arc as StdArc;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use gfx_traits::ByteIndex;
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use range::Range;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
|
|
|
@ -10,8 +10,8 @@ use std::cell::Cell;
|
|||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use js::jsapi::{JSAutoRealm, JobQueueIsEmpty, JobQueueMayNotBeEmpty};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::dom::bindings::callback::ExceptionHandling;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
|
|
|
@ -18,6 +18,7 @@ use std::sync::{Arc, Mutex};
|
|||
use std::time::{Duration, Instant};
|
||||
use std::{fmt, os, ptr, thread};
|
||||
|
||||
use base::id::PipelineId;
|
||||
use js::glue::{
|
||||
CollectServoSizes, CreateJobQueue, DeleteJobQueue, DispatchableRun, JobQueueTraps,
|
||||
RUST_js_GetErrorMessage, SetBuildId, StreamConsumerConsumeChunk,
|
||||
|
@ -45,7 +46,6 @@ use js::rust::{
|
|||
};
|
||||
use lazy_static::lazy_static;
|
||||
use malloc_size_of::MallocSizeOfOps;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use profile_traits::mem::{Report, ReportKind, ReportsChan};
|
||||
use profile_traits::path;
|
||||
use servo_config::{opts, pref};
|
||||
|
|
|
@ -29,6 +29,13 @@ use std::sync::Arc;
|
|||
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
|
||||
use std::{ptr, thread};
|
||||
|
||||
use background_hang_monitor_api::{
|
||||
BackgroundHangMonitor, BackgroundHangMonitorExitSignal, HangAnnotation, MonitoredComponentId,
|
||||
MonitoredComponentType, ScriptHangAnnotation,
|
||||
};
|
||||
use base::id::{
|
||||
BrowsingContextId, HistoryStateId, PipelineId, PipelineNamespace, TopLevelBrowsingContextId,
|
||||
};
|
||||
use bluetooth_traits::BluetoothRequest;
|
||||
use canvas_traits::webgl::WebGLPipeline;
|
||||
use chrono::{DateTime, Local};
|
||||
|
@ -55,11 +62,6 @@ use js::rust::ParentRuntime;
|
|||
use media::WindowGLContext;
|
||||
use metrics::{PaintTimeMetrics, MAX_TASK_NS};
|
||||
use mime::{self, Mime};
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitor, BackgroundHangMonitorExitSignal, BrowsingContextId, HangAnnotation,
|
||||
HistoryStateId, MonitoredComponentId, MonitoredComponentType, PipelineId, PipelineNamespace,
|
||||
ScriptHangAnnotation, TopLevelBrowsingContextId,
|
||||
};
|
||||
use net_traits::image_cache::{ImageCache, PendingImageResponse};
|
||||
use net_traits::request::{CredentialsMode, Destination, RedirectMode, RequestBuilder};
|
||||
use net_traits::storage_thread::StorageType;
|
||||
|
|
|
@ -12,10 +12,10 @@ use std::sync::atomic::{AtomicBool, Ordering};
|
|||
use std::sync::Arc;
|
||||
use std::thread::{self, JoinHandle};
|
||||
|
||||
use base::id::{PipelineNamespace, ServiceWorkerId, ServiceWorkerRegistrationId};
|
||||
use crossbeam_channel::{select, unbounded, Receiver, RecvError, Sender};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use msg::constellation_msg::{PipelineNamespace, ServiceWorkerId, ServiceWorkerRegistrationId};
|
||||
use net_traits::{CoreResourceMsg, CustomResponseMediator};
|
||||
use script_traits::{
|
||||
DOMMessage, Job, JobError, JobResult, JobResultValue, JobType, SWManagerMsg, SWManagerSenders,
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Mutex;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use cssparser::SourceLocation;
|
||||
use encoding_rs::UTF_8;
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use mime::{self, Mime};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::{CorsSettings, Destination, Referrer, RequestBuilder};
|
||||
use net_traits::{
|
||||
FetchMetadata, FetchResponseListener, FilteredMetadata, Metadata, NetworkError, ReferrerPolicy,
|
||||
|
|
|
@ -8,8 +8,8 @@ use std::cell::Cell;
|
|||
use std::collections::{HashMap, HashSet, VecDeque};
|
||||
use std::default::Default;
|
||||
|
||||
use base::id::PipelineId;
|
||||
use crossbeam_channel::{self, Receiver, Sender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::worker::TrustedWorkerAddress;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -6,6 +6,7 @@ use std::cmp;
|
|||
use std::collections::HashMap;
|
||||
use std::ffi::CString;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use cookie::Cookie;
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use hyper_serde::Serde;
|
||||
|
@ -14,7 +15,6 @@ use js::jsapi::{HandleValueArray, JSAutoRealm, JSContext, JSType, JS_IsException
|
|||
use js::jsval::UndefinedValue;
|
||||
use js::rust::wrappers::{JS_CallFunctionName, JS_GetProperty, JS_HasOwnProperty, JS_TypeOfValue};
|
||||
use js::rust::{HandleObject, HandleValue};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::CookieSource::{NonHTTP, HTTP};
|
||||
use net_traits::CoreResourceMsg::{DeleteCookies, GetCookiesDataForUrl, SetCookieForUrl};
|
||||
use net_traits::IpcSend;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue