Move ScriptToConstellationMsg to constellation_traits (#36364)

This is the last big change necessary to create the
`constellation_traits` crate. This moves the data structure for messages
that originate from the `ScriptThread` and are sent to the
`Contellation` to `constellation_traits`, effectively splitting
`script_traits` in half. Before, `script_traits` was responsible for
exposing the API of both the `ScriptThread` and the `Constellation` to
the rest of Servo.

- Data structures that are used by `ScriptToConstellationMsg` are moved
  to `constellation_traits`. The dependency graph looks a bit like this:
  `script_layout_interface` depends on `script_traits` depends on
  `constellation_traits` depends on `embedder_traits`.
- Data structures that are used in the embedding layer
  (`UntrustedNodeAddress`, `CompositorHitTestResult`, `TouchEventResult`
  and `AnimationState`) are moved to embedder_traits, to avoid a
  dependency cycle between `webrender_traits` and
  `constellation_traits`.
- Types dealing with MessagePorts and serialization are moved to
  `constellation_traits::message_port`.

Testing: This is covered by existing tests as it just moves types
around.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-04-06 00:13:29 +02:00 committed by GitHub
parent a67409fb25
commit 6031a12fd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 1224 additions and 1222 deletions

View file

@ -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 script_traits::StructuredSerializedData;
use constellation_traits::StructuredSerializedData;
use servo_url::ImmutableOrigin;
use crate::dom::bindings::refcounted::Trusted;

View file

@ -10,6 +10,10 @@ use std::os::raw;
use std::ptr;
use base::id::{BlobId, DomPointId, MessagePortId, PipelineNamespaceId};
use constellation_traits::{
BlobImpl, DomPoint, MessagePortImpl, Serializable as SerializableInterface,
StructuredSerializedData, Transferrable as TransferrableInterface,
};
use js::glue::{
CopyJSStructuredCloneData, DeleteJSAutoStructuredCloneBuffer, GetLengthOfJSStructuredCloneData,
NewJSAutoStructuredCloneBuffer, WriteBytesToJSStructuredCloneData,
@ -24,12 +28,6 @@ use js::jsval::UndefinedValue;
use js::rust::wrappers::{JS_ReadStructuredClone, JS_WriteStructuredClone};
use js::rust::{CustomAutoRooterGuard, HandleValue, MutableHandleValue};
use script_bindings::conversions::IDLInterface;
use script_traits::serializable::{BlobImpl, DomPoint};
use script_traits::transferable::MessagePortImpl;
use script_traits::{
Serializable as SerializableInterface, StructuredSerializedData,
Transferrable as TransferrableInterface,
};
use strum::IntoEnumIterator;
use crate::dom::bindings::conversions::{ToJSValConvertible, root_from_object};

View file

@ -8,13 +8,13 @@ use std::ptr;
use std::rc::Rc;
use base::id::{BlobId, BlobIndex, PipelineNamespaceId};
use constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use encoding_rs::UTF_8;
use js::jsapi::JSObject;
use js::rust::HandleObject;
use js::typedarray::Uint8;
use net_traits::filemanager_thread::RelativePos;
use script_traits::serializable::BlobImpl;
use uuid::Uuid;
use crate::body::{FetchedData, run_array_buffer_data_algorithm};

View file

@ -4,9 +4,9 @@
use std::cell::Cell;
use constellation_traits::BroadcastMsg;
use dom_struct::dom_struct;
use js::rust::{HandleObject, HandleValue};
use script_traits::BroadcastMsg;
use uuid::Uuid;
use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::BroadcastChannelMethods;

View file

@ -7,6 +7,7 @@ use std::sync::atomic::AtomicBool;
use std::thread::{self, JoinHandle};
use base::id::{BrowsingContextId, PipelineId, WebViewId};
use constellation_traits::{WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
use crossbeam_channel::{Receiver, Sender, unbounded};
use devtools_traits::DevtoolScriptControlMsg;
use dom_struct::dom_struct;
@ -21,7 +22,6 @@ use net_traits::request::{
CredentialsMode, Destination, InsecureRequestsPolicy, ParserMetadata, Referrer, RequestBuilder,
RequestMode,
};
use script_traits::{WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
use servo_rand::random;
use servo_url::{ImmutableOrigin, ServoUrl};
use style::thread_state::{self, ThreadState};

View file

@ -3,11 +3,11 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use base::id::PipelineId;
use constellation_traits::{ScriptToConstellationMessage, StructuredSerializedData};
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSObject};
use js::jsval::UndefinedValue;
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue, MutableHandleValue};
use script_traits::{ScriptToConstellationMessage, StructuredSerializedData};
use servo_url::ServoUrl;
use crate::dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding;

View file

@ -20,16 +20,16 @@ use base::id::WebViewId;
use canvas_traits::canvas::CanvasId;
use canvas_traits::webgl::{self, WebGLContextId, WebGLMsg};
use chrono::Local;
use constellation_traits::{AnimationTickType, CompositorHitTestResult};
use constellation_traits::{AnimationTickType, ScriptToConstellationMessage};
use content_security_policy::{self as csp, CspList, PolicyDisposition};
use cookie::Cookie;
use cssparser::match_ignore_ascii_case;
use devtools_traits::ScriptToDevtoolsControlMsg;
use dom_struct::dom_struct;
use embedder_traits::{
AllowOrDeny, ContextMenuResult, EditingActionEvent, EmbedderMsg, ImeEvent, InputEvent,
LoadStatus, MouseButton, MouseButtonAction, MouseButtonEvent, TouchEvent, TouchEventType,
TouchId, WheelEvent,
AllowOrDeny, AnimationState, CompositorHitTestResult, ContextMenuResult, EditingActionEvent,
EmbedderMsg, ImeEvent, InputEvent, LoadStatus, MouseButton, MouseButtonAction,
MouseButtonEvent, TouchEvent, TouchEventType, TouchId, WheelEvent,
};
use encoding_rs::{Encoding, UTF_8};
use euclid::default::{Point2D, Rect, Size2D};
@ -53,10 +53,7 @@ use profile_traits::ipc as profile_ipc;
use profile_traits::time::TimerMetadataFrameType;
use script_bindings::interfaces::DocumentHelpers;
use script_layout_interface::{PendingRestyle, TrustedNodeAddress};
use script_traits::{
AnimationState, ConstellationInputEvent, DocumentActivity, ProgressiveWebMetricType,
ScriptToConstellationMessage,
};
use script_traits::{ConstellationInputEvent, DocumentActivity, ProgressiveWebMetricType};
use servo_arc::Arc;
use servo_config::pref;
use servo_media::{ClientContextId, ServoMedia};

View file

@ -4,7 +4,7 @@
use std::fmt;
use constellation_traits::UntrustedNodeAddress;
use embedder_traits::UntrustedNodeAddress;
use euclid::default::Point2D;
use script_layout_interface::{NodesFromPointQueryType, QueryMsg};
use servo_arc::Arc;

View file

@ -5,9 +5,9 @@
use std::collections::HashMap;
use base::id::DomPointId;
use constellation_traits::DomPoint;
use dom_struct::dom_struct;
use js::rust::HandleObject;
use script_traits::serializable::DomPoint;
use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods};
use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods;

View file

@ -7,9 +7,9 @@ use std::collections::HashMap;
use std::num::NonZeroU32;
use base::id::{DomPointId, DomPointIndex, PipelineNamespaceId};
use constellation_traits::DomPoint;
use dom_struct::dom_struct;
use js::rust::HandleObject;
use script_traits::serializable::DomPoint;
use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit;
use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods;

View file

@ -4,10 +4,10 @@
use std::time::SystemTime;
use constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use js::rust::HandleObject;
use net_traits::filemanager_thread::SelectedFile;
use script_traits::serializable::BlobImpl;
use time::{Duration, OffsetDateTime};
use crate::dom::bindings::codegen::Bindings::FileBinding;

View file

@ -2,10 +2,10 @@
* 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 constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use html5ever::LocalName;
use js::rust::HandleObject;
use script_traits::serializable::BlobImpl;
use super::bindings::trace::NoTrace;
use crate::dom::bindings::cell::DomRefCell;

View file

@ -17,6 +17,10 @@ use base::id::{
BlobId, BroadcastChannelRouterId, MessagePortId, MessagePortRouterId, PipelineId,
ServiceWorkerId, ServiceWorkerRegistrationId, WebViewId,
};
use constellation_traits::{
BlobData, BlobImpl, BroadcastMsg, FileBlob, MessagePortImpl, MessagePortMsg, PortMessageTask,
ScriptToConstellationChan, ScriptToConstellationMessage,
};
use content_security_policy::{CheckResult, CspList, PolicyDisposition};
use crossbeam_channel::Sender;
use devtools_traits::{PageError, ScriptToDevtoolsControlMsg};
@ -55,12 +59,6 @@ use net_traits::{
};
use profile_traits::{ipc as profile_ipc, mem as profile_mem, time as profile_time};
use script_bindings::interfaces::GlobalScopeHelpers;
use script_traits::serializable::{BlobData, BlobImpl, FileBlob};
use script_traits::transferable::MessagePortImpl;
use script_traits::{
BroadcastMsg, MessagePortMsg, PortMessageTask, ScriptToConstellationChan,
ScriptToConstellationMessage,
};
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
use timers::{TimerEventId, TimerEventRequest, TimerSource};
use uuid::Uuid;

View file

@ -6,7 +6,9 @@ use std::cell::Cell;
use std::cmp::Ordering;
use base::id::HistoryStateId;
use constellation_traits::TraversalDirection;
use constellation_traits::{
ScriptToConstellationMessage, StructuredSerializedData, TraversalDirection,
};
use dom_struct::dom_struct;
use js::jsapi::Heap;
use js::jsval::{JSVal, NullValue, UndefinedValue};
@ -14,7 +16,6 @@ use js::rust::{HandleValue, MutableHandleValue};
use net_traits::{CoreResourceMsg, IpcSend};
use profile_traits::ipc;
use profile_traits::ipc::channel;
use script_traits::{ScriptToConstellationMessage, StructuredSerializedData};
use servo_url::ServoUrl;
use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods;

View file

@ -7,6 +7,9 @@ use std::collections::HashMap;
use std::rc::Rc;
use canvas_traits::webgl::{GLContextAttributes, WebGLVersion};
use constellation_traits::BlobImpl;
#[cfg(feature = "webgpu")]
use constellation_traits::ScriptToConstellationMessage;
use dom_struct::dom_struct;
use euclid::default::Size2D;
use html5ever::{LocalName, Prefix, local_name, namespace_url, ns};
@ -20,9 +23,6 @@ use ipc_channel::ipc::{self as ipcchan};
use js::error::throw_type_error;
use js::rust::{HandleObject, HandleValue};
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource};
#[cfg(feature = "webgpu")]
use script_traits::ScriptToConstellationMessage;
use script_traits::serializable::BlobImpl;
use servo_media::streams::MediaStreamType;
use servo_media::streams::registry::MediaStreamId;
use style::attr::AttrValue;

View file

@ -5,6 +5,7 @@
use std::borrow::ToOwned;
use std::cell::Cell;
use constellation_traits::{LoadData, LoadOrigin, NavigationHistoryBehavior};
use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8};
use headers::{ContentType, HeaderMapExt};
@ -14,7 +15,6 @@ use js::rust::HandleObject;
use mime::{self, Mime};
use net_traits::http_percent_encode;
use net_traits::request::Referrer;
use script_traits::{LoadData, LoadOrigin, NavigationHistoryBehavior};
use servo_rand::random;
use style::attr::AttrValue;
use style::str::split_html_space_chars;

View file

@ -6,17 +6,18 @@ use std::cell::Cell;
use base::id::{BrowsingContextId, PipelineId, WebViewId};
use bitflags::bitflags;
use constellation_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
use constellation_traits::{
IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, LoadOrigin,
NavigationHistoryBehavior, ScriptToConstellationMessage,
};
use dom_struct::dom_struct;
use embedder_traits::ViewportDetails;
use html5ever::{LocalName, Prefix, local_name, namespace_url, ns};
use js::rust::HandleObject;
use net_traits::ReferrerPolicy;
use profile_traits::ipc as ProfiledIpc;
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
use script_traits::{
IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, LoadOrigin,
NavigationHistoryBehavior, NewLayoutInfo, ScriptToConstellationMessage, UpdatePipelineIdReason,
};
use script_traits::{NewLayoutInfo, UpdatePipelineIdReason};
use servo_url::ServoUrl;
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use stylo_atoms::Atom;

View file

@ -6,11 +6,11 @@ use std::str::FromStr;
use std::sync::LazyLock;
use std::time::Duration;
use constellation_traits::NavigationHistoryBehavior;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use js::rust::HandleObject;
use regex::bytes::Regex;
use script_traits::NavigationHistoryBehavior;
use servo_url::ServoUrl;
use style::str::HTML_SPACE_CHARACTERS;

View file

@ -2,9 +2,9 @@
* 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 constellation_traits::{LoadData, LoadOrigin, NavigationHistoryBehavior};
use dom_struct::dom_struct;
use net_traits::request::Referrer;
use script_traits::{LoadData, LoadOrigin, NavigationHistoryBehavior};
use servo_url::{MutableOrigin, ServoUrl};
use crate::dom::bindings::codegen::Bindings::LocationBinding::LocationMethods;

View file

@ -4,11 +4,11 @@
use std::rc::Rc;
use constellation_traits::ScriptToConstellationMessage;
use dom_struct::dom_struct;
use embedder_traits::{
MediaMetadata as EmbedderMediaMetadata, MediaSessionActionType, MediaSessionEvent,
};
use script_traits::ScriptToConstellationMessage;
use super::bindings::trace::HashMapTracedValues;
use crate::conversions::Convert;

View file

@ -8,11 +8,10 @@ use std::num::NonZeroU32;
use std::rc::Rc;
use base::id::{MessagePortId, MessagePortIndex, PipelineNamespaceId};
use constellation_traits::{MessagePortImpl, PortMessageTask};
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSObject};
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
use script_traits::PortMessageTask;
use script_traits::transferable::MessagePortImpl;
use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use crate::dom::bindings::codegen::Bindings::MessagePortBinding::{

View file

@ -5,8 +5,8 @@
use std::cell::Cell;
use std::default::Default;
use constellation_traits::CompositorHitTestResult;
use dom_struct::dom_struct;
use embedder_traits::CompositorHitTestResult;
use euclid::default::Point2D;
use js::rust::HandleObject;
use servo_config::pref;

View file

@ -16,9 +16,9 @@ use std::{cmp, fmt, iter};
use app_units::Au;
use base::id::{BrowsingContextId, PipelineId};
use bitflags::bitflags;
use constellation_traits::UntrustedNodeAddress;
use devtools_traits::NodeInfo;
use dom_struct::dom_struct;
use embedder_traits::UntrustedNodeAddress;
use euclid::default::{Rect, Size2D, Vector2D};
use html5ever::serialize::HtmlSerializer;
use html5ever::{Namespace, Prefix, QualName, namespace_url, ns, serialize as html_serialize};

View file

@ -5,13 +5,13 @@
use std::cell::Cell;
use std::ptr;
use constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use js::conversions::ToJSValConvertible;
use js::jsapi::{JSAutoRealm, JSObject};
use js::jsval::UndefinedValue;
use js::rust::CustomAutoRooterGuard;
use js::typedarray::{ArrayBuffer, ArrayBufferView, CreateWith};
use script_traits::serializable::BlobImpl;
use servo_media::webrtc::{
DataChannelId, DataChannelInit, DataChannelMessage, DataChannelState, WebRtcError,
};

View file

@ -5,10 +5,10 @@
use std::cell::Cell;
use base::id::ServiceWorkerId;
use constellation_traits::{DOMMessage, ScriptToConstellationMessage};
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSObject};
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
use script_traits::{DOMMessage, ScriptToConstellationMessage};
use servo_url::ServoUrl;
use crate::dom::abstractworker::SimpleWorkerErrorHandler;

View file

@ -5,12 +5,12 @@
use std::default::Default;
use std::rc::Rc;
use constellation_traits::{
Job, JobError, JobResult, JobResultValue, JobType, ScriptToConstellationMessage,
};
use dom_struct::dom_struct;
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
use script_traits::{
Job, JobError, JobResult, JobResultValue, JobType, ScriptToConstellationMessage,
};
use crate::dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::{
RegistrationOptions, ServiceWorkerContainerMethods,

View file

@ -8,6 +8,9 @@ use std::thread::{self, JoinHandle};
use std::time::{Duration, Instant};
use base::id::PipelineId;
use constellation_traits::{
ScopeThings, ServiceWorkerMsg, WorkerGlobalScopeInit, WorkerScriptLoadOrigin,
};
use crossbeam_channel::{Receiver, Sender, after, unbounded};
use devtools_traits::DevtoolScriptControlMsg;
use dom_struct::dom_struct;
@ -19,7 +22,6 @@ use net_traits::request::{
CredentialsMode, Destination, InsecureRequestsPolicy, ParserMetadata, Referrer, RequestBuilder,
};
use net_traits::{CustomResponseMediator, IpcSend};
use script_traits::{ScopeThings, ServiceWorkerMsg, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
use servo_config::pref;
use servo_rand::random;
use servo_url::ServoUrl;

View file

@ -5,10 +5,10 @@
use std::cell::Cell;
use base::id::ServiceWorkerRegistrationId;
use constellation_traits::{ScopeThings, WorkerScriptLoadOrigin};
use devtools_traits::WorkerId;
use dom_struct::dom_struct;
use net_traits::request::Referrer;
use script_traits::{ScopeThings, WorkerScriptLoadOrigin};
use servo_url::ServoUrl;
use uuid::Uuid;

View file

@ -4,12 +4,12 @@
use std::rc::Rc;
use constellation_traits::ScriptToConstellationMessage;
use dom_struct::dom_struct;
use js::rust::HandleObject;
use profile_traits::mem::MemoryReportResult;
use script_bindings::interfaces::ServoInternalsHelpers;
use script_bindings::script_runtime::JSContext;
use script_traits::ScriptToConstellationMessage;
use crate::dom::bindings::codegen::Bindings::ServoInternalsBinding::ServoInternalsMethods;
use crate::dom::bindings::error::Error;

View file

@ -2,12 +2,12 @@
* 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 constellation_traits::ScriptToConstellationMessage;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use net_traits::IpcSend;
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use profile_traits::ipc;
use script_traits::ScriptToConstellationMessage;
use servo_url::ServoUrl;
use crate::dom::bindings::codegen::Bindings::StorageBinding::StorageMethods;

View file

@ -9,6 +9,7 @@ use std::ptr::{self, NonNull};
use std::rc::Rc;
use std::time::Duration;
use constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JS_NewPlainObject, JSObject};
use js::jsval::JSVal;
@ -16,7 +17,6 @@ use js::rust::{CustomAutoRooterGuard, HandleObject, HandleValue, MutableHandleVa
use js::typedarray::{self, Uint8ClampedArray};
use script_bindings::interfaces::TestBindingHelpers;
use script_bindings::record::Record;
use script_traits::serializable::BlobImpl;
use servo_config::prefs;
use crate::dom::bindings::buffer_source::create_buffer_source;

View file

@ -4,9 +4,9 @@
use std::rc::Rc;
use constellation_traits::ScriptToConstellationMessage;
use dom_struct::dom_struct;
use js::jsapi::Heap;
use script_traits::ScriptToConstellationMessage;
use webgpu_traits::WebGPUAdapterResponse;
use wgpu_types::PowerPreference;

View file

@ -6,6 +6,7 @@ use std::borrow::ToOwned;
use std::cell::Cell;
use std::ptr;
use constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
@ -21,7 +22,6 @@ use net_traits::{
CoreResourceMsg, FetchChannels, MessageData, WebSocketDomAction, WebSocketNetworkEvent,
};
use profile_traits::ipc as ProfiledIpc;
use script_traits::serializable::BlobImpl;
use servo_url::{ImmutableOrigin, ServoUrl};
use crate::dom::bindings::cell::DomRefCell;

View file

@ -21,7 +21,10 @@ use base64::Engine;
#[cfg(feature = "bluetooth")]
use bluetooth_traits::BluetoothRequest;
use canvas_traits::webgl::WebGLChan;
use constellation_traits::{ScrollState, WindowSizeType};
use constellation_traits::{
DocumentState, LoadData, LoadOrigin, NavigationHistoryBehavior, ScriptToConstellationChan,
ScriptToConstellationMessage, ScrollState, StructuredSerializedData, WindowSizeType,
};
use crossbeam_channel::{Sender, unbounded};
use cssparser::{Parser, ParserInput, SourceLocation};
use devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
@ -62,10 +65,7 @@ use script_layout_interface::{
FragmentType, Layout, PendingImageState, QueryMsg, Reflow, ReflowGoal, ReflowRequest,
TrustedNodeAddress, combine_id_with_fragment_type,
};
use script_traits::{
DocumentState, LoadData, LoadOrigin, NavigationHistoryBehavior, ScriptThreadMessage,
ScriptToConstellationChan, ScriptToConstellationMessage, StructuredSerializedData,
};
use script_traits::ScriptThreadMessage;
use selectors::attr::CaseSensitivity;
use servo_arc::Arc as ServoArc;
use servo_config::{opts, pref};

View file

@ -6,6 +6,10 @@ use std::cell::Cell;
use std::ptr;
use base::id::{BrowsingContextId, PipelineId, WebViewId};
use constellation_traits::{
AuxiliaryWebViewCreationRequest, LoadData, LoadOrigin, NavigationHistoryBehavior,
ScriptToConstellationMessage,
};
use dom_struct::dom_struct;
use html5ever::local_name;
use indexmap::map::IndexMap;
@ -29,10 +33,7 @@ use js::rust::wrappers::{JS_TransplantObject, NewWindowProxy, SetWindowProxy};
use js::rust::{Handle, MutableHandle, MutableHandleValue, get_object_class};
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use net_traits::request::Referrer;
use script_traits::{
AuxiliaryWebViewCreationRequest, LoadData, LoadOrigin, NavigationHistoryBehavior,
NewLayoutInfo, ScriptToConstellationMessage,
};
use script_traits::NewLayoutInfo;
use serde::{Deserialize, Serialize};
use servo_url::{ImmutableOrigin, ServoUrl};
use style::attr::parse_integer;

View file

@ -6,6 +6,7 @@ use std::cell::Cell;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
use constellation_traits::{StructuredSerializedData, WorkerScriptLoadOrigin};
use crossbeam_channel::{Sender, unbounded};
use devtools_traits::{DevtoolsPageInfo, ScriptToDevtoolsControlMsg, WorkerId};
use dom_struct::dom_struct;
@ -14,7 +15,6 @@ use js::jsapi::{Heap, JSObject};
use js::jsval::UndefinedValue;
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleObject, HandleValue};
use net_traits::request::Referrer;
use script_traits::{StructuredSerializedData, WorkerScriptLoadOrigin};
use uuid::Uuid;
use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};

View file

@ -11,6 +11,7 @@ use std::time::Duration;
use base::cross_process_instant::CrossProcessInstant;
use base::id::{PipelineId, PipelineNamespace};
use constellation_traits::WorkerGlobalScopeInit;
use crossbeam_channel::Receiver;
use devtools_traits::{DevtoolScriptControlMsg, WorkerId};
use dom_struct::dom_struct;
@ -25,7 +26,6 @@ use net_traits::request::{
RequestBuilder as NetRequestInit,
};
use profile_traits::mem::ProcessReports;
use script_traits::WorkerGlobalScopeInit;
use servo_url::{MutableOrigin, ServoUrl};
use timers::TimerScheduler;
use uuid::Uuid;

View file

@ -5,6 +5,7 @@
use std::sync::Arc;
use base::id::PipelineId;
use constellation_traits::{ScriptToConstellationChan, ScriptToConstellationMessage};
use crossbeam_channel::Sender;
use devtools_traits::ScriptToDevtoolsControlMsg;
use dom_struct::dom_struct;
@ -14,7 +15,7 @@ use js::rust::Runtime;
use net_traits::ResourceThreads;
use net_traits::image_cache::ImageCache;
use profile_traits::{mem, time};
use script_traits::{Painter, ScriptToConstellationChan, ScriptToConstellationMessage};
use script_traits::Painter;
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
use stylo_atoms::Atom;

View file

@ -10,6 +10,7 @@ use std::str::{self, FromStr};
use std::sync::{Arc, Mutex};
use std::time::{Duration, Instant};
use constellation_traits::BlobImpl;
use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8};
use headers::{ContentLength, ContentType, HeaderMapExt};
@ -31,7 +32,6 @@ use net_traits::{
ResourceFetchTiming, ResourceTimingType, trim_http_whitespace,
};
use script_traits::DocumentActivity;
use script_traits::serializable::BlobImpl;
use servo_url::ServoUrl;
use stylo_atoms::Atom;
use url::Position;