Sort use statements

This commit is contained in:
Simon Sapin 2018-11-01 17:23:56 +01:00
parent 45f7199eee
commit 76e59a46d3
162 changed files with 444 additions and 431 deletions

View file

@ -11,8 +11,8 @@ extern crate serde;
pub mod blocklist; pub mod blocklist;
pub mod scanfilter; pub mod scanfilter;
use ipc_channel::ipc::IpcSender;
use crate::scanfilter::{BluetoothScanfilterSequence, RequestDeviceoptions}; use crate::scanfilter::{BluetoothScanfilterSequence, RequestDeviceoptions};
use ipc_channel::ipc::IpcSender;
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
pub enum BluetoothError { pub enum BluetoothError {

View file

@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use azure::azure_hl::AntialiasMode; use azure::azure_hl::AntialiasMode;
use crate::canvas_data::*;
use canvas_traits::canvas::*; use canvas_traits::canvas::*;
use crate::canvas_data::*;
use euclid::Size2D; use euclid::Size2D;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use std::borrow::ToOwned; use std::borrow::ToOwned;

View file

@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::gl_context::GLContextFactory;
use canvas_traits::webgl::{WebGLChan, WebGLContextId, WebGLMsg, WebGLPipeline, WebGLReceiver}; use canvas_traits::webgl::{WebGLChan, WebGLContextId, WebGLMsg, WebGLPipeline, WebGLReceiver};
use canvas_traits::webgl::{WebGLSender, WebVRCommand, WebVRRenderHandler}; use canvas_traits::webgl::{WebGLSender, WebVRCommand, WebVRRenderHandler};
use canvas_traits::webgl::DOMToTextureCommand; use canvas_traits::webgl::DOMToTextureCommand;
use canvas_traits::webgl::webgl_channel; use canvas_traits::webgl::webgl_channel;
use crate::gl_context::GLContextFactory;
use crate::webgl_thread::{WebGLExternalImageApi, WebGLExternalImageHandler, WebGLThread};
use euclid::Size2D; use euclid::Size2D;
use fnv::FnvHashMap; use fnv::FnvHashMap;
use gleam::gl; use gleam::gl;
use servo_config::prefs::PREFS; use servo_config::prefs::PREFS;
use std::rc::Rc; use std::rc::Rc;
use crate::webgl_thread::{WebGLExternalImageApi, WebGLExternalImageHandler, WebGLThread};
use webrender; use webrender;
use webrender_api; use webrender_api;

View file

@ -6,10 +6,12 @@ use crate::CompositionPipeline;
use crate::SendableFrameTree; use crate::SendableFrameTree;
use crate::compositor_thread::{CompositorProxy, CompositorReceiver}; use crate::compositor_thread::{CompositorProxy, CompositorReceiver};
use crate::compositor_thread::{InitialCompositorState, Msg}; use crate::compositor_thread::{InitialCompositorState, Msg};
use euclid::{TypedPoint2D, TypedVector2D, TypedScale};
use gfx_traits::Epoch;
#[cfg(feature = "gleam")] #[cfg(feature = "gleam")]
use crate::gl; use crate::gl;
use crate::touch::{TouchHandler, TouchAction};
use crate::windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods};
use euclid::{TypedPoint2D, TypedVector2D, TypedScale};
use gfx_traits::Epoch;
#[cfg(feature = "gleam")] #[cfg(feature = "gleam")]
use image::{DynamicImage, ImageFormat}; use image::{DynamicImage, ImageFormat};
use ipc_channel::ipc; use ipc_channel::ipc;
@ -36,11 +38,9 @@ use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
use style_traits::cursor::CursorKind; use style_traits::cursor::CursorKind;
use style_traits::viewport::ViewportConstraints; use style_traits::viewport::ViewportConstraints;
use time::{now, precise_time_ns, precise_time_s}; use time::{now, precise_time_ns, precise_time_s};
use crate::touch::{TouchHandler, TouchAction};
use webrender; use webrender;
use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResult}; use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResult};
use webrender_api::{LayoutVector2D, ScrollLocation}; use webrender_api::{LayoutVector2D, ScrollLocation};
use crate::windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods};
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
enum UnableToComposite { enum UnableToComposite {

View file

@ -5,10 +5,10 @@
//! Configuration options for a single run of the servo application. Created //! Configuration options for a single run of the servo application. Created
//! from command line arguments. //! from command line arguments.
use crate::prefs::{self, PrefValue, PREFS};
use euclid::TypedSize2D; use euclid::TypedSize2D;
use getopts::Options; use getopts::Options;
use num_cpus; use num_cpus;
use crate::prefs::{self, PrefValue, PREFS};
use servo_geometry::DeviceIndependentPixel; use servo_geometry::DeviceIndependentPixel;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::borrow::Cow; use std::borrow::Cow;

View file

@ -3,9 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::basedir::default_config_dir; use crate::basedir::default_config_dir;
use crate::opts;
use embedder_traits::resources::{self, Resource}; use embedder_traits::resources::{self, Resource};
use num_cpus; use num_cpus;
use crate::opts;
use rustc_serialize::json::{Json, ToJson}; use rustc_serialize::json::{Json, ToJson};
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::cmp::max; use std::cmp::max;

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::pipeline::Pipeline;
use euclid::TypedSize2D; use euclid::TypedSize2D;
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId}; use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
use crate::pipeline::Pipeline;
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
use style_traits::CSSPixel; use style_traits::CSSPixel;

View file

@ -91,8 +91,6 @@
use backtrace::Backtrace; use backtrace::Backtrace;
use bluetooth_traits::BluetoothRequest; use bluetooth_traits::BluetoothRequest;
use crate::browsingcontext::{AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator};
use crate::browsingcontext::NewBrowsingContextInfo;
use canvas::canvas_paint_thread::CanvasPaintThread; use canvas::canvas_paint_thread::CanvasPaintThread;
use canvas::webgl_thread::WebGLThreads; use canvas::webgl_thread::WebGLThreads;
use canvas_traits::canvas::CanvasId; use canvas_traits::canvas::CanvasId;
@ -101,11 +99,17 @@ use clipboard::{ClipboardContext, ClipboardProvider};
use compositing::SendableFrameTree; use compositing::SendableFrameTree;
use compositing::compositor_thread::CompositorProxy; use compositing::compositor_thread::CompositorProxy;
use compositing::compositor_thread::Msg as ToCompositorMsg; use compositing::compositor_thread::Msg as ToCompositorMsg;
use crate::browsingcontext::{AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator};
use crate::browsingcontext::NewBrowsingContextInfo;
use crate::event_loop::EventLoop;
use crate::network_listener::NetworkListener;
use crate::pipeline::{InitialPipelineState, Pipeline};
use crate::session_history::{JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff};
use crate::timer_scheduler::TimerScheduler;
use debugger; use debugger;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg}; use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
use embedder_traits::{EmbedderMsg, EmbedderProxy}; use embedder_traits::{EmbedderMsg, EmbedderProxy};
use euclid::{Size2D, TypedSize2D, TypedScale}; use euclid::{Size2D, TypedSize2D, TypedScale};
use crate::event_loop::EventLoop;
use gfx::font_cache_thread::FontCacheThread; use gfx::font_cache_thread::FontCacheThread;
use gfx_traits::Epoch; use gfx_traits::Epoch;
use ipc_channel::{Error as IpcError}; use ipc_channel::{Error as IpcError};
@ -120,8 +124,6 @@ use net_traits::{self, IpcSend, FetchResponseMsg, ResourceThreads};
use net_traits::pub_domains::reg_host; use net_traits::pub_domains::reg_host;
use net_traits::request::RequestInit; use net_traits::request::RequestInit;
use net_traits::storage_thread::{StorageThreadMsg, StorageType}; use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use crate::network_listener::NetworkListener;
use crate::pipeline::{InitialPipelineState, Pipeline};
use profile_traits::mem; use profile_traits::mem;
use profile_traits::time; use profile_traits::time;
use script_traits::{AnimationState, AuxiliaryBrowsingContextLoadInfo, AnimationTickType, CompositorEvent}; use script_traits::{AnimationState, AuxiliaryBrowsingContextLoadInfo, AnimationTickType, CompositorEvent};
@ -139,7 +141,6 @@ use servo_config::prefs::PREFS;
use servo_rand::{Rng, SeedableRng, ServoRng, random}; use servo_rand::{Rng, SeedableRng, ServoRng, random};
use servo_remutex::ReentrantMutex; use servo_remutex::ReentrantMutex;
use servo_url::{Host, ImmutableOrigin, ServoUrl}; use servo_url::{Host, ImmutableOrigin, ServoUrl};
use crate::session_history::{JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff};
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::collections::{HashMap, VecDeque}; use std::collections::{HashMap, VecDeque};
use std::marker::PhantomData; use std::marker::PhantomData;
@ -151,7 +152,6 @@ use std::thread;
use style_traits::CSSPixel; use style_traits::CSSPixel;
use style_traits::cursor::CursorKind; use style_traits::cursor::CursorKind;
use style_traits::viewport::ViewportConstraints; use style_traits::viewport::ViewportConstraints;
use crate::timer_scheduler::TimerScheduler;
use webrender_api; use webrender_api;
use webvr_traits::{WebVREvent, WebVRMsg}; use webvr_traits::{WebVREvent, WebVRMsg};

View file

@ -7,9 +7,9 @@ use canvas_traits::webgl::WebGLPipeline;
use compositing::CompositionPipeline; use compositing::CompositionPipeline;
use compositing::CompositorProxy; use compositing::CompositorProxy;
use compositing::compositor_thread::Msg as CompositorMsg; use compositing::compositor_thread::Msg as CompositorMsg;
use crate::event_loop::EventLoop;
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg}; use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
use euclid::{TypedSize2D, TypedScale}; use euclid::{TypedSize2D, TypedScale};
use crate::event_loop::EventLoop;
use gfx::font_cache_thread::FontCacheThread; use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::Error; use ipc_channel::Error;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
@ -555,9 +555,9 @@ impl UnprivilegedPipelineContent {
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))] #[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
pub fn spawn_multiprocess(self) -> Result<(), Error> { pub fn spawn_multiprocess(self) -> Result<(), Error> {
use crate::sandboxing::content_process_sandbox_profile;
use gaol::sandbox::{self, Sandbox, SandboxMethods}; use gaol::sandbox::{self, Sandbox, SandboxMethods};
use ipc_channel::ipc::IpcOneShotServer; use ipc_channel::ipc::IpcOneShotServer;
use crate::sandboxing::content_process_sandbox_profile;
impl CommandMethods for sandbox::Command { impl CommandMethods for sandbox::Command {
fn arg<T>(&mut self, arg: T) fn arg<T>(&mut self, arg: T)

View file

@ -9,8 +9,8 @@
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use crate::actors::console::ConsoleActor; use crate::actors::console::ConsoleActor;
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
use crate::protocol::JsonPacketStream; use crate::protocol::JsonPacketStream;
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -9,13 +9,13 @@
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use crate::actors::object::ObjectActor; use crate::actors::object::ObjectActor;
use crate::protocol::JsonPacketStream;
use devtools_traits::{CachedConsoleMessageTypes, DevtoolScriptControlMsg}; use devtools_traits::{CachedConsoleMessageTypes, DevtoolScriptControlMsg};
use devtools_traits::CachedConsoleMessage; use devtools_traits::CachedConsoleMessage;
use devtools_traits::EvaluateJSReply::{ActorValue, BooleanValue, StringValue}; use devtools_traits::EvaluateJSReply::{ActorValue, BooleanValue, StringValue};
use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue}; use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue};
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::protocol::JsonPacketStream;
use serde_json::{self, Map, Number, Value}; use serde_json::{self, Map, Number, Value};
use std::cell::RefCell; use std::cell::RefCell;
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -6,12 +6,12 @@
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js). //! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use crate::protocol::JsonPacketStream;
use devtools_traits::{ComputedNodeLayout, DevtoolScriptControlMsg, NodeInfo}; use devtools_traits::{ComputedNodeLayout, DevtoolScriptControlMsg, NodeInfo};
use devtools_traits::DevtoolScriptControlMsg::{GetChildren, GetDocumentElement, GetRootNode}; use devtools_traits::DevtoolScriptControlMsg::{GetChildren, GetDocumentElement, GetRootNode};
use devtools_traits::DevtoolScriptControlMsg::{GetLayout, ModifyAttribute}; use devtools_traits::DevtoolScriptControlMsg::{GetLayout, ModifyAttribute};
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::protocol::JsonPacketStream;
use serde_json::{self, Map, Value}; use serde_json::{self, Map, Value};
use std::cell::RefCell; use std::cell::RefCell;
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -7,13 +7,13 @@
//! Handles interaction with the remote web console on network events (HTTP requests, responses) in Servo. //! Handles interaction with the remote web console on network events (HTTP requests, responses) in Servo.
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use crate::protocol::JsonPacketStream;
use devtools_traits::HttpRequest as DevtoolsHttpRequest; use devtools_traits::HttpRequest as DevtoolsHttpRequest;
use devtools_traits::HttpResponse as DevtoolsHttpResponse; use devtools_traits::HttpResponse as DevtoolsHttpResponse;
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{ContentType, Cookie}; use headers_ext::{ContentType, Cookie};
use http::{header, HeaderMap}; use http::{header, HeaderMap};
use hyper::{Method, StatusCode}; use hyper::{Method, StatusCode};
use crate::protocol::JsonPacketStream;
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;
use time; use time;

View file

@ -5,12 +5,12 @@
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use crate::actors::framerate::FramerateActor; use crate::actors::framerate::FramerateActor;
use crate::actors::memory::{MemoryActor, TimelineMemoryReply}; use crate::actors::memory::{MemoryActor, TimelineMemoryReply};
use crate::protocol::JsonPacketStream;
use devtools_traits::{PreciseTime, TimelineMarker, TimelineMarkerType}; use devtools_traits::{PreciseTime, TimelineMarker, TimelineMarkerType};
use devtools_traits::DevtoolScriptControlMsg; use devtools_traits::DevtoolScriptControlMsg;
use devtools_traits::DevtoolScriptControlMsg::{DropTimelineMarkers, SetTimelineMarkers}; use devtools_traits::DevtoolScriptControlMsg::{DropTimelineMarkers, SetTimelineMarkers};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::protocol::JsonPacketStream;
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -42,12 +42,12 @@ use crate::actors::stylesheets::StyleSheetsActor;
use crate::actors::thread::ThreadActor; use crate::actors::thread::ThreadActor;
use crate::actors::timeline::TimelineActor; use crate::actors::timeline::TimelineActor;
use crate::actors::worker::WorkerActor; use crate::actors::worker::WorkerActor;
use crate::protocol::JsonPacketStream;
use devtools_traits::{ChromeToDevtoolsControlMsg, ConsoleMessage, DevtoolsControlMsg}; use devtools_traits::{ChromeToDevtoolsControlMsg, ConsoleMessage, DevtoolsControlMsg};
use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo, LogLevel, NetworkEvent}; use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo, LogLevel, NetworkEvent};
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId}; use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::protocol::JsonPacketStream;
use servo_channel::{Receiver, Sender, channel}; use servo_channel::{Receiver, Sender, channel};
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -3,14 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au; use app_units::Au;
use euclid::{Point2D, Rect, Size2D};
use crate::font_context::{FontContext, FontSource}; use crate::font_context::{FontContext, FontSource};
use crate::font_template::FontTemplateDescriptor; use crate::font_template::FontTemplateDescriptor;
use ordered_float::NotNan;
use crate::platform::font::{FontHandle, FontTable}; use crate::platform::font::{FontHandle, FontTable};
use crate::platform::font_context::FontContextHandle; use crate::platform::font_context::FontContextHandle;
pub use crate::platform::font_list::fallback_font_families; pub use crate::platform::font_list::fallback_font_families;
use crate::platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use crate::text::Shaper;
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use crate::text::shaping::ShaperMethods;
use euclid::{Point2D, Rect, Size2D};
use ordered_float::NotNan;
use servo_atoms::Atom; use servo_atoms::Atom;
use smallvec::SmallVec; use smallvec::SmallVec;
use std::borrow::ToOwned; use std::borrow::ToOwned;
@ -24,9 +27,6 @@ use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
use style::computed_values::{font_stretch, font_style, font_variant_caps, font_weight}; use style::computed_values::{font_stretch, font_style, font_variant_caps, font_weight};
use style::properties::style_structs::Font as FontStyleStruct; use style::properties::style_structs::Font as FontStyleStruct;
use style::values::computed::font::SingleFontFamily; use style::values::computed::font::SingleFontFamily;
use crate::text::Shaper;
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use crate::text::shaping::ShaperMethods;
use time; use time;
use unicode_script::Script; use unicode_script::Script;
use webrender_api; use webrender_api;

View file

@ -6,16 +6,16 @@ use app_units::Au;
use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope}; use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope};
use crate::font_context::FontSource; use crate::font_context::FontSource;
use crate::font_template::{FontTemplate, FontTemplateDescriptor}; use crate::font_template::{FontTemplate, FontTemplateDescriptor};
use fontsan;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
use net_traits::request::{Destination, RequestInit};
use crate::platform::font_context::FontContextHandle; use crate::platform::font_context::FontContextHandle;
use crate::platform::font_list::SANS_SERIF_FONT_FAMILY; use crate::platform::font_list::SANS_SERIF_FONT_FAMILY;
use crate::platform::font_list::for_each_available_family; use crate::platform::font_list::for_each_available_family;
use crate::platform::font_list::for_each_variation; use crate::platform::font_list::for_each_variation;
use crate::platform::font_list::system_default_family; use crate::platform::font_list::system_default_family;
use crate::platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use fontsan;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
use net_traits::request::{Destination, RequestInit};
use servo_atoms::Atom; use servo_atoms::Atom;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::{fmt, f32, mem, thread}; use std::{fmt, f32, mem, thread};

View file

@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au; use app_units::Au;
use fnv::FnvHasher;
use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef}; use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef};
use crate::font_cache_thread::FontTemplateInfo; use crate::font_cache_thread::FontTemplateInfo;
use crate::font_template::FontTemplateDescriptor; use crate::font_template::FontTemplateDescriptor;
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use crate::platform::font::FontHandle; use crate::platform::font::FontHandle;
pub use crate::platform::font_context::FontContextHandle; pub use crate::platform::font_context::FontContextHandle;
use fnv::FnvHasher;
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use servo_arc::Arc; use servo_arc::Arc;
use std::cell::RefCell; use std::cell::RefCell;
use std::collections::HashMap; use std::collections::HashMap;

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::text::util::is_cjk;
use std::cell::RefCell; use std::cell::RefCell;
use std::fs::File; use std::fs::File;
use std::io::{self, Read}; use std::io::{self, Read};
use std::path::Path; use std::path::Path;
use crate::text::util::is_cjk;
use ucd::{Codepoint, UnicodeBlock}; use ucd::{Codepoint, UnicodeBlock};
use xml5ever::Attribute; use xml5ever::Attribute;
use xml5ever::driver::parse_document; use xml5ever::driver::parse_document;

View file

@ -5,6 +5,10 @@
use app_units::Au; use app_units::Au;
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods}; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN}; use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN};
use crate::platform::font_context::FontContextHandle;
use crate::platform::font_template::FontTemplateData;
use crate::text::glyph::GlyphId;
use crate::text::util::fixed_to_float;
use freetype::freetype::{FT_Done_Face, FT_New_Face, FT_New_Memory_Face}; use freetype::freetype::{FT_Done_Face, FT_New_Face, FT_New_Memory_Face};
use freetype::freetype::{FT_F26Dot6, FT_Face, FT_FaceRec}; use freetype::freetype::{FT_F26Dot6, FT_Face, FT_FaceRec};
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name}; use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
@ -16,8 +20,6 @@ use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, FT_Vector};
use freetype::freetype::FT_Sfnt_Tag; use freetype::freetype::FT_Sfnt_Tag;
use freetype::succeeded; use freetype::succeeded;
use freetype::tt_os2::TT_OS2; use freetype::tt_os2::TT_OS2;
use crate::platform::font_context::FontContextHandle;
use crate::platform::font_template::FontTemplateData;
use servo_atoms::Atom; use servo_atoms::Atom;
use std::{mem, ptr}; use std::{mem, ptr};
use std::ffi::CString; use std::ffi::CString;
@ -27,8 +29,6 @@ use style::computed_values::font_stretch::T as FontStretch;
use style::computed_values::font_weight::T as FontWeight; use style::computed_values::font_weight::T as FontWeight;
use style::values::computed::font::FontStyle; use style::values::computed::font::FontStyle;
use super::c_str_to_string; use super::c_str_to_string;
use crate::text::glyph::GlyphId;
use crate::text::util::fixed_to_float;
// This constant is not present in the freetype // This constant is not present in the freetype
// bindings due to bindgen not handling the way // bindings due to bindgen not handling the way

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::text::util::is_cjk;
use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem}; use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem};
use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute}; use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute};
use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString}; use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString};
@ -13,7 +14,6 @@ use libc::{c_char, c_int};
use std::ffi::CString; use std::ffi::CString;
use std::ptr; use std::ptr;
use super::c_str_to_string; use super::c_str_to_string;
use crate::text::util::is_cjk;
static FC_FAMILY: &'static [u8] = b"family\0"; static FC_FAMILY: &'static [u8] = b"family\0";
static FC_FILE: &'static [u8] = b"file\0"; static FC_FILE: &'static [u8] = b"file\0";

View file

@ -17,12 +17,12 @@ use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag
use crate::font::{GPOS, GSUB, KERN}; use crate::font::{GPOS, GSUB, KERN};
use crate::platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use crate::platform::macos::font_context::FontContextHandle; use crate::platform::macos::font_context::FontContextHandle;
use crate::text::glyph::GlyphId;
use servo_atoms::Atom; use servo_atoms::Atom;
use std::{fmt, ptr}; use std::{fmt, ptr};
use std::ops::Range; use std::ops::Range;
use std::sync::Arc; use std::sync::Arc;
use style::values::computed::font::{FontStretch, FontStyle, FontWeight}; use style::values::computed::font::{FontStretch, FontStyle, FontWeight};
use crate::text::glyph::GlyphId;
const KERN_PAIR_LEN: usize = 6; const KERN_PAIR_LEN: usize = 6;

View file

@ -7,14 +7,15 @@
// renderer moves to a sandboxed process. // renderer moves to a sandboxed process.
use app_units::Au; use app_units::Au;
use dwrote;
use dwrote::{Font, FontFace, FontFile};
use dwrote::{FontStretch, FontStyle};
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods}; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
use crate::font::{FontTableTag, FractionalPixel}; use crate::font::{FontTableTag, FractionalPixel};
use crate::platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use crate::platform::windows::font_context::FontContextHandle; use crate::platform::windows::font_context::FontContextHandle;
use crate::platform::windows::font_list::font_from_atom; use crate::platform::windows::font_list::font_from_atom;
use crate::text::glyph::GlyphId;
use dwrote;
use dwrote::{Font, FontFace, FontFile};
use dwrote::{FontStretch, FontStyle};
use servo_atoms::Atom; use servo_atoms::Atom;
use std::fmt; use std::fmt;
use std::ops::Deref; use std::ops::Deref;
@ -25,7 +26,6 @@ use style::values::computed::font::FontStyle as StyleFontStyle;
use style::values::generics::NonNegative; use style::values::generics::NonNegative;
use style::values::generics::font::FontStyle as GenericFontStyle; use style::values::generics::font::FontStyle as GenericFontStyle;
use style::values::specified::font::FontStretchKeyword; use style::values::specified::font::FontStretchKeyword;
use crate::text::glyph::GlyphId;
use truetype; use truetype;
// 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch // 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch

View file

@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::text::util::unicode_plane;
use dwrote::{Font, FontDescriptor, FontCollection}; use dwrote::{Font, FontDescriptor, FontCollection};
use servo_atoms::Atom; use servo_atoms::Atom;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::Mutex; use std::sync::Mutex;
use std::sync::atomic::{Ordering, AtomicUsize}; use std::sync::atomic::{Ordering, AtomicUsize};
use crate::text::util::unicode_plane;
use ucd::{Codepoint, UnicodeBlock}; use ucd::{Codepoint, UnicodeBlock};
lazy_static! { lazy_static! {

View file

@ -5,7 +5,6 @@
#![allow(unsafe_code)] #![allow(unsafe_code)]
use app_units::Au; use app_units::Au;
use euclid::Point2D;
use crate::font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN}; use crate::font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN};
use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY}; use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables}; use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
@ -34,11 +33,12 @@ use crate::harfbuzz::hb_font_set_scale;
use crate::harfbuzz::hb_glyph_info_t; use crate::harfbuzz::hb_glyph_info_t;
use crate::harfbuzz::hb_glyph_position_t; use crate::harfbuzz::hb_glyph_position_t;
use crate::platform::font::FontTable; use crate::platform::font::FontTable;
use std::{char, cmp, ptr};
use std::os::raw::{c_char, c_int, c_uint, c_void};
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore}; use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use crate::text::shaping::ShaperMethods; use crate::text::shaping::ShaperMethods;
use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control}; use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
use euclid::Point2D;
use std::{char, cmp, ptr};
use std::os::raw::{c_char, c_int, c_uint, c_void};
const NO_GLYPH: i32 = -1; const NO_GLYPH: i32 = -1;
const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a'); const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a');

View file

@ -6,13 +6,13 @@ use app_units::Au;
use crate::font::{Font, FontHandleMethods, FontMetrics, ShapingFlags}; use crate::font::{Font, FontHandleMethods, FontMetrics, ShapingFlags};
use crate::font::{RunMetrics, ShapingOptions}; use crate::font::{RunMetrics, ShapingOptions};
use crate::platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use crate::text::glyph::{ByteIndex, GlyphStore};
use range::Range; use range::Range;
use std::cell::Cell; use std::cell::Cell;
use std::cmp::{Ordering, max}; use std::cmp::{Ordering, max};
use std::slice::Iter; use std::slice::Iter;
use std::sync::Arc; use std::sync::Arc;
use style::str::char_is_whitespace; use style::str::char_is_whitespace;
use crate::text::glyph::{ByteIndex, GlyphStore};
use unicode_bidi as bidi; use unicode_bidi as bidi;
use webrender_api; use webrender_api;
use xi_unicode::LineBreakLeafIter; use xi_unicode::LineBreakLeafIter;

View file

@ -7,10 +7,10 @@
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use crate::flow::{Flow, GetBaseFlow}; use crate::flow::{Flow, GetBaseFlow};
use crate::opaque_node::OpaqueNodeMethods;
use fxhash::FxHashMap; use fxhash::FxHashMap;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::opaque_node::OpaqueNodeMethods;
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg}; use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
use script_traits::UntrustedNodeAddress; use script_traits::UntrustedNodeAddress;
use servo_channel::Receiver; use servo_channel::Receiver;

View file

@ -31,17 +31,18 @@ use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags};
use crate::display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use crate::display_list::items::DisplayListSection; use crate::display_list::items::DisplayListSection;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use crate::floats::{ClearType, FloatKind, Floats, PlacementInfo}; use crate::floats::{ClearType, FloatKind, Floats, PlacementInfo};
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow}; use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow};
use crate::flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags}; use crate::flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags};
use crate::flow_list::FlowList; use crate::flow_list::FlowList;
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
use gfx_traits::print_tree::PrintTree;
use crate::incremental::RelayoutMode; use crate::incremental::RelayoutMode;
use crate::layout_debug; use crate::layout_debug;
use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto}; use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
use crate::sequential; use crate::sequential;
use crate::traversal::PreorderFlowTraversal;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use gfx_traits::print_tree::PrintTree;
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use servo_geometry::MaxRect; use servo_geometry::MaxRect;
use std::cmp::{max, min}; use std::cmp::{max, min};
@ -59,7 +60,6 @@ use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage}; use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
use style::values::computed::LengthOrPercentageOrAuto; use style::values::computed::LengthOrPercentageOrAuto;
use crate::traversal::PreorderFlowTraversal;
/// Information specific to floated blocks. /// Information specific to floated blocks.
#[derive(Clone, Serialize)] #[derive(Clone, Serialize)]

View file

@ -30,6 +30,16 @@ use crate::linked_list::prepend_from;
use crate::list_item::{ListItemFlow, ListStyleTypeContent}; use crate::list_item::{ListItemFlow, ListStyleTypeContent};
use crate::multicol::{MulticolColumnFlow, MulticolFlow}; use crate::multicol::{MulticolColumnFlow, MulticolFlow};
use crate::parallel; use crate::parallel;
use crate::table::TableFlow;
use crate::table_caption::TableCaptionFlow;
use crate::table_cell::TableCellFlow;
use crate::table_colgroup::TableColGroupFlow;
use crate::table_row::TableRowFlow;
use crate::table_rowgroup::TableRowGroupFlow;
use crate::table_wrapper::TableWrapperFlow;
use crate::text::TextRunScanner;
use crate::traversal::PostorderNodeMutTraversal;
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data}; use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data};
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode}; use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use servo_config::opts; use servo_config::opts;
@ -53,16 +63,6 @@ use style::selector_parser::{PseudoElement, RestyleDamage};
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::generics::counters::ContentItem; use style::values::generics::counters::ContentItem;
use style::values::generics::url::UrlOrNone as ImageUrlOrNone; use style::values::generics::url::UrlOrNone as ImageUrlOrNone;
use crate::table::TableFlow;
use crate::table_caption::TableCaptionFlow;
use crate::table_cell::TableCellFlow;
use crate::table_colgroup::TableColGroupFlow;
use crate::table_row::TableRowFlow;
use crate::table_rowgroup::TableRowGroupFlow;
use crate::table_wrapper::TableWrapperFlow;
use crate::text::TextRunScanner;
use crate::traversal::PostorderNodeMutTraversal;
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
/// The results of flow construction for a DOM node. /// The results of flow construction for a DOM node.
#[derive(Clone)] #[derive(Clone)]

View file

@ -5,6 +5,7 @@
//! Data needed by the layout thread. //! Data needed by the layout thread.
use crate::display_list::items::{WebRenderImageInfo, OpaqueNode}; use crate::display_list::items::{WebRenderImageInfo, OpaqueNode};
use crate::opaque_node::OpaqueNodeMethods;
use fnv::FnvHasher; use fnv::FnvHasher;
use gfx::font_cache_thread::FontCacheThread; use gfx::font_cache_thread::FontCacheThread;
use gfx::font_context::FontContext; use gfx::font_context::FontContext;
@ -12,7 +13,6 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use net_traits::image_cache::{CanRequestImages, ImageCache, ImageState}; use net_traits::image_cache::{CanRequestImages, ImageCache, ImageState};
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder}; use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
use crate::opaque_node::OpaqueNodeMethods;
use parking_lot::RwLock; use parking_lot::RwLock;
use script_layout_interface::{PendingImage, PendingImageState}; use script_layout_interface::{PendingImage, PendingImageState};
use script_traits::Painter; use script_traits::Painter;

View file

@ -6,8 +6,8 @@
use app_units::Au; use app_units::Au;
use crate::display_list::border; use crate::display_list::border;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use crate::model::MaybeAuto; use crate::model::MaybeAuto;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use style::computed_values::background_attachment::single_value::T as BackgroundAttachment; use style::computed_values::background_attachment::single_value::T as BackgroundAttachment;
use style::computed_values::background_clip::single_value::T as BackgroundClip; use style::computed_values::background_clip::single_value::T as BackgroundClip;
use style::computed_values::background_origin::single_value::T as BackgroundOrigin; use style::computed_values::background_origin::single_value::T as BackgroundOrigin;

View file

@ -9,8 +9,8 @@
//! paint. //! paint.
use app_units::{Au, AU_PER_PX}; use app_units::{Au, AU_PER_PX};
use crate::block::BlockFlow;
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg}; use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
use crate::block::BlockFlow;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::ToLayout; use crate::display_list::ToLayout;
use crate::display_list::background::{self, get_cyclic}; use crate::display_list::background::{self, get_cyclic};
@ -24,20 +24,21 @@ use crate::display_list::items::{IframeDisplayItem, OpaqueNode};
use crate::display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem}; use crate::display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem};
use crate::display_list::items::{StackingContext, StackingContextType, StickyFrameData}; use crate::display_list::items::{StackingContext, StackingContextType, StickyFrameData};
use crate::display_list::items::{TextOrientation, WebRenderImageInfo}; use crate::display_list::items::{TextOrientation, WebRenderImageInfo};
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
use crate::flex::FlexFlow; use crate::flex::FlexFlow;
use crate::flow::{BaseFlow, Flow, FlowFlags}; use crate::flow::{BaseFlow, Flow, FlowFlags};
use crate::flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use fnv::FnvHashMap;
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo}; use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
use crate::fragment::SpecificFragmentInfo; use crate::fragment::SpecificFragmentInfo;
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
use crate::list_item::ListItemFlow;
use crate::model::MaybeAuto;
use crate::table_cell::CollapsedBordersForCell;
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
use fnv::FnvHashMap;
use gfx::text::TextRun; use gfx::text::TextRun;
use gfx::text::glyph::ByteIndex; use gfx::text::glyph::ByteIndex;
use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId}; use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId};
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
use ipc_channel::ipc; use ipc_channel::ipc;
use crate::list_item::ListItemFlow;
use crate::model::MaybeAuto;
use msg::constellation_msg::{BrowsingContextId, PipelineId}; use msg::constellation_msg::{BrowsingContextId, PipelineId};
use net_traits::image_cache::UsePlaceholder; use net_traits::image_cache::UsePlaceholder;
use range::Range; use range::Range;
@ -65,7 +66,6 @@ use style::values::generics::ui::Cursor;
use style_traits::CSSPixel; use style_traits::CSSPixel;
use style_traits::ToCss; use style_traits::ToCss;
use style_traits::cursor::CursorKind; use style_traits::cursor::CursorKind;
use crate::table_cell::CollapsedBordersForCell;
use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF}; use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF};
use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LayoutRect}; use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LayoutRect};
use webrender_api::{LayoutSize, LayoutTransform, LayoutVector2D, LineStyle, NinePatchBorder}; use webrender_api::{LayoutSize, LayoutTransform, LayoutVector2D, LineStyle, NinePatchBorder};

View file

@ -9,13 +9,14 @@ use crate::block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseF
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding}; use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
use crate::display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use euclid::Point2D;
use crate::floats::FloatKind; use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags}; use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::layout_debug; use crate::layout_debug;
use crate::model::{AdjoiningMargins, CollapsibleMargins}; use crate::model::{AdjoiningMargins, CollapsibleMargins};
use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint}; use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
use crate::traversal::PreorderFlowTraversal;
use euclid::Point2D;
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::ops::Range; use std::ops::Range;
use style::computed_values::align_content::T as AlignContent; use style::computed_values::align_content::T as AlignContent;
@ -29,7 +30,6 @@ use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone}; use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
use style::values::computed::flex::FlexBasis; use style::values::computed::flex::FlexBasis;
use style::values::generics::flex::FlexBasis as GenericFlexBasis; use style::values::generics::flex::FlexBasis as GenericFlexBasis;
use crate::traversal::PreorderFlowTraversal;
/// The size of an axis. May be a specified size, a min/max /// The size of an axis. May be a specified size, a min/max
/// constraint, or an unlimited size /// constraint, or an unlimited size

View file

@ -30,18 +30,25 @@ use crate::block::{BlockFlow, FormattingContextType};
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use crate::display_list::items::ClippingAndScrolling; use crate::display_list::items::ClippingAndScrolling;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use crate::flex::FlexFlow; use crate::flex::FlexFlow;
use crate::floats::{Floats, SpeculatedFloatPlacement}; use crate::floats::{Floats, SpeculatedFloatPlacement};
use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator}; use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
use crate::flow_ref::{FlowRef, WeakFlowRef}; use crate::flow_ref::{FlowRef, WeakFlowRef};
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::StackingContextId;
use gfx_traits::print_tree::PrintTree;
use crate::inline::InlineFlow; use crate::inline::InlineFlow;
use crate::model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo}; use crate::model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
use crate::multicol::MulticolFlow; use crate::multicol::MulticolFlow;
use crate::parallel::FlowParallelInfo; use crate::parallel::FlowParallelInfo;
use crate::table::TableFlow;
use crate::table_caption::TableCaptionFlow;
use crate::table_cell::TableCellFlow;
use crate::table_colgroup::TableColGroupFlow;
use crate::table_row::TableRowFlow;
use crate::table_rowgroup::TableRowGroupFlow;
use crate::table_wrapper::TableWrapperFlow;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use gfx_traits::StackingContextId;
use gfx_traits::print_tree::PrintTree;
use serde::ser::{Serialize, SerializeStruct, Serializer}; use serde::ser::{Serialize, SerializeStruct, Serializer};
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect}; use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect};
use std::fmt; use std::fmt;
@ -60,13 +67,6 @@ use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage; use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::LengthOrPercentageOrAuto; use style::values::computed::LengthOrPercentageOrAuto;
use crate::table::TableFlow;
use crate::table_caption::TableCaptionFlow;
use crate::table_cell::TableCellFlow;
use crate::table_colgroup::TableColGroupFlow;
use crate::table_row::TableRowFlow;
use crate::table_rowgroup::TableRowGroupFlow;
use crate::table_wrapper::TableWrapperFlow;
use webrender_api::LayoutTransform; use webrender_api::LayoutTransform;
/// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field /// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field

View file

@ -4,27 +4,30 @@
//! The `Fragment` type, which represents the leaves of the layout tree. //! The `Fragment` type, which represents the leaves of the layout tree.
use crate::ServoArc;
use app_units::Au; use app_units::Au;
use canvas_traits::canvas::{CanvasMsg, CanvasId}; use canvas_traits::canvas::{CanvasMsg, CanvasId};
use crate::ServoArc;
use crate::context::{LayoutContext, with_thread_local_font_context}; use crate::context::{LayoutContext, with_thread_local_font_context};
use crate::display_list::ToLayout; use crate::display_list::ToLayout;
use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode}; use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
use euclid::{Point2D, Vector2D, Rect, Size2D};
use crate::floats::ClearType; use crate::floats::ClearType;
use crate::flow::{GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
use crate::flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use gfx;
use gfx::text::glyph::ByteIndex;
use gfx::text::text_run::{TextRun, TextRunSlice};
use gfx_traits::StackingContextId;
use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo}; use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
use crate::inline::{InlineMetrics, LineMetrics}; use crate::inline::{InlineMetrics, LineMetrics};
use ipc_channel::ipc::IpcSender;
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
use crate::layout_debug; use crate::layout_debug;
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint}; use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
use crate::model::style_length; use crate::model::style_length;
use crate::text;
use crate::text::TextRunScanner;
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use gfx;
use gfx::text::glyph::ByteIndex;
use gfx::text::text_run::{TextRun, TextRunSlice};
use gfx_traits::StackingContextId;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{BrowsingContextId, PipelineId}; use msg::constellation_msg::{BrowsingContextId, PipelineId};
use net_traits::image::base::{Image, ImageMetadata}; use net_traits::image::base::{Image, ImageMetadata};
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder}; use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
@ -60,10 +63,7 @@ use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAu
use style::values::computed::counters::ContentItem; use style::values::computed::counters::ContentItem;
use style::values::generics::box_::{Perspective, VerticalAlign}; use style::values::generics::box_::{Perspective, VerticalAlign};
use style::values::generics::transform; use style::values::generics::transform;
use crate::text;
use crate::text::TextRunScanner;
use webrender_api::{self, LayoutTransform}; use webrender_api::{self, LayoutTransform};
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
// From gfxFontConstants.h in Firefox. // From gfxFontConstants.h in Firefox.
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20; static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;

View file

@ -12,6 +12,8 @@ use crate::context::{LayoutContext, with_thread_local_font_context};
use crate::display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo}; use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use crate::text::TextRunScanner;
use crate::traversal::InorderFlowTraversal;
use script_layout_interface::wrapper_traits::PseudoElementType; use script_layout_interface::wrapper_traits::PseudoElementType;
use smallvec::SmallVec; use smallvec::SmallVec;
use std::collections::{HashMap, LinkedList}; use std::collections::{HashMap, LinkedList};
@ -21,8 +23,6 @@ use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage; use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::generics::counters::ContentItem; use style::values::generics::counters::ContentItem;
use crate::text::TextRunScanner;
use crate::traversal::InorderFlowTraversal;
// Decimal styles per CSS-COUNTER-STYLES § 6.1: // Decimal styles per CSS-COUNTER-STYLES § 6.1:
static DECIMAL: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; static DECIMAL: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];

View file

@ -2,14 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::ServoArc;
use app_units::{Au, MIN_AU}; use app_units::{Au, MIN_AU};
use crate::ServoArc;
use crate::block::AbsoluteAssignBSizesTraversal; use crate::block::AbsoluteAssignBSizesTraversal;
use crate::context::{LayoutContext, LayoutFontContext}; use crate::context::{LayoutContext, LayoutFontContext};
use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding}; use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
use crate::display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use crate::display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use euclid::{Point2D, Size2D};
use crate::floats::{FloatKind, Floats, PlacementInfo}; use crate::floats::{FloatKind, Floats, PlacementInfo};
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag}; use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow}; use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
@ -17,10 +16,13 @@ use crate::flow_ref::FlowRef;
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use crate::fragment::FragmentFlags; use crate::fragment::FragmentFlags;
use crate::fragment::SpecificFragmentInfo; use crate::fragment::SpecificFragmentInfo;
use gfx::font::FontMetrics;
use gfx_traits::print_tree::PrintTree;
use crate::layout_debug; use crate::layout_debug;
use crate::model::IntrinsicISizesContribution; use crate::model::IntrinsicISizesContribution;
use crate::text;
use crate::traversal::PreorderFlowTraversal;
use euclid::{Point2D, Size2D};
use gfx::font::FontMetrics;
use gfx_traits::print_tree::PrintTree;
use range::{Range, RangeIndex}; use range::{Range, RangeIndex};
use script_layout_interface::wrapper_traits::PseudoElementType; use script_layout_interface::wrapper_traits::PseudoElementType;
use std::{fmt, i32, isize, mem}; use std::{fmt, i32, isize, mem};
@ -39,8 +41,6 @@ use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::box_::VerticalAlign; use style::values::computed::box_::VerticalAlign;
use style::values::generics::box_::VerticalAlign as GenericVerticalAlign; use style::values::generics::box_::VerticalAlign as GenericVerticalAlign;
use style::values::specified::text::TextOverflowSide; use style::values::specified::text::TextOverflowSide;
use crate::text;
use crate::traversal::PreorderFlowTraversal;
use unicode_bidi as bidi; use unicode_bidi as bidi;
/// `Line`s are represented as offsets into the child list, rather than /// `Line`s are represented as offsets into the child list, rather than

View file

@ -10,13 +10,13 @@ use crate::block::BlockFlow;
use crate::context::{LayoutContext, with_thread_local_font_context}; use crate::context::{LayoutContext, with_thread_local_font_context};
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding}; use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
use crate::display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use euclid::Point2D;
use crate::floats::FloatKind; use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, OpaqueFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow};
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
use crate::fragment::Overflow; use crate::fragment::Overflow;
use crate::generated_content; use crate::generated_content;
use crate::inline::InlineFlow; use crate::inline::InlineFlow;
use euclid::Point2D;
use style::computed_values::list_style_type::T as ListStyleType; use style::computed_values::list_style_type::T as ListStyleType;
use style::computed_values::position::T as Position; use style::computed_values::position::T as Position;
use style::logical_geometry::LogicalSize; use style::logical_geometry::LogicalSize;

View file

@ -5,8 +5,8 @@
//! Borders, padding, and margins. //! Borders, padding, and margins.
use app_units::Au; use app_units::Au;
use euclid::SideOffsets2D;
use crate::fragment::Fragment; use crate::fragment::Fragment;
use euclid::SideOffsets2D;
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::fmt; use std::fmt;
use style::logical_geometry::{LogicalMargin, WritingMode}; use style::logical_geometry::{LogicalMargin, WritingMode};

View file

@ -4,15 +4,15 @@
//! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/ //! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/
use crate::ServoArc;
use app_units::Au; use app_units::Au;
use crate::ServoArc;
use crate::block::BlockFlow; use crate::block::BlockFlow;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use euclid::{Point2D, Vector2D};
use crate::floats::FloatKind; use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use euclid::{Point2D, Vector2D};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use std::cmp::{min, max}; use std::cmp::{min, max};
use std::fmt; use std::fmt;

View file

@ -12,6 +12,8 @@ use crate::block::BlockFlow;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::flow::{Flow, GetBaseFlow}; use crate::flow::{Flow, GetBaseFlow};
use crate::flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
use profile_traits::time::{self, TimerMetadata, profile}; use profile_traits::time::{self, TimerMetadata, profile};
use rayon; use rayon;
use servo_config::opts; use servo_config::opts;
@ -19,8 +21,6 @@ use smallvec::SmallVec;
use std::mem; use std::mem;
use std::ptr; use std::ptr;
use std::sync::atomic::{AtomicIsize, Ordering}; use std::sync::atomic::{AtomicIsize, Ordering};
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
/// Traversal chunk size. /// Traversal chunk size.
const CHUNK_SIZE: usize = 16; const CHUNK_SIZE: usize = 16;

View file

@ -9,13 +9,15 @@ use crate::construct::ConstructionResult;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::IndexableText; use crate::display_list::IndexableText;
use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap}; use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
use euclid::{Point2D, Vector2D, Rect, Size2D};
use crate::flow::{Flow, GetBaseFlow}; use crate::flow::{Flow, GetBaseFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use crate::inline::InlineFragmentNodeFlags; use crate::inline::InlineFragmentNodeFlags;
use crate::opaque_node::OpaqueNodeMethods;
use crate::sequential;
use crate::wrapper::LayoutNodeLayoutData;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::opaque_node::OpaqueNodeMethods;
use script_layout_interface::{LayoutElementType, LayoutNodeType}; use script_layout_interface::{LayoutElementType, LayoutNodeType};
use script_layout_interface::StyleData; use script_layout_interface::StyleData;
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC}; use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};
@ -25,7 +27,6 @@ use script_layout_interface::rpc::TextIndexResponse;
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode}; use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use script_traits::LayoutMsg as ConstellationMsg; use script_traits::LayoutMsg as ConstellationMsg;
use script_traits::UntrustedNodeAddress; use script_traits::UntrustedNodeAddress;
use crate::sequential;
use std::cmp::{min, max}; use std::cmp::{min, max};
use std::ops::Deref; use std::ops::Deref;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
@ -39,7 +40,6 @@ use style::properties::{style_structs, PropertyId, PropertyDeclarationId, Longha
use style::selector_parser::PseudoElement; use style::selector_parser::PseudoElement;
use style_traits::ToCss; use style_traits::ToCss;
use webrender_api::ExternalScrollId; use webrender_api::ExternalScrollId;
use crate::wrapper::LayoutNodeLayoutData;
/// Mutable data belonging to the LayoutThread. /// Mutable data belonging to the LayoutThread.
/// ///

View file

@ -7,16 +7,16 @@
use app_units::Au; use app_units::Au;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use euclid::{Point2D, Vector2D};
use crate::floats::SpeculatedFloatPlacement; use crate::floats::SpeculatedFloatPlacement;
use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow}; use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem}; use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem};
use crate::generated_content::ResolveGeneratedContent; use crate::generated_content::ResolveGeneratedContent;
use crate::incremental::RelayoutMode; use crate::incremental::RelayoutMode;
use servo_config::opts;
use style::servo::restyle_damage::ServoRestyleDamage;
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList}; use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal}; use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal};
use euclid::{Point2D, Vector2D};
use servo_config::opts;
use style::servo::restyle_damage::ServoRestyleDamage;
use webrender_api::LayoutPoint; use webrender_api::LayoutPoint;
pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext) { pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext) {

View file

@ -10,13 +10,17 @@ use crate::block::{ISizeConstraintInput, ISizeConstraintSolution};
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode}; use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D;
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow}; use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
use crate::flow_list::{FlowListIterator, MutFlowListIterator}; use crate::flow_list::{FlowListIterator, MutFlowListIterator};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use crate::layout_debug; use crate::layout_debug;
use crate::model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto}; use crate::model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
use crate::table_cell::TableCellFlow;
use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use crate::table_row::{TableRowFlow, TableRowSizeData};
use crate::table_wrapper::TableLayout;
use euclid::Point2D;
use gfx_traits::print_tree::PrintTree;
use std::{cmp, fmt}; use std::{cmp, fmt};
use style::computed_values::{border_collapse, border_spacing, table_layout}; use style::computed_values::{border_collapse, border_spacing, table_layout};
use style::context::SharedStyleContext; use style::context::SharedStyleContext;
@ -26,10 +30,6 @@ use style::properties::style_structs::Background;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::CSSFloat; use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto; use style::values::computed::LengthOrPercentageOrAuto;
use crate::table_cell::TableCellFlow;
use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use crate::table_row::{TableRowFlow, TableRowSizeData};
use crate::table_wrapper::TableLayout;
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for TableFlow {} unsafe impl crate::flow::HasBaseFlow for TableFlow {}

View file

@ -9,9 +9,9 @@ use crate::block::BlockFlow;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D;
use crate::flow::{Flow, FlowClass, OpaqueFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use euclid::Point2D;
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use std::fmt; use std::fmt;
use style::logical_geometry::LogicalSize; use style::logical_geometry::LogicalSize;

View file

@ -9,12 +9,14 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow}; use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use crate::layout_debug; use crate::layout_debug;
use crate::model::MaybeAuto; use crate::model::MaybeAuto;
use crate::table::InternalTable;
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use gfx_traits::print_tree::PrintTree;
use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode; use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
use std::fmt; use std::fmt;
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode}; use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
@ -22,8 +24,6 @@ use style::properties::ComputedValues;
use style::values::computed::Color; use style::values::computed::Color;
use style::values::generics::box_::VerticalAlign; use style::values::generics::box_::VerticalAlign;
use style::values::specified::BorderStyle; use style::values::specified::BorderStyle;
use crate::table::InternalTable;
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for TableCellFlow {} unsafe impl crate::flow::HasBaseFlow for TableCellFlow {}

View file

@ -7,10 +7,10 @@
use app_units::Au; use app_units::Au;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use euclid::Point2D;
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow}; use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::layout_debug; use crate::layout_debug;
use euclid::Point2D;
use std::fmt; use std::fmt;
use style::logical_geometry::LogicalSize; use style::logical_geometry::LogicalSize;
use style::properties::ComputedValues; use style::properties::ComputedValues;

View file

@ -9,13 +9,15 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer};
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D;
use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow}; use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
use crate::flow_list::MutFlowListIterator; use crate::flow_list::MutFlowListIterator;
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use crate::layout_debug; use crate::layout_debug;
use crate::model::MaybeAuto; use crate::model::MaybeAuto;
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
use euclid::Point2D;
use gfx_traits::print_tree::PrintTree;
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use std::cmp::max; use std::cmp::max;
use std::fmt; use std::fmt;
@ -26,8 +28,6 @@ use style::computed_values::border_top_style::T as BorderStyle;
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode}; use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
use style::properties::ComputedValues; use style::properties::ComputedValues;
use style::values::computed::{Color, LengthOrPercentageOrAuto}; use style::values::computed::{Color, LengthOrPercentageOrAuto};
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for TableRowFlow {} unsafe impl crate::flow::HasBaseFlow for TableRowFlow {}

View file

@ -9,18 +9,18 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer};
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D;
use crate::flow::{Flow, FlowClass, OpaqueFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use crate::layout_debug; use crate::layout_debug;
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
use euclid::Point2D;
use gfx_traits::print_tree::PrintTree;
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use std::fmt; use std::fmt;
use std::iter::{IntoIterator, Iterator, Peekable}; use std::iter::{IntoIterator, Iterator, Peekable};
use style::computed_values::{border_collapse, border_spacing}; use style::computed_values::{border_collapse, border_spacing};
use style::logical_geometry::LogicalSize; use style::logical_geometry::LogicalSize;
use style::properties::ComputedValues; use style::properties::ComputedValues;
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for TableRowGroupFlow {} unsafe impl crate::flow::HasBaseFlow for TableRowGroupFlow {}

View file

@ -17,12 +17,13 @@ use crate::block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags};
use crate::display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use euclid::Point2D;
use crate::floats::FloatKind; use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow}; use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use crate::model::MaybeAuto; use crate::model::MaybeAuto;
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
use euclid::Point2D;
use gfx_traits::print_tree::PrintTree;
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::fmt; use std::fmt;
use std::ops::Add; use std::ops::Add;
@ -32,7 +33,6 @@ use style::logical_geometry::{LogicalRect, LogicalSize};
use style::properties::ComputedValues; use style::properties::ComputedValues;
use style::values::CSSFloat; use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto; use style::values::computed::LengthOrPercentageOrAuto;
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
#[derive(Clone, Copy, Debug, Serialize)] #[derive(Clone, Copy, Debug, Serialize)]
pub enum TableLayout { pub enum TableLayout {

View file

@ -8,12 +8,12 @@ use app_units::Au;
use crate::context::LayoutFontContext; use crate::context::LayoutFontContext;
use crate::fragment::{Fragment, ScannedTextFlags}; use crate::fragment::{Fragment, ScannedTextFlags};
use crate::fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo}; use crate::fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
use crate::linked_list::split_off_head;
use gfx::font::{FontRef, FontMetrics, RunMetrics, ShapingFlags, ShapingOptions}; use gfx::font::{FontRef, FontMetrics, RunMetrics, ShapingFlags, ShapingOptions};
use gfx::text::glyph::ByteIndex; use gfx::text::glyph::ByteIndex;
use gfx::text::text_run::TextRun; use gfx::text::text_run::TextRun;
use gfx::text::util::{self, CompressionMode}; use gfx::text::util::{self, CompressionMode};
use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
use crate::linked_list::split_off_head;
use ordered_float::NotNan; use ordered_float::NotNan;
use range::Range; use range::Range;
use servo_atoms::Atom; use servo_atoms::Atom;

View file

@ -8,6 +8,8 @@ use crate::construct::FlowConstructor;
use crate::context::LayoutContext; use crate::context::LayoutContext;
use crate::display_list::DisplayListBuildState; use crate::display_list::DisplayListBuildState;
use crate::flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils};
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode}; use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
use servo_config::opts; use servo_config::opts;
use style::context::{SharedStyleContext, StyleContext}; use style::context::{SharedStyleContext, StyleContext};
@ -17,8 +19,6 @@ use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use style::traversal::{DomTraversal, recalc_style_at}; use style::traversal::{DomTraversal, recalc_style_at};
use style::traversal::PerLevelTraversalData; use style::traversal::PerLevelTraversalData;
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
pub struct RecalcStyleAndConstructFlows<'a> { pub struct RecalcStyleAndConstructFlows<'a> {
context: LayoutContext<'a>, context: LayoutContext<'a>,

View file

@ -4,11 +4,12 @@
use crate::blob_loader::load_blob_sync; use crate::blob_loader::load_blob_sync;
use crate::data_loader::decode; use crate::data_loader::decode;
use devtools_traits::DevtoolsControlMsg;
use crate::fetch::cors_cache::CorsCache; use crate::fetch::cors_cache::CorsCache;
use crate::filemanager_thread::FileManager; use crate::filemanager_thread::FileManager;
use crate::http_loader::{HttpState, determine_request_referrer, http_fetch}; use crate::http_loader::{HttpState, determine_request_referrer, http_fetch};
use crate::http_loader::{set_default_accept, set_default_accept_language}; use crate::http_loader::{set_default_accept, set_default_accept_language};
use crate::subresource_integrity::is_response_integrity_valid;
use devtools_traits::DevtoolsControlMsg;
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{AccessControlExposeHeaders, ContentType, Range}; use headers_ext::{AccessControlExposeHeaders, ContentType, Range};
use http::header::{self, HeaderMap, HeaderName, HeaderValue}; use http::header::{self, HeaderMap, HeaderName, HeaderValue};
@ -32,7 +33,6 @@ use std::str;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
use std::thread; use std::thread;
use crate::subresource_integrity::is_response_integrity_valid;
lazy_static! { lazy_static! {
static ref X_CONTENT_TYPE_OPTIONS: HeaderName = static ref X_CONTENT_TYPE_OPTIONS: HeaderName =

View file

@ -7,14 +7,15 @@ use bytes::Bytes;
use crate::connector::{BUF_SIZE, Connector, create_http_client, WrappedBody}; use crate::connector::{BUF_SIZE, Connector, create_http_client, WrappedBody};
use crate::cookie; use crate::cookie;
use crate::cookie_storage::CookieStorage; use crate::cookie_storage::CookieStorage;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
use devtools_traits::{HttpResponse as DevtoolsHttpResponse, NetworkEvent};
use crate::fetch::cors_cache::CorsCache; use crate::fetch::cors_cache::CorsCache;
use crate::fetch::methods::{Data, DoneChannel, FetchContext, Target}; use crate::fetch::methods::{Data, DoneChannel, FetchContext, Target};
use crate::fetch::methods::{is_cors_safelisted_request_header, is_cors_safelisted_method, main_fetch}; use crate::fetch::methods::{is_cors_safelisted_request_header, is_cors_safelisted_method, main_fetch};
use flate2::read::{DeflateDecoder, GzDecoder};
use crate::hsts::HstsList; use crate::hsts::HstsList;
use crate::http_cache::HttpCache; use crate::http_cache::HttpCache;
use crate::resource_thread::AuthCache;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
use devtools_traits::{HttpResponse as DevtoolsHttpResponse, NetworkEvent};
use flate2::read::{DeflateDecoder, GzDecoder};
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{AccessControlAllowCredentials, AccessControlAllowHeaders}; use headers_ext::{AccessControlAllowCredentials, AccessControlAllowHeaders};
use headers_ext::{AccessControlAllowMethods, AccessControlRequestHeaders, AccessControlRequestMethod, Authorization}; use headers_ext::{AccessControlAllowMethods, AccessControlRequestHeaders, AccessControlRequestMethod, Authorization};
@ -36,7 +37,6 @@ use net_traits::request::{RedirectMode, Referrer, Request, RequestMode};
use net_traits::request::{ResponseTainting, ServiceWorkersMode}; use net_traits::request::{ResponseTainting, ServiceWorkersMode};
use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType}; use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType};
use openssl::ssl::SslConnectorBuilder; use openssl::ssl::SslConnectorBuilder;
use crate::resource_thread::AuthCache;
use servo_channel::{channel, Sender}; use servo_channel::{channel, Sender};
use servo_url::{ImmutableOrigin, ServoUrl}; use servo_url::{ImmutableOrigin, ServoUrl};
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};

View file

@ -7,15 +7,17 @@ use crate::connector::{create_http_client, create_ssl_connector_builder};
use crate::cookie; use crate::cookie;
use crate::cookie_rs; use crate::cookie_rs;
use crate::cookie_storage::CookieStorage; use crate::cookie_storage::CookieStorage;
use devtools_traits::DevtoolsControlMsg;
use embedder_traits::EmbedderProxy;
use embedder_traits::resources::{self, Resource};
use crate::fetch::cors_cache::CorsCache; use crate::fetch::cors_cache::CorsCache;
use crate::fetch::methods::{CancellationListener, FetchContext, fetch}; use crate::fetch::methods::{CancellationListener, FetchContext, fetch};
use crate::filemanager_thread::FileManager; use crate::filemanager_thread::FileManager;
use crate::hsts::HstsList; use crate::hsts::HstsList;
use crate::http_cache::HttpCache; use crate::http_cache::HttpCache;
use crate::http_loader::{HANDLE, HttpState, http_redirect_fetch}; use crate::http_loader::{HANDLE, HttpState, http_redirect_fetch};
use crate::storage_thread::StorageThreadFactory;
use crate::websocket_loader;
use devtools_traits::DevtoolsControlMsg;
use embedder_traits::EmbedderProxy;
use embedder_traits::resources::{self, Resource};
use hyper_serde::Serde; use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcReceiver, IpcReceiverSet, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcReceiverSet, IpcSender};
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
@ -44,8 +46,6 @@ use std::ops::Deref;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex, RwLock}; use std::sync::{Arc, Mutex, RwLock};
use std::thread; use std::thread;
use crate::storage_thread::StorageThreadFactory;
use crate::websocket_loader;
/// Returns a tuple of (public, private) senders to the new threads. /// Returns a tuple of (public, private) senders to the new threads.
pub fn new_resource_threads( pub fn new_resource_threads(

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::resource_thread;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use net_traits::storage_thread::{StorageThreadMsg, StorageType}; use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use crate::resource_thread;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::collections::BTreeMap; use std::collections::BTreeMap;

View file

@ -3,10 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::{DEFAULT_USER_AGENT, new_fetch_context, create_embedder_proxy, fetch, make_server, make_ssl_server}; use crate::{DEFAULT_USER_AGENT, new_fetch_context, create_embedder_proxy, fetch, make_server, make_ssl_server};
use devtools_traits::HttpRequest as DevtoolsHttpRequest;
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
use crate::fetch_with_context; use crate::fetch_with_context;
use crate::fetch_with_cors_cache; use crate::fetch_with_cors_cache;
use crate::http_loader::{expect_devtools_http_request, expect_devtools_http_response};
use devtools_traits::HttpRequest as DevtoolsHttpRequest;
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{AccessControlAllowCredentials, AccessControlAllowHeaders, AccessControlAllowOrigin}; use headers_ext::{AccessControlAllowCredentials, AccessControlAllowHeaders, AccessControlAllowOrigin};
use headers_ext::{AccessControlAllowMethods, AccessControlMaxAge}; use headers_ext::{AccessControlAllowMethods, AccessControlMaxAge};
@ -14,7 +15,6 @@ use headers_ext::{CacheControl, ContentLength, ContentType, Expires, Host, LastM
use http::{Method, StatusCode}; use http::{Method, StatusCode};
use http::header::{self, HeaderMap, HeaderName, HeaderValue}; use http::header::{self, HeaderMap, HeaderName, HeaderValue};
use http::uri::Authority; use http::uri::Authority;
use crate::http_loader::{expect_devtools_http_request, expect_devtools_http_response};
use hyper::{Request as HyperRequest, Response as HyperResponse}; use hyper::{Request as HyperRequest, Response as HyperResponse};
use hyper::body::Body; use hyper::body::Body;
use mime::{self, Mime}; use mime::{self, Mime};

View file

@ -3,11 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::cookie_rs::Cookie as CookiePair; use crate::cookie_rs::Cookie as CookiePair;
use crate::fetch;
use crate::fetch_with_context;
use crate::make_server;
use crate::new_fetch_context;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent}; use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent};
use devtools_traits::HttpRequest as DevtoolsHttpRequest; use devtools_traits::HttpRequest as DevtoolsHttpRequest;
use devtools_traits::HttpResponse as DevtoolsHttpResponse; use devtools_traits::HttpResponse as DevtoolsHttpResponse;
use crate::fetch;
use crate::fetch_with_context;
use flate2::Compression; use flate2::Compression;
use flate2::write::{DeflateEncoder, GzEncoder}; use flate2::write::{DeflateEncoder, GzEncoder};
use futures::{self, Future, Stream}; use futures::{self, Future, Stream};
@ -19,7 +21,6 @@ use http::header::{self, HeaderMap, HeaderValue};
use http::uri::Authority; use http::uri::Authority;
use hyper::{Request as HyperRequest, Response as HyperResponse}; use hyper::{Request as HyperRequest, Response as HyperResponse};
use hyper::body::Body; use hyper::body::Body;
use crate::make_server;
use msg::constellation_msg::TEST_PIPELINE_ID; use msg::constellation_msg::TEST_PIPELINE_ID;
use net::cookie::Cookie; use net::cookie::Cookie;
use net::cookie_storage::CookieStorage; use net::cookie_storage::CookieStorage;
@ -28,7 +29,6 @@ use net::test::replace_host_table;
use net_traits::{CookieSource, NetworkError}; use net_traits::{CookieSource, NetworkError};
use net_traits::request::{Request, RequestInit, RequestMode, CredentialsMode, Destination}; use net_traits::request::{Request, RequestInit, RequestMode, CredentialsMode, Destination};
use net_traits::response::ResponseBody; use net_traits::response::ResponseBody;
use crate::new_fetch_context;
use servo_channel::{channel, Receiver}; use servo_channel::{channel, Receiver};
use servo_url::{ServoUrl, ImmutableOrigin}; use servo_url::{ServoUrl, ImmutableOrigin};
use std::collections::HashMap; use std::collections::HashMap;

View file

@ -4,11 +4,11 @@
use crate::connector::create_ssl_connector_builder; use crate::connector::create_ssl_connector_builder;
use crate::cookie::Cookie; use crate::cookie::Cookie;
use embedder_traits::resources::{self, Resource};
use crate::fetch::methods::should_be_blocked_due_to_bad_port; use crate::fetch::methods::should_be_blocked_due_to_bad_port;
use headers_ext::Host;
use crate::hosts::replace_host; use crate::hosts::replace_host;
use crate::http_loader::HttpState; use crate::http_loader::HttpState;
use embedder_traits::resources::{self, Resource};
use headers_ext::Host;
use http::header::{self, HeaderMap, HeaderName, HeaderValue}; use http::header::{self, HeaderMap, HeaderName, HeaderValue};
use http::uri::Authority; use http::uri::Authority;
use ipc_channel::ipc::{IpcReceiver, IpcSender}; use ipc_channel::ipc::{IpcReceiver, IpcSender};

View file

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use ipc_channel::ipc::IpcSharedMemory;
use crate::piston_image::{self, DynamicImage, ImageFormat}; use crate::piston_image::{self, DynamicImage, ImageFormat};
use ipc_channel::ipc::IpcSharedMemory;
use pixels; use pixels;
use std::fmt; use std::fmt;
use webrender_api; use webrender_api;

View file

@ -36,6 +36,9 @@ extern crate webrender_api;
use crate::cookie_rs::Cookie; use crate::cookie_rs::Cookie;
use crate::filemanager_thread::FileManagerThreadMsg; use crate::filemanager_thread::FileManagerThreadMsg;
use crate::request::{Request, RequestInit};
use crate::response::{HttpsState, Response, ResponseInit};
use crate::storage_thread::StorageThreadMsg;
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{ContentType, ReferrerPolicy as ReferrerPolicyHeader}; use headers_ext::{ContentType, ReferrerPolicy as ReferrerPolicyHeader};
use http::{Error as HttpError, HeaderMap}; use http::{Error as HttpError, HeaderMap};
@ -47,11 +50,8 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use mime::Mime; use mime::Mime;
use msg::constellation_msg::HistoryStateId; use msg::constellation_msg::HistoryStateId;
use crate::request::{Request, RequestInit};
use crate::response::{HttpsState, Response, ResponseInit};
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::error::Error; use std::error::Error;
use crate::storage_thread::StorageThreadMsg;
use url::percent_encoding; use url::percent_encoding;
pub mod blob_url_store; pub mod blob_url_store;

View file

@ -4,6 +4,7 @@
//! Memory profiling functions. //! Memory profiling functions.
use crate::time::duration_from_seconds;
use ipc_channel::ipc::{self, IpcReceiver}; use ipc_channel::ipc::{self, IpcReceiver};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use profile_traits::mem::{ProfilerChan, ProfilerMsg, ReportKind, Reporter, ReporterRequest}; use profile_traits::mem::{ProfilerChan, ProfilerMsg, ReportKind, Reporter, ReporterRequest};
@ -13,7 +14,6 @@ use std::cmp::Ordering;
use std::collections::HashMap; use std::collections::HashMap;
use std::thread; use std::thread;
use std::time::Instant; use std::time::Instant;
use crate::time::duration_from_seconds;
pub struct Profiler { pub struct Profiler {
/// The port through which messages are received. /// The port through which messages are received.

View file

@ -5,6 +5,8 @@
//! Timing functions. //! Timing functions.
use crate::heartbeats; use crate::heartbeats;
use crate::std_time::precise_time_ns;
use crate::trace_dump::TraceDump;
use influent::client::{Client, Credentials}; use influent::client::{Client, Credentials};
use influent::create_client; use influent::create_client;
use influent::measurement::{Measurement, Value}; use influent::measurement::{Measurement, Value};
@ -22,8 +24,6 @@ use std::fs::File;
use std::io::{self, Write}; use std::io::{self, Write};
use std::path::Path; use std::path::Path;
use std::time::Duration; use std::time::Duration;
use crate::std_time::precise_time_ns;
use crate::trace_dump::TraceDump;
use tokio; use tokio;
use tokio::prelude::Future; use tokio::prelude::Future;

View file

@ -3,12 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bincode; use bincode;
use ipc_channel::ipc;
use serde::{Deserialize, Serialize};
use std::io::Error;
use crate::time; use crate::time;
use crate::time::ProfilerCategory; use crate::time::ProfilerCategory;
use crate::time::ProfilerChan; use crate::time::ProfilerChan;
use ipc_channel::ipc;
use serde::{Deserialize, Serialize};
use std::io::Error;
pub struct IpcReceiver<T> pub struct IpcReceiver<T>
where where

View file

@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{AutoMargins, CachedConsoleMessage, CachedConsoleMessageTypes};
use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError};
use devtools_traits::{EvaluateJSReply, Modification, NodeInfo, TimelineMarker};
use devtools_traits::TimelineMarkerType;
use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods; use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods;
use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods; use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
@ -21,12 +17,16 @@ use crate::dom::element::Element;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::node::{Node, window_from_node}; use crate::dom::node::{Node, window_from_node};
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::script_thread::Documents;
use devtools_traits::{AutoMargins, CachedConsoleMessage, CachedConsoleMessageTypes};
use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError};
use devtools_traits::{EvaluateJSReply, Modification, NodeInfo, TimelineMarker};
use devtools_traits::TimelineMarkerType;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use js::jsapi::JSAutoCompartment; use js::jsapi::JSAutoCompartment;
use js::jsval::UndefinedValue; use js::jsval::UndefinedValue;
use js::rust::wrappers::ObjectClassName; use js::rust::wrappers::ObjectClassName;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use crate::script_thread::Documents;
use std::ffi::CStr; use std::ffi::CStr;
use std::str; use std::str;
use style::properties::longhands::{margin_bottom, margin_left, margin_right, margin_top}; use style::properties::longhands::{margin_bottom, margin_left, margin_right, margin_top};

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::DevtoolScriptControlMsg;
use crate::dom::abstractworker::WorkerScriptMsg; use crate::dom::abstractworker::WorkerScriptMsg;
use crate::dom::bindings::conversions::DerivedFrom; use crate::dom::bindings::conversions::DerivedFrom;
use crate::dom::bindings::reflector::DomObject; use crate::dom::bindings::reflector::DomObject;
@ -11,8 +10,9 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::worker::TrustedWorkerAddress; use crate::dom::worker::TrustedWorkerAddress;
use crate::dom::workerglobalscope::WorkerGlobalScope; use crate::dom::workerglobalscope::WorkerGlobalScope;
use crate::script_runtime::{ScriptChan, CommonScriptMsg, ScriptPort}; use crate::script_runtime::{ScriptChan, CommonScriptMsg, ScriptPort};
use servo_channel::{Receiver, Sender};
use crate::task_queue::{QueuedTaskConversion, TaskQueue}; use crate::task_queue::{QueuedTaskConversion, TaskQueue};
use devtools_traits::DevtoolScriptControlMsg;
use servo_channel::{Receiver, Sender};
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with /// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
/// common event loop messages. While this SendableWorkerScriptChan is alive, the associated /// common event loop messages. While this SendableWorkerScriptChan is alive, the associated

View file

@ -13,6 +13,7 @@ use crate::dom::bindings::refcounted::Trusted;
use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::reflector::reflect_dom_object;
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::task_source::{TaskSource, TaskSourceName};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcReceiver}; use ipc_channel::ipc::{self, IpcReceiver};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
@ -21,7 +22,6 @@ use js::typedarray::{Float32Array, Uint8Array};
use servo_media::audio::analyser_node::AnalysisEngine; use servo_media::audio::analyser_node::AnalysisEngine;
use servo_media::audio::block::Block; use servo_media::audio::block::Block;
use servo_media::audio::node::AudioNodeInit; use servo_media::audio::node::AudioNodeInit;
use crate::task_source::{TaskSource, TaskSourceName};
#[dom_struct] #[dom_struct]
pub struct AnalyserNode { pub struct AnalyserNode {

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::AttrInfo;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods}; use crate::dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::inheritance::Castable;
@ -15,9 +14,10 @@ use crate::dom::mutationobserver::{Mutation, MutationObserver};
use crate::dom::node::Node; use crate::dom::node::Node;
use crate::dom::virtualmethods::vtable_for; use crate::dom::virtualmethods::vtable_for;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::script_thread::ScriptThread;
use devtools_traits::AttrInfo;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{Prefix, LocalName, Namespace}; use html5ever::{Prefix, LocalName, Namespace};
use crate::script_thread::ScriptThread;
use servo_atoms::Atom; use servo_atoms::Atom;
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::cell::Ref; use std::cell::Ref;

View file

@ -16,10 +16,10 @@ use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::promise::Promise; use crate::dom::promise::Promise;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions}; use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions};
use std::rc::Rc; use std::rc::Rc;
use crate::task_source::TaskSource;
#[dom_struct] #[dom_struct]
pub struct AudioContext { pub struct AudioContext {

View file

@ -1,6 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::dom::audionode::{AudioNode, UnwrappedAudioNodeOptions}; use crate::dom::audionode::{AudioNode, UnwrappedAudioNodeOptions};
use crate::dom::baseaudiocontext::BaseAudioContext; use crate::dom::baseaudiocontext::BaseAudioContext;
use crate::dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods; use crate::dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
@ -9,11 +10,11 @@ use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::num::Finite; use crate::dom::bindings::num::Finite;
use crate::dom::bindings::refcounted::Trusted; use crate::dom::bindings::refcounted::Trusted;
use crate::dom::bindings::reflector::DomObject; use crate::dom::bindings::reflector::DomObject;
use crate::task_source::{TaskSource, TaskSourceName};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_media::audio::node::{AudioNodeMessage, AudioNodeInit, AudioScheduledSourceNodeMessage}; use servo_media::audio::node::{AudioNodeMessage, AudioNodeInit, AudioScheduledSourceNodeMessage};
use servo_media::audio::node::OnEndedCallback; use servo_media::audio::node::OnEndedCallback;
use std::cell::Cell; use std::cell::Cell;
use crate::task_source::{TaskSource, TaskSourceName};
#[dom_struct] #[dom_struct]
pub struct AudioScheduledSourceNode { pub struct AudioScheduledSourceNode {

View file

@ -38,6 +38,7 @@ use crate::dom::oscillatornode::OscillatorNode;
use crate::dom::pannernode::PannerNode; use crate::dom::pannernode::PannerNode;
use crate::dom::promise::Promise; use crate::dom::promise::Promise;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::task_source::{TaskSource, TaskSourceName};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use js::rust::CustomAutoRooterGuard; use js::rust::CustomAutoRooterGuard;
use js::typedarray::ArrayBuffer; use js::typedarray::ArrayBuffer;
@ -51,7 +52,6 @@ use std::collections::{HashMap, VecDeque};
use std::mem; use std::mem;
use std::rc::Rc; use std::rc::Rc;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use crate::task_source::{TaskSource, TaskSourceName};
use uuid::Uuid; use uuid::Uuid;
#[allow(dead_code)] #[allow(dead_code)]

View file

@ -7,7 +7,7 @@
#[cfg(feature = "js_backtrace")] #[cfg(feature = "js_backtrace")]
use backtrace::Backtrace; use backtrace::Backtrace;
#[cfg(feature = "js_backtrace")] #[cfg(feature = "js_backtrace")]
use dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods; use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
use crate::dom::bindings::codegen::PrototypeList::proto_id_to_name; use crate::dom::bindings::codegen::PrototypeList::proto_id_to_name;
use crate::dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible}; use crate::dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};

View file

@ -76,6 +76,7 @@ use crate::dom::customelementregistry::ConstructionStackEntry;
use crate::dom::element::{CustomElementState, Element, ElementCreator}; use crate::dom::element::{CustomElementState, Element, ElementCreator};
use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlelement::HTMLElement;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::script_thread::ScriptThread;
use html5ever::LocalName; use html5ever::LocalName;
use html5ever::interface::QualName; use html5ever::interface::QualName;
use js::glue::UnwrapObject; use js::glue::UnwrapObject;
@ -83,7 +84,6 @@ use js::jsapi::{CallArgs, CurrentGlobalOrNull};
use js::jsapi::{JSAutoCompartment, JSContext, JSObject}; use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
use js::rust::HandleObject; use js::rust::HandleObject;
use js::rust::MutableHandleObject; use js::rust::MutableHandleObject;
use crate::script_thread::ScriptThread;
use std::ptr; use std::ptr;
// https://html.spec.whatwg.org/multipage/#htmlconstructor // https://html.spec.whatwg.org/multipage/#htmlconstructor

View file

@ -28,6 +28,7 @@ use crate::dom::bindings::reflector::{DomObject, Reflector};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::trace::trace_reflector; use crate::dom::bindings::trace::trace_reflector;
use crate::dom::promise::Promise; use crate::dom::promise::Promise;
use crate::task::TaskOnce;
use js::jsapi::JSTracer; use js::jsapi::JSTracer;
use libc; use libc;
use std::cell::RefCell; use std::cell::RefCell;
@ -37,7 +38,6 @@ use std::hash::Hash;
use std::marker::PhantomData; use std::marker::PhantomData;
use std::rc::Rc; use std::rc::Rc;
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};
use crate::task::TaskOnce;
#[allow(missing_docs)] // FIXME #[allow(missing_docs)] // FIXME
mod dummy { mod dummy {

View file

@ -37,8 +37,6 @@ use canvas_traits::webgl::{WebGLContextShareMode, WebGLError, WebGLFramebufferId
use canvas_traits::webgl::{WebGLPipeline, WebGLProgramId, WebGLReceiver, WebGLRenderbufferId}; use canvas_traits::webgl::{WebGLPipeline, WebGLProgramId, WebGLReceiver, WebGLRenderbufferId};
use canvas_traits::webgl::{WebGLSLVersion, WebGLSender, WebGLShaderId, WebGLTextureId}; use canvas_traits::webgl::{WebGLSLVersion, WebGLSender, WebGLShaderId, WebGLTextureId};
use canvas_traits::webgl::{WebGLVersion, WebGLVertexArrayId}; use canvas_traits::webgl::{WebGLVersion, WebGLVertexArrayId};
use cssparser::RGBA;
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::error::Error; use crate::dom::bindings::error::Error;
use crate::dom::bindings::refcounted::{Trusted, TrustedPromise}; use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
@ -49,6 +47,8 @@ use crate::dom::bindings::utils::WindowProxyHandler;
use crate::dom::document::PendingRestyle; use crate::dom::document::PendingRestyle;
use crate::dom::htmlimageelement::SourceSet; use crate::dom::htmlimageelement::SourceSet;
use crate::dom::htmlmediaelement::MediaFrameRenderer; use crate::dom::htmlmediaelement::MediaFrameRenderer;
use cssparser::RGBA;
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
use encoding_rs::{Decoder, Encoding}; use encoding_rs::{Decoder, Encoding};
use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, TypedScale}; use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, TypedScale};
use euclid::Length as EuclidLength; use euclid::Length as EuclidLength;

View file

@ -8,8 +8,9 @@ use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence}; use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence}; use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit, BluetoothLEScanFilterInit}; use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit};
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions}; use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions};
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::BluetoothLEScanFilterInit;
use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionDescriptor; use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionDescriptor;
use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding:: use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding::
BluetoothRemoteGATTServerMethods; BluetoothRemoteGATTServerMethods;
@ -28,6 +29,7 @@ use crate::dom::eventtarget::EventTarget;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::permissions::{get_descriptor_permission_state, PermissionAlgorithm}; use crate::dom::permissions::{get_descriptor_permission_state, PermissionAlgorithm};
use crate::dom::promise::Promise; use crate::dom::promise::Promise;
use crate::task::TaskOnce;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
@ -40,7 +42,6 @@ use std::collections::HashMap;
use std::rc::Rc; use std::rc::Rc;
use std::str::FromStr; use std::str::FromStr;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use crate::task::TaskOnce;
const KEY_CONVERSION_ERROR: &'static str = const KEY_CONVERSION_ERROR: &'static str =
"This `manufacturerData` key can not be parsed as unsigned short:"; "This `manufacturerData` key can not be parsed as unsigned short:";

View file

@ -3,8 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::canvas::{CanvasGradientStop, FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle}; use canvas_traits::canvas::{CanvasGradientStop, FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle};
use cssparser::{Parser, ParserInput, RGBA};
use cssparser::Color as CSSColor;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding; use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding;
use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods; use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods;
@ -14,6 +12,8 @@ use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString; use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use cssparser::{Parser, ParserInput, RGBA};
use cssparser::Color as CSSColor;
use dom_struct::dom_struct; use dom_struct::dom_struct;
// https://html.spec.whatwg.org/multipage/#canvasgradient // https://html.spec.whatwg.org/multipage/#canvasgradient

View file

@ -6,8 +6,6 @@ use canvas_traits::canvas::{Canvas2dMsg, CanvasMsg, CanvasId};
use canvas_traits::canvas::{CompositionOrBlending, FillOrStrokeStyle, FillRule}; use canvas_traits::canvas::{CompositionOrBlending, FillOrStrokeStyle, FillRule};
use canvas_traits::canvas::{LineCapStyle, LineJoinStyle, LinearGradientStyle}; use canvas_traits::canvas::{LineCapStyle, LineJoinStyle, LinearGradientStyle};
use canvas_traits::canvas::{RadialGradientStyle, RepetitionStyle}; use canvas_traits::canvas::{RadialGradientStyle, RepetitionStyle};
use cssparser::{Parser, ParserInput, RGBA};
use cssparser::Color as CSSColor;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding;
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule;
@ -30,6 +28,9 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement}; use crate::dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement};
use crate::dom::imagedata::ImageData; use crate::dom::imagedata::ImageData;
use crate::dom::node::{Node, NodeDamage, window_from_node}; use crate::dom::node::{Node, NodeDamage, window_from_node};
use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
use cssparser::{Parser, ParserInput, RGBA};
use cssparser::Color as CSSColor;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use euclid::{Transform2D, Point2D, Rect, Size2D, vec2}; use euclid::{Transform2D, Point2D, Rect, Size2D, vec2};
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
@ -48,7 +49,6 @@ use std::{fmt, mem};
use std::cell::Cell; use std::cell::Cell;
use std::str::FromStr; use std::str::FromStr;
use std::sync::Arc; use std::sync::Arc;
use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
#[must_root] #[must_root]
#[derive(Clone, JSTraceable, MallocSizeOf)] #[derive(Clone, JSTraceable, MallocSizeOf)]

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{ConsoleMessage, LogLevel, ScriptToDevtoolsControlMsg};
use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::str::DOMString; use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::workerglobalscope::WorkerGlobalScope; use crate::dom::workerglobalscope::WorkerGlobalScope;
use devtools_traits::{ConsoleMessage, LogLevel, ScriptToDevtoolsControlMsg};
use std::io; use std::io;
// https://developer.mozilla.org/en-US/docs/Web/API/Console // https://developer.mozilla.org/en-US/docs/Web/API/Console

View file

@ -78,9 +78,9 @@ use crate::dom::htmlulistelement::HTMLUListElement;
use crate::dom::htmlunknownelement::HTMLUnknownElement; use crate::dom::htmlunknownelement::HTMLUnknownElement;
use crate::dom::htmlvideoelement::HTMLVideoElement; use crate::dom::htmlvideoelement::HTMLVideoElement;
use crate::dom::svgsvgelement::SVGSVGElement; use crate::dom::svgsvgelement::SVGSVGElement;
use crate::script_thread::ScriptThread;
use html5ever::{LocalName, Prefix, QualName}; use html5ever::{LocalName, Prefix, QualName};
use js::jsapi::JSAutoCompartment; use js::jsapi::JSAutoCompartment;
use crate::script_thread::ScriptThread;
use servo_config::prefs::PREFS; use servo_config::prefs::PREFS;
fn create_svg_element( fn create_svg_element(

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput, serialize_identifier};
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
use crate::dom::bindings::error::Fallible; use crate::dom::bindings::error::Fallible;
use crate::dom::bindings::reflector::Reflector; use crate::dom::bindings::reflector::Reflector;
@ -10,6 +9,7 @@ use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString; use crate::dom::bindings::str::DOMString;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::dom::worklet::Worklet; use crate::dom::worklet::Worklet;
use cssparser::{Parser, ParserInput, serialize_identifier};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use style::context::QuirksMode; use style::context::QuirksMode;
use style::parser::ParserContext; use style::parser::ParserContext;

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding; use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding;
use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods; use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods;
use crate::dom::bindings::error::ErrorResult; use crate::dom::bindings::error::ErrorResult;
@ -15,6 +14,7 @@ use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
use crate::dom::cssrulelist::{CSSRuleList, RulesSource}; use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
use crate::dom::cssstylesheet::CSSStyleSheet; use crate::dom::cssstylesheet::CSSStyleSheet;
use crate::dom::window::Window; use crate::dom::window::Window;
use cssparser::{Parser, ParserInput};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_arc::Arc; use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard}; use style::shared_lock::{Locked, ToCssWithGuard};

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding; use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding;
use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods; use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
@ -14,6 +13,7 @@ use crate::dom::cssrule::SpecificCSSRule;
use crate::dom::cssstylesheet::CSSStyleSheet; use crate::dom::cssstylesheet::CSSStyleSheet;
use crate::dom::medialist::MediaList; use crate::dom::medialist::MediaList;
use crate::dom::window::Window; use crate::dom::window::Window;
use cssparser::{Parser, ParserInput};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_arc::Arc; use servo_arc::Arc;
use style::media_queries::MediaList as StyleMediaList; use style::media_queries::MediaList as StyleMediaList;

View file

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser as CssParser, ParserInput as CssParserInput};
use cssparser::ToCss;
use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMethods}; use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMethods};
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::inheritance::Castable;
@ -14,6 +12,8 @@ use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner}; use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
use crate::dom::cssstylesheet::CSSStyleSheet; use crate::dom::cssstylesheet::CSSStyleSheet;
use crate::dom::window::Window; use crate::dom::window::Window;
use cssparser::{Parser as CssParser, ParserInput as CssParserInput};
use cssparser::ToCss;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use selectors::parser::SelectorList; use selectors::parser::SelectorList;
use servo_arc::Arc; use servo_arc::Arc;

View file

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::Parser;
use cssparser::ParserInput;
use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods; use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods;
use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::Wrap; use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::Wrap;
use crate::dom::bindings::reflector::Reflector; use crate::dom::bindings::reflector::Reflector;
@ -11,6 +9,8 @@ use crate::dom::bindings::reflector::reflect_dom_object;
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString; use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use cssparser::Parser;
use cssparser::ParserInput;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_url::ServoUrl; use servo_url::ServoUrl;

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
use crate::dom::bindings::codegen::Bindings::CSSSupportsRuleBinding; use crate::dom::bindings::codegen::Bindings::CSSSupportsRuleBinding;
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
use crate::dom::bindings::reflector::{DomObject, reflect_dom_object}; use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
@ -12,6 +11,7 @@ use crate::dom::cssconditionrule::CSSConditionRule;
use crate::dom::cssrule::SpecificCSSRule; use crate::dom::cssrule::SpecificCSSRule;
use crate::dom::cssstylesheet::CSSStyleSheet; use crate::dom::cssstylesheet::CSSStyleSheet;
use crate::dom::window::Window; use crate::dom::window::Window;
use cssparser::{Parser, ParserInput};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_arc::Arc; use servo_arc::Arc;
use style::parser::ParserContext; use style::parser::ParserContext;

View file

@ -25,6 +25,8 @@ use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::{document_from_node, Node, window_from_node}; use crate::dom::node::{document_from_node, Node, window_from_node};
use crate::dom::promise::Promise; use crate::dom::promise::Promise;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::microtask::Microtask;
use crate::script_thread::ScriptThread;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{LocalName, Namespace, Prefix}; use html5ever::{LocalName, Namespace, Prefix};
use js::conversions::ToJSValConvertible; use js::conversions::ToJSValConvertible;
@ -34,8 +36,6 @@ use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue}; use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue};
use js::rust::{HandleObject, HandleValue, MutableHandleValue}; use js::rust::{HandleObject, HandleValue, MutableHandleValue};
use js::rust::wrappers::{JS_GetProperty, Construct1, JS_SameValue}; use js::rust::wrappers::{JS_GetProperty, Construct1, JS_SameValue};
use crate::microtask::Microtask;
use crate::script_thread::ScriptThread;
use std::cell::Cell; use std::cell::Cell;
use std::collections::{HashMap, VecDeque}; use std::collections::{HashMap, VecDeque};
use std::mem; use std::mem;

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::devtools; use crate::devtools;
use devtools_traits::DevtoolScriptControlMsg;
use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg}; use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};
use crate::dom::abstractworkerglobalscope::{SendableWorkerScriptChan, WorkerThreadWorkerChan}; use crate::dom::abstractworkerglobalscope::{SendableWorkerScriptChan, WorkerThreadWorkerChan};
use crate::dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop}; use crate::dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
@ -23,6 +22,11 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::messageevent::MessageEvent; use crate::dom::messageevent::MessageEvent;
use crate::dom::worker::{TrustedWorkerAddress, Worker}; use crate::dom::worker::{TrustedWorkerAddress, Worker};
use crate::dom::workerglobalscope::WorkerGlobalScope; use crate::dom::workerglobalscope::WorkerGlobalScope;
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, new_rt_and_cx, Runtime};
use crate::script_runtime::ScriptThreadEventCategory::WorkerEvent;
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
use crate::task_source::TaskSourceName;
use devtools_traits::DevtoolScriptControlMsg;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
@ -33,8 +37,6 @@ use js::rust::HandleValue;
use msg::constellation_msg::TopLevelBrowsingContextId; use msg::constellation_msg::TopLevelBrowsingContextId;
use net_traits::{IpcSend, load_whole_resource}; use net_traits::{IpcSend, load_whole_resource};
use net_traits::request::{CredentialsMode, Destination, RequestInit}; use net_traits::request::{CredentialsMode, Destination, RequestInit};
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, new_rt_and_cx, Runtime};
use crate::script_runtime::ScriptThreadEventCategory::WorkerEvent;
use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin}; use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
use servo_channel::{channel, route_ipc_receiver_to_new_servo_sender, Sender, Receiver}; use servo_channel::{channel, route_ipc_receiver_to_new_servo_sender, Sender, Receiver};
use servo_rand::random; use servo_rand::random;
@ -44,8 +46,6 @@ use std::sync::Arc;
use std::sync::atomic::AtomicBool; use std::sync::atomic::AtomicBool;
use std::thread; use std::thread;
use style::thread_state::{self, ThreadState}; use style::thread_state::{self, ThreadState};
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
use crate::task_source::TaskSourceName;
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular /// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
/// value for the duration of this object's lifetime. This ensures that the related Worker /// value for the duration of this object's lifetime. This ensures that the related Worker

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::cookie_rs; use crate::cookie_rs;
use devtools_traits::ScriptToDevtoolsControlMsg;
use crate::document_loader::{DocumentLoader, LoadType}; use crate::document_loader::{DocumentLoader, LoadType};
use crate::dom::activation::{ActivationSource, synthetic_click_activation}; use crate::dom::activation::{ActivationSource, synthetic_click_activation};
use crate::dom::attr::Attr; use crate::dom::attr::Attr;
@ -12,7 +11,8 @@ use crate::dom::bindings::callback::ExceptionHandling;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventBinding::BeforeUnloadEventMethods; use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
use crate::dom::bindings::codegen::Bindings::DocumentBinding; use crate::dom::bindings::codegen::Bindings::DocumentBinding;
use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState, ElementCreationOptions}; use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
use crate::dom::bindings::codegen::Bindings::DocumentBinding::ElementCreationOptions;
use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods; use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementBinding::HTMLIFrameElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
@ -89,11 +89,16 @@ use crate::dom::virtualmethods::vtable_for;
use crate::dom::webglcontextevent::WebGLContextEvent; use crate::dom::webglcontextevent::WebGLContextEvent;
use crate::dom::window::{ReflowReason, Window}; use crate::dom::window::{ReflowReason, Window};
use crate::dom::windowproxy::WindowProxy; use crate::dom::windowproxy::WindowProxy;
use crate::fetch::FetchCanceller;
use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
use crate::task_source::{TaskSource, TaskSourceName};
use crate::timers::OneshotTimerCallback;
use devtools_traits::ScriptToDevtoolsControlMsg;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg; use embedder_traits::EmbedderMsg;
use encoding_rs::{Encoding, UTF_8}; use encoding_rs::{Encoding, UTF_8};
use euclid::Point2D; use euclid::Point2D;
use crate::fetch::FetchCanceller;
use html5ever::{LocalName, Namespace, QualName}; use html5ever::{LocalName, Namespace, QualName};
use hyper_serde::Serde; use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
@ -114,8 +119,6 @@ use profile_traits::ipc as profile_ipc;
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType}; use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType};
use ref_slice::ref_slice; use ref_slice::ref_slice;
use script_layout_interface::message::{Msg, NodesFromPointQueryType, QueryMsg, ReflowGoal}; use script_layout_interface::message::{Msg, NodesFromPointQueryType, QueryMsg, ReflowGoal};
use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
use script_traits::{AnimationState, DocumentActivity, MouseButton, MouseEventType}; use script_traits::{AnimationState, DocumentActivity, MouseButton, MouseEventType};
use script_traits::{MsDuration, ScriptMsg, TouchEventType, TouchId, UntrustedNodeAddress}; use script_traits::{MsDuration, ScriptMsg, TouchEventType, TouchId, UntrustedNodeAddress};
use servo_arc::Arc; use servo_arc::Arc;
@ -141,9 +144,7 @@ use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuar
use style::str::{split_html_space_chars, str_join}; use style::str::{split_html_space_chars, str_join};
use style::stylesheet_set::DocumentStylesheetSet; use style::stylesheet_set::DocumentStylesheetSet;
use style::stylesheets::{CssRule, Stylesheet, Origin, OriginSet}; use style::stylesheets::{CssRule, Stylesheet, Origin, OriginSet};
use crate::task_source::{TaskSource, TaskSourceName};
use time; use time;
use crate::timers::OneshotTimerCallback;
use url::Host; use url::Host;
use url::percent_encoding::percent_decode; use url::percent_encoding::percent_decode;

View file

@ -4,7 +4,6 @@
//! Element nodes. //! Element nodes.
use devtools_traits::AttrInfo;
use crate::dom::activation::Activatable; use crate::dom::activation::Activatable;
use crate::dom::attr::{Attr, AttrHelpersForLayout}; use crate::dom::attr::{Attr, AttrHelpersForLayout};
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
@ -75,6 +74,10 @@ use crate::dom::text::Text;
use crate::dom::validation::Validatable; use crate::dom::validation::Validatable;
use crate::dom::virtualmethods::{VirtualMethods, vtable_for}; use crate::dom::virtualmethods::{VirtualMethods, vtable_for};
use crate::dom::window::ReflowReason; use crate::dom::window::ReflowReason;
use crate::script_thread::ScriptThread;
use crate::stylesheet_loader::StylesheetOwner;
use crate::task::TaskOnce;
use devtools_traits::AttrInfo;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{Prefix, LocalName, Namespace, QualName}; use html5ever::{Prefix, LocalName, Namespace, QualName};
use html5ever::serialize; use html5ever::serialize;
@ -87,7 +90,6 @@ use msg::constellation_msg::InputMethodType;
use net_traits::request::CorsSettings; use net_traits::request::CorsSettings;
use ref_filter_map::ref_filter_map; use ref_filter_map::ref_filter_map;
use script_layout_interface::message::ReflowGoal; use script_layout_interface::message::ReflowGoal;
use crate::script_thread::ScriptThread;
use selectors::Element as SelectorsElement; use selectors::Element as SelectorsElement;
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity}; use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
use selectors::matching::{ElementSelectorFlags, MatchingContext}; use selectors::matching::{ElementSelectorFlags, MatchingContext};
@ -119,8 +121,6 @@ use style::shared_lock::{SharedRwLock, Locked};
use style::thread_state; use style::thread_state;
use style::values::{CSSFloat, Either}; use style::values::{CSSFloat, Either};
use style::values::{specified, computed}; use style::values::{specified, computed};
use crate::stylesheet_loader::StylesheetOwner;
use crate::task::TaskOnce;
use xml5ever::serialize as xmlSerialize; use xml5ever::serialize as xmlSerialize;
use xml5ever::serialize::SerializeOpts as XmlSerializeOpts; use xml5ever::serialize::SerializeOpts as XmlSerializeOpts;
use xml5ever::serialize::TraversalScope as XmlTraversalScope; use xml5ever::serialize::TraversalScope as XmlTraversalScope;

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{TimelineMarker, TimelineMarkerType};
use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::callback::ExceptionHandling;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::EventBinding; use crate::dom::bindings::codegen::Bindings::EventBinding;
@ -19,11 +18,12 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::node::Node; use crate::dom::node::Node;
use crate::dom::virtualmethods::vtable_for; use crate::dom::virtualmethods::vtable_for;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::task::TaskOnce;
use devtools_traits::{TimelineMarker, TimelineMarkerType};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use servo_atoms::Atom; use servo_atoms::Atom;
use std::cell::Cell; use std::cell::Cell;
use std::default::Default; use std::default::Default;
use crate::task::TaskOnce;
use time; use time;
#[dom_struct] #[dom_struct]

View file

@ -14,9 +14,12 @@ use crate::dom::event::Event;
use crate::dom::eventtarget::EventTarget; use crate::dom::eventtarget::EventTarget;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::messageevent::MessageEvent; use crate::dom::messageevent::MessageEvent;
use crate::fetch::FetchCanceller;
use crate::network_listener::{NetworkListener, PreInvoke};
use crate::task_source::{TaskSource, TaskSourceName};
use crate::timers::OneshotTimerCallback;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use euclid::Length; use euclid::Length;
use crate::fetch::FetchCanceller;
use headers_ext::ContentType; use headers_ext::ContentType;
use http::header::{self, HeaderName, HeaderValue}; use http::header::{self, HeaderName, HeaderValue};
use ipc_channel::ipc; use ipc_channel::ipc;
@ -29,15 +32,12 @@ use net_traits::{CoreResourceMsg, FetchChannels, FetchMetadata};
use net_traits::{FetchResponseMsg, FetchResponseListener, NetworkError}; use net_traits::{FetchResponseMsg, FetchResponseListener, NetworkError};
use net_traits::request::{CacheMode, CorsSettings, CredentialsMode}; use net_traits::request::{CacheMode, CorsSettings, CredentialsMode};
use net_traits::request::{RequestInit, RequestMode}; use net_traits::request::{RequestInit, RequestMode};
use crate::network_listener::{NetworkListener, PreInvoke};
use servo_atoms::Atom; use servo_atoms::Atom;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::cell::Cell; use std::cell::Cell;
use std::mem; use std::mem;
use std::str::{Chars, FromStr}; use std::str::{Chars, FromStr};
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use crate::task_source::{TaskSource, TaskSourceName};
use crate::timers::OneshotTimerCallback;
use utf8; use utf8;

View file

@ -20,6 +20,9 @@ use crate::dom::event::{Event, EventBubbles, EventCancelable};
use crate::dom::eventtarget::EventTarget; use crate::dom::eventtarget::EventTarget;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::progressevent::ProgressEvent; use crate::dom::progressevent::ProgressEvent;
use crate::task::TaskCanceller;
use crate::task_source::{TaskSource, TaskSourceName};
use crate::task_source::file_reading::{FileReadingTask, FileReadingTaskSource};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8}; use encoding_rs::{Encoding, UTF_8};
use js::jsapi::Heap; use js::jsapi::Heap;
@ -34,9 +37,6 @@ use std::cell::Cell;
use std::ptr; use std::ptr;
use std::sync::Arc; use std::sync::Arc;
use std::thread; use std::thread;
use crate::task::TaskCanceller;
use crate::task_source::{TaskSource, TaskSourceName};
use crate::task_source::file_reading::{FileReadingTask, FileReadingTaskSource};
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)] #[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
pub enum FileReaderFunction { pub enum FileReaderFunction {

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::EventSourceBinding::EventSourceBinding::EventSourceMethods; use crate::dom::bindings::codegen::Bindings::EventSourceBinding::EventSourceBinding::EventSourceMethods;
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
@ -25,6 +24,20 @@ use crate::dom::performance::Performance;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::dom::workerglobalscope::WorkerGlobalScope; use crate::dom::workerglobalscope::WorkerGlobalScope;
use crate::dom::workletglobalscope::WorkletGlobalScope; use crate::dom::workletglobalscope::WorkletGlobalScope;
use crate::microtask::{Microtask, MicrotaskQueue};
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
use crate::script_thread::{MainThreadScriptChan, ScriptThread};
use crate::task::TaskCanceller;
use crate::task_source::TaskSourceName;
use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
use crate::task_source::file_reading::FileReadingTaskSource;
use crate::task_source::networking::NetworkingTaskSource;
use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
use crate::task_source::remote_event::RemoteEventTaskSource;
use crate::task_source::websocket::WebsocketTaskSource;
use crate::timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
use crate::timers::{OneshotTimers, TimerCallback};
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL}; use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
@ -38,12 +51,9 @@ use js::rust::{CompileOptionsWrapper, Runtime, get_object_class};
use js::rust::{HandleValue, MutableHandleValue}; use js::rust::{HandleValue, MutableHandleValue};
use js::rust::wrappers::Evaluate2; use js::rust::wrappers::Evaluate2;
use libc; use libc;
use crate::microtask::{Microtask, MicrotaskQueue};
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use net_traits::{CoreResourceThread, ResourceThreads, IpcSend}; use net_traits::{CoreResourceThread, ResourceThreads, IpcSend};
use profile_traits::{mem, time}; use profile_traits::{mem, time};
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
use crate::script_thread::{MainThreadScriptChan, ScriptThread};
use script_traits::{MsDuration, ScriptToConstellationChan, TimerEvent}; use script_traits::{MsDuration, ScriptToConstellationChan, TimerEvent};
use script_traits::{TimerEventId, TimerSchedulerMsg, TimerSource}; use script_traits::{TimerEventId, TimerSchedulerMsg, TimerSource};
use servo_url::{MutableOrigin, ServoUrl}; use servo_url::{MutableOrigin, ServoUrl};
@ -54,17 +64,7 @@ use std::ffi::CString;
use std::rc::Rc; use std::rc::Rc;
use std::sync::Arc; use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use crate::task::TaskCanceller;
use crate::task_source::TaskSourceName;
use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
use crate::task_source::file_reading::FileReadingTaskSource;
use crate::task_source::networking::NetworkingTaskSource;
use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
use crate::task_source::remote_event::RemoteEventTaskSource;
use crate::task_source::websocket::WebsocketTaskSource;
use time::{Timespec, get_time}; use time::{Timespec, get_time};
use crate::timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
use crate::timers::{OneshotTimers, TimerCallback};
#[derive(JSTraceable)] #[derive(JSTraceable)]
pub struct AutoCloseWorker(Arc<AtomicBool>); pub struct AutoCloseWorker(Arc<AtomicBool>);

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
use crate::dom::attr::Attr; use crate::dom::attr::Attr;
use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods}; use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
@ -15,6 +14,7 @@ use crate::dom::eventtarget::EventTarget;
use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::{Node, document_from_node, window_from_node}; use crate::dom::node::{Node, document_from_node, window_from_node};
use crate::dom::virtualmethods::VirtualMethods; use crate::dom::virtualmethods::VirtualMethods;
use cssparser::RGBA;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg; use embedder_traits::EmbedderMsg;
use html5ever::{LocalName, Prefix}; use html5ever::{LocalName, Prefix};

View file

@ -14,10 +14,10 @@ use crate::dom::eventtarget::EventTarget;
use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::{Node, window_from_node}; use crate::dom::node::{Node, window_from_node};
use crate::dom::virtualmethods::VirtualMethods; use crate::dom::virtualmethods::VirtualMethods;
use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix}; use html5ever::{LocalName, Prefix};
use std::cell::Cell; use std::cell::Cell;
use crate::task_source::TaskSource;
#[dom_struct] #[dom_struct]
pub struct HTMLDetailsElement { pub struct HTMLDetailsElement {

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
use crate::dom::attr::Attr; use crate::dom::attr::Attr;
use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding;
use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods;
@ -14,6 +13,7 @@ use crate::dom::element::{Element, RawLayoutElementHelpers};
use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::Node; use crate::dom::node::Node;
use crate::dom::virtualmethods::VirtualMethods; use crate::dom::virtualmethods::VirtualMethods;
use cssparser::RGBA;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix}; use html5ever::{LocalName, Prefix};
use servo_atoms::Atom; use servo_atoms::Atom;

View file

@ -42,6 +42,8 @@ use crate::dom::node::{document_from_node, window_from_node};
use crate::dom::validitystate::ValidationFlags; use crate::dom::validitystate::ValidationFlags;
use crate::dom::virtualmethods::VirtualMethods; use crate::dom::virtualmethods::VirtualMethods;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::script_thread::MainThreadScriptMsg;
use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8}; use encoding_rs::{Encoding, UTF_8};
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
@ -49,7 +51,6 @@ use headers_ext::ContentType;
use html5ever::{LocalName, Prefix}; use html5ever::{LocalName, Prefix};
use hyper::Method; use hyper::Method;
use mime::{self, Mime}; use mime::{self, Mime};
use crate::script_thread::MainThreadScriptMsg;
use net_traits::http_percent_encode; use net_traits::http_percent_encode;
use script_traits::LoadData; use script_traits::LoadData;
use servo_rand::random; use servo_rand::random;
@ -57,7 +58,6 @@ use std::borrow::ToOwned;
use std::cell::Cell; use std::cell::Cell;
use style::attr::AttrValue; use style::attr::AttrValue;
use style::str::split_html_space_chars; use style::str::split_html_space_chars;
use crate::task_source::TaskSource;
use url::UrlQuery; use url::UrlQuery;
use url::form_urlencoded::Serializer; use url::form_urlencoded::Serializer;

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods}; use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods};
use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::root::{DomRoot, LayoutDom}; use crate::dom::bindings::root::{DomRoot, LayoutDom};
@ -12,6 +11,7 @@ use crate::dom::element::{Element, RawLayoutElementHelpers};
use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::Node; use crate::dom::node::Node;
use crate::dom::virtualmethods::VirtualMethods; use crate::dom::virtualmethods::VirtualMethods;
use cssparser::RGBA;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix}; use html5ever::{LocalName, Prefix};
use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::attr::{AttrValue, LengthOrPercentageOrAuto};

View file

@ -23,13 +23,14 @@ use crate::dom::node::{Node, NodeDamage, UnbindContext, document_from_node, wind
use crate::dom::virtualmethods::VirtualMethods; use crate::dom::virtualmethods::VirtualMethods;
use crate::dom::window::ReflowReason; use crate::dom::window::ReflowReason;
use crate::dom::windowproxy::WindowProxy; use crate::dom::windowproxy::WindowProxy;
use crate::script_thread::ScriptThread;
use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix}; use html5ever::{LocalName, Prefix};
use ipc_channel::ipc; use ipc_channel::ipc;
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId}; use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
use profile_traits::ipc as ProfiledIpc; use profile_traits::ipc as ProfiledIpc;
use script_layout_interface::message::ReflowGoal; use script_layout_interface::message::ReflowGoal;
use crate::script_thread::ScriptThread;
use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, UpdatePipelineIdReason}; use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, UpdatePipelineIdReason};
use script_traits::{NewLayoutInfo, ScriptMsg}; use script_traits::{NewLayoutInfo, ScriptMsg};
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed}; use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
@ -37,7 +38,6 @@ use servo_config::prefs::PREFS;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::cell::Cell; use std::cell::Cell;
use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use crate::task_source::TaskSource;
bitflags! { bitflags! {
#[derive(JSTraceable, MallocSizeOf)] #[derive(JSTraceable, MallocSizeOf)]

Some files were not shown because too many files have changed in this diff Show more