diff options
Diffstat (limited to 'components/shared')
-rw-r--r-- | components/shared/compositing/constellation_msg.rs | 2 | ||||
-rw-r--r-- | components/shared/compositing/lib.rs | 2 | ||||
-rw-r--r-- | components/shared/embedder/webdriver.rs | 2 | ||||
-rw-r--r-- | components/shared/fonts/lib.rs | 2 | ||||
-rw-r--r-- | components/shared/net/image_cache.rs | 2 | ||||
-rw-r--r-- | components/shared/net/lib.rs | 6 | ||||
-rw-r--r-- | components/shared/net/request.rs | 2 | ||||
-rw-r--r-- | components/shared/net/response.rs | 2 | ||||
-rw-r--r-- | components/shared/script/lib.rs | 8 | ||||
-rw-r--r-- | components/shared/script/script_msg.rs | 8 | ||||
-rw-r--r-- | components/shared/script_layout/lib.rs | 10 | ||||
-rw-r--r-- | components/shared/script_layout/wrapper_traits.rs | 7 | ||||
-rw-r--r-- | components/shared/webrender/rendering_context.rs | 2 | ||||
-rw-r--r-- | components/shared/webxr/layer.rs | 2 | ||||
-rw-r--r-- | components/shared/webxr/lib.rs | 10 | ||||
-rw-r--r-- | components/shared/webxr/session.rs | 6 |
16 files changed, 36 insertions, 37 deletions
diff --git a/components/shared/compositing/constellation_msg.rs b/components/shared/compositing/constellation_msg.rs index dbf1f75b979..a07b943d7e6 100644 --- a/components/shared/compositing/constellation_msg.rs +++ b/components/shared/compositing/constellation_msg.rs @@ -6,8 +6,8 @@ use std::collections::HashMap; use std::fmt; use std::time::Duration; -use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId, WebViewId}; use base::Epoch; +use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId, WebViewId}; use embedder_traits::{ Cursor, InputEvent, MediaSessionActionType, Theme, TraversalDirection, WebDriverCommandMsg, }; diff --git a/components/shared/compositing/lib.rs b/components/shared/compositing/lib.rs index 38390ecef31..29700c0f1dc 100644 --- a/components/shared/compositing/lib.rs +++ b/components/shared/compositing/lib.rs @@ -8,8 +8,8 @@ mod constellation_msg; use std::fmt::{Debug, Error, Formatter}; -use base::id::{PipelineId, TopLevelBrowsingContextId}; use base::Epoch; +use base::id::{PipelineId, TopLevelBrowsingContextId}; pub use constellation_msg::ConstellationMsg; use crossbeam_channel::{Receiver, Sender}; use embedder_traits::{EventLoopWaker, MouseButton, MouseButtonAction}; diff --git a/components/shared/embedder/webdriver.rs b/components/shared/embedder/webdriver.rs index b312339c08a..1da996038a8 100644 --- a/components/shared/embedder/webdriver.rs +++ b/components/shared/embedder/webdriver.rs @@ -12,8 +12,8 @@ use euclid::default::Rect as UntypedRect; use euclid::{Rect, Size2D}; use hyper_serde::Serde; use ipc_channel::ipc::IpcSender; -use keyboard_types::webdriver::Event as WebDriverInputEvent; use keyboard_types::KeyboardEvent; +use keyboard_types::webdriver::Event as WebDriverInputEvent; use pixels::Image; use serde::{Deserialize, Serialize}; use servo_url::ServoUrl; diff --git a/components/shared/fonts/lib.rs b/components/shared/fonts/lib.rs index 9ba8d9425ee..fa55e40f655 100644 --- a/components/shared/fonts/lib.rs +++ b/components/shared/fonts/lib.rs @@ -7,7 +7,7 @@ use std::sync::Arc; use malloc_size_of_derive::MallocSizeOf; -use range::{int_range_index, RangeIndex}; +use range::{RangeIndex, int_range_index}; use serde::{Deserialize, Serialize}; int_range_index! { diff --git a/components/shared/net/image_cache.rs b/components/shared/net/image_cache.rs index c98b52c20d4..abe0385c71a 100644 --- a/components/shared/net/image_cache.rs +++ b/components/shared/net/image_cache.rs @@ -13,8 +13,8 @@ use serde::{Deserialize, Serialize}; use servo_url::{ImmutableOrigin, ServoUrl}; use webrender_traits::CrossProcessCompositorApi; -use crate::request::CorsSettings; use crate::FetchResponseMsg; +use crate::request::CorsSettings; // ====================================================================== // Aux structs and enums. diff --git a/components/shared/net/lib.rs b/components/shared/net/lib.rs index b6c44cad75f..c2c447d503e 100644 --- a/components/shared/net/lib.rs +++ b/components/shared/net/lib.rs @@ -12,14 +12,14 @@ use std::thread; use base::cross_process_instant::CrossProcessInstant; use base::id::HistoryStateId; use cookie::Cookie; -use crossbeam_channel::{unbounded, Receiver, Sender}; +use crossbeam_channel::{Receiver, Sender, unbounded}; use headers::{ContentType, HeaderMapExt, ReferrerPolicy as ReferrerPolicyHeader}; -use http::{header, Error as HttpError, HeaderMap, HeaderValue, StatusCode}; +use http::{Error as HttpError, HeaderMap, HeaderValue, StatusCode, header}; use hyper_serde::Serde; use hyper_util::client::legacy::Error as HyperError; +use ipc_channel::Error as IpcError; use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::router::ROUTER; -use ipc_channel::Error as IpcError; use malloc_size_of::malloc_size_of_is_0; use malloc_size_of_derive::MallocSizeOf; use mime::Mime; diff --git a/components/shared/net/request.rs b/components/shared/net/request.rs index b3b61b5dafc..c7720af7517 100644 --- a/components/shared/net/request.rs +++ b/components/shared/net/request.rs @@ -6,7 +6,7 @@ use std::sync::{Arc, Mutex}; use base::id::{PipelineId, WebViewId}; use content_security_policy::{self as csp}; -use http::header::{HeaderName, AUTHORIZATION}; +use http::header::{AUTHORIZATION, HeaderName}; use http::{HeaderMap, Method}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use malloc_size_of_derive::MallocSizeOf; diff --git a/components/shared/net/response.rs b/components/shared/net/response.rs index 3fdc786e511..06ca0687da2 100644 --- a/components/shared/net/response.rs +++ b/components/shared/net/response.rs @@ -4,8 +4,8 @@ //! The [Response](https://fetch.spec.whatwg.org/#responses) object //! resulting from a [fetch operation](https://fetch.spec.whatwg.org/#concept-fetch) -use std::sync::atomic::AtomicBool; use std::sync::Mutex; +use std::sync::atomic::AtomicBool; use headers::{ContentType, HeaderMapExt}; use http::HeaderMap; diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs index 7ccee71153e..eaf371f72ec 100644 --- a/components/shared/script/lib.rs +++ b/components/shared/script/lib.rs @@ -19,12 +19,12 @@ use std::fmt; use std::sync::Arc; use background_hang_monitor_api::BackgroundHangMonitorRegister; +use base::Epoch; use base::cross_process_instant::CrossProcessInstant; use base::id::{ BlobId, BrowsingContextId, HistoryStateId, MessagePortId, PipelineId, PipelineNamespaceId, TopLevelBrowsingContextId, WebViewId, }; -use base::Epoch; use bitflags::bitflags; #[cfg(feature = "bluetooth")] use bluetooth_traits::BluetoothRequest; @@ -35,8 +35,8 @@ use embedder_traits::input_events::InputEvent; use embedder_traits::{MediaSessionActionType, Theme, WebDriverScriptCommand}; use euclid::{Rect, Scale, Size2D, UnknownUnit, Vector2D}; use http::{HeaderMap, Method}; -use ipc_channel::ipc::{IpcReceiver, IpcSender}; use ipc_channel::Error as IpcError; +use ipc_channel::ipc::{IpcReceiver, IpcSender}; use libc::c_void; use log::warn; use malloc_size_of::malloc_size_of_is_0; @@ -806,7 +806,9 @@ impl StructuredSerializedData { if self.ports.is_some() { // Not panicking only because this is called from the constellation. - warn!("Attempt to broadcast structured serialized data including ports(should never happen)."); + warn!( + "Attempt to broadcast structured serialized data including ports(should never happen)." + ); } StructuredSerializedData { diff --git a/components/shared/script/script_msg.rs b/components/shared/script/script_msg.rs index 42258f6f155..f6acdd921f2 100644 --- a/components/shared/script/script_msg.rs +++ b/components/shared/script/script_msg.rs @@ -5,27 +5,27 @@ use std::collections::{HashMap, VecDeque}; use std::fmt; +use base::Epoch; use base::id::{ BroadcastChannelRouterId, BrowsingContextId, HistoryStateId, MessagePortId, MessagePortRouterId, PipelineId, ServiceWorkerId, ServiceWorkerRegistrationId, TopLevelBrowsingContextId, }; -use base::Epoch; use canvas_traits::canvas::{CanvasId, CanvasMsg}; use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId}; use embedder_traits::{ EmbedderMsg, MediaSessionEvent, TouchEventType, TouchSequenceId, TraversalDirection, }; -use euclid::default::Size2D as UntypedSize2D; use euclid::Size2D; +use euclid::default::Size2D as UntypedSize2D; use ipc_channel::ipc::{IpcReceiver, IpcSender}; -use net_traits::storage_thread::StorageType; use net_traits::CoreResourceMsg; +use net_traits::storage_thread::StorageType; use serde::{Deserialize, Serialize}; use servo_url::{ImmutableOrigin, ServoUrl}; use style_traits::CSSPixel; #[cfg(feature = "webgpu")] -use webgpu::{wgc, WebGPU, WebGPUResponse}; +use webgpu::{WebGPU, WebGPUResponse, wgc}; use crate::{ AnimationState, AuxiliaryWebViewCreationRequest, BroadcastMsg, DocumentState, diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index c9ff5c7c47c..de70ae64df0 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -12,17 +12,17 @@ pub mod wrapper_traits; use std::any::Any; use std::borrow::Cow; -use std::sync::atomic::{AtomicIsize, AtomicU64, Ordering}; use std::sync::Arc; +use std::sync::atomic::{AtomicIsize, AtomicU64, Ordering}; use app_units::Au; use atomic_refcell::AtomicRefCell; +use base::Epoch; use base::cross_process_instant::CrossProcessInstant; use base::id::{BrowsingContextId, PipelineId, WebViewId}; -use base::Epoch; use canvas_traits::canvas::{CanvasId, CanvasMsg}; -use euclid::default::{Point2D, Rect}; use euclid::Size2D; +use euclid::default::{Point2D, Rect}; use fnv::FnvHashMap; use fonts::{FontContext, SystemFontServiceProxy}; use ipc_channel::ipc::IpcSender; @@ -39,18 +39,18 @@ use script_traits::{ use serde::{Deserialize, Serialize}; use servo_arc::Arc as ServoArc; use servo_url::{ImmutableOrigin, ServoUrl}; +use style::Atom; use style::animation::DocumentAnimationSet; use style::context::QuirksMode; use style::data::ElementData; use style::dom::OpaqueNode; use style::invalidation::element::restyle_hints::RestyleHint; use style::media_queries::Device; -use style::properties::style_structs::Font; use style::properties::PropertyId; +use style::properties::style_structs::Font; use style::queries::values::PrefersColorScheme; use style::selector_parser::{PseudoElement, RestyleDamage, Snapshot}; use style::stylesheets::Stylesheet; -use style::Atom; use style_traits::CSSPixel; use webrender_api::ImageKey; use webrender_traits::CrossProcessCompositorApi; diff --git a/components/shared/script_layout/wrapper_traits.rs b/components/shared/script_layout/wrapper_traits.rs index 5c8da0315b4..bc7939d8870 100644 --- a/components/shared/script_layout/wrapper_traits.rs +++ b/components/shared/script_layout/wrapper_traits.rs @@ -11,7 +11,7 @@ use std::sync::Arc as StdArc; use atomic_refcell::AtomicRef; use base::id::{BrowsingContextId, PipelineId}; use fonts_traits::ByteIndex; -use html5ever::{local_name, namespace_url, ns, LocalName, Namespace}; +use html5ever::{LocalName, Namespace, local_name, namespace_url, ns}; use pixels::{Image, ImageMetadata}; use range::Range; use servo_arc::Arc; @@ -323,10 +323,7 @@ pub trait ThreadSafeLayoutNode<'dom>: Clone + Copy + Debug + NodeInfo + PartialE pub trait ThreadSafeLayoutElement<'dom>: Clone + Copy + Sized + Debug + ::selectors::Element<Impl = SelectorImpl> { - type ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode< - 'dom, - ConcreteThreadSafeLayoutElement = Self, - >; + type ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode<'dom, ConcreteThreadSafeLayoutElement = Self>; /// This type alias is just a work-around to avoid writing /// diff --git a/components/shared/webrender/rendering_context.rs b/components/shared/webrender/rendering_context.rs index 955c256bc62..46d72917510 100644 --- a/components/shared/webrender/rendering_context.rs +++ b/components/shared/webrender/rendering_context.rs @@ -17,8 +17,8 @@ use glow::NativeFramebuffer; use image::RgbaImage; use log::{debug, trace, warn}; use raw_window_handle::{DisplayHandle, WindowHandle}; -use surfman::chains::{PreserveBuffer, SwapChain}; pub use surfman::Error; +use surfman::chains::{PreserveBuffer, SwapChain}; use surfman::{ Adapter, Connection, Context, ContextAttributeFlags, ContextAttributes, Device, GLApi, NativeContext, NativeWidget, Surface, SurfaceAccess, SurfaceInfo, SurfaceTexture, SurfaceType, diff --git a/components/shared/webxr/layer.rs b/components/shared/webxr/layer.rs index 904091f930f..29ded7b37ed 100644 --- a/components/shared/webxr/layer.rs +++ b/components/shared/webxr/layer.rs @@ -46,7 +46,7 @@ impl GLContexts<()> for () { pub trait LayerGrandManagerAPI<GL: GLTypes> { fn create_layer_manager(&self, factory: LayerManagerFactory<GL>) - -> Result<LayerManager, Error>; + -> Result<LayerManager, Error>; fn clone_layer_grand_manager(&self) -> LayerGrandManager<GL>; } diff --git a/components/shared/webxr/lib.rs b/components/shared/webxr/lib.rs index 563d1190c47..a539fd55457 100644 --- a/components/shared/webxr/lib.rs +++ b/components/shared/webxr/lib.rs @@ -37,11 +37,11 @@ pub use input::{ Handedness, InputFrame, InputId, InputSource, SelectEvent, SelectKind, TargetRayMode, }; #[cfg(feature = "ipc")] -pub use ipc_channel::ipc::channel as webxr_channel; -#[cfg(feature = "ipc")] pub use ipc_channel::ipc::IpcReceiver as WebXrReceiver; #[cfg(feature = "ipc")] pub use ipc_channel::ipc::IpcSender as WebXrSender; +#[cfg(feature = "ipc")] +pub use ipc_channel::ipc::channel as webxr_channel; pub use layer::{ ContextId, GLContexts, GLTypes, LayerGrandManager, LayerGrandManagerAPI, LayerId, LayerInit, LayerLayout, LayerManager, LayerManagerAPI, LayerManagerFactory, SubImage, SubImages, @@ -57,9 +57,9 @@ pub use session::{ }; pub use space::{ApiSpace, BaseSpace, Space}; pub use view::{ - Capture, CubeBack, CubeBottom, CubeLeft, CubeRight, CubeTop, Display, Floor, Input, LeftEye, - Native, RightEye, SomeEye, View, Viewer, Viewport, Viewports, Views, CUBE_BACK, CUBE_BOTTOM, - CUBE_LEFT, CUBE_RIGHT, CUBE_TOP, LEFT_EYE, RIGHT_EYE, VIEWER, + CUBE_BACK, CUBE_BOTTOM, CUBE_LEFT, CUBE_RIGHT, CUBE_TOP, Capture, CubeBack, CubeBottom, + CubeLeft, CubeRight, CubeTop, Display, Floor, Input, LEFT_EYE, LeftEye, Native, RIGHT_EYE, + RightEye, SomeEye, VIEWER, View, Viewer, Viewport, Viewports, Views, }; #[cfg(not(feature = "ipc"))] diff --git a/components/shared/webxr/session.rs b/components/shared/webxr/session.rs index 4809ff5f17b..9871dc64b49 100644 --- a/components/shared/webxr/session.rs +++ b/components/shared/webxr/session.rs @@ -11,9 +11,9 @@ use log::warn; use serde::{Deserialize, Serialize}; use crate::{ - webxr_channel, ContextId, DeviceAPI, Error, Event, Floor, Frame, FrameUpdateEvent, HitTestId, - HitTestSource, InputSource, LayerGrandManager, LayerId, LayerInit, Native, Viewport, Viewports, - WebXrReceiver, WebXrSender, + ContextId, DeviceAPI, Error, Event, Floor, Frame, FrameUpdateEvent, HitTestId, HitTestSource, + InputSource, LayerGrandManager, LayerId, LayerInit, Native, Viewport, Viewports, WebXrReceiver, + WebXrSender, webxr_channel, }; // How long to wait for an rAF. |