cargo fix --edition

This commit is contained in:
Simon Sapin 2018-11-01 23:45:06 +01:00
parent 86f148fb97
commit 45f7199eee
503 changed files with 5038 additions and 5037 deletions

View file

@ -7,7 +7,7 @@
#[global_allocator] #[global_allocator]
static ALLOC: Allocator = Allocator; static ALLOC: Allocator = Allocator;
pub use platform::*; pub use crate::platform::*;
#[cfg(not(windows))] #[cfg(not(windows))]
mod platform { mod platform {

View file

@ -2,7 +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 BluetoothManager; use crate::BluetoothManager;
use device::bluetooth::{BluetoothAdapter, BluetoothDevice}; use device::bluetooth::{BluetoothAdapter, BluetoothDevice};
use device::bluetooth::{BluetoothGATTCharacteristic, BluetoothGATTDescriptor, BluetoothGATTService}; use device::bluetooth::{BluetoothGATTCharacteristic, BluetoothGATTDescriptor, BluetoothGATTService};
use std::borrow::ToOwned; use std::borrow::ToOwned;

View file

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

View file

@ -3,7 +3,7 @@
* 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 canvas_data::*; use crate::canvas_data::*;
use canvas_traits::canvas::*; use canvas_traits::canvas::*;
use euclid::Size2D; use euclid::Size2D;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};

View file

@ -2,7 +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 ::gl_context::GLContextFactory; 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;
@ -12,7 +12,7 @@ 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 webgl_thread::{WebGLExternalImageApi, WebGLExternalImageHandler, WebGLThread}; use crate::webgl_thread::{WebGLExternalImageApi, WebGLExternalImageHandler, WebGLThread};
use webrender; use webrender;
use webrender_api; use webrender_api;

View file

@ -15,7 +15,7 @@ use webrender_api;
/// WebGL Threading API entry point that lives in the constellation. /// WebGL Threading API entry point that lives in the constellation.
/// It allows to get a WebGLThread handle for each script pipeline. /// It allows to get a WebGLThread handle for each script pipeline.
pub use ::webgl_mode::WebGLThreads; pub use crate::webgl_mode::WebGLThreads;
struct GLContextData { struct GLContextData {
ctx: GLContextWrapper, ctx: GLContextWrapper,

View file

@ -12,17 +12,17 @@ use std::num::NonZeroU32;
use webrender_api::{DocumentId, ImageKey, PipelineId}; use webrender_api::{DocumentId, ImageKey, PipelineId};
/// Sender type used in WebGLCommands. /// Sender type used in WebGLCommands.
pub use ::webgl_channel::WebGLSender; pub use crate::webgl_channel::WebGLSender;
/// Receiver type used in WebGLCommands. /// Receiver type used in WebGLCommands.
pub use ::webgl_channel::WebGLReceiver; pub use crate::webgl_channel::WebGLReceiver;
/// Result type for send()/recv() calls in in WebGLCommands. /// Result type for send()/recv() calls in in WebGLCommands.
pub use ::webgl_channel::WebGLSendResult; pub use crate::webgl_channel::WebGLSendResult;
/// Helper function that creates a WebGL channel (WebGLSender, WebGLReceiver) to be used in WebGLCommands. /// Helper function that creates a WebGL channel (WebGLSender, WebGLReceiver) to be used in WebGLCommands.
pub use ::webgl_channel::webgl_channel; pub use crate::webgl_channel::webgl_channel;
/// Entry point type used in a Script Pipeline to get the WebGLChan to be used in that thread. /// Entry point type used in a Script Pipeline to get the WebGLChan to be used in that thread.
pub use ::webgl_channel::WebGLPipeline; pub use crate::webgl_channel::WebGLPipeline;
/// Entry point channel type used for sending WebGLMsg messages to the WebGL renderer. /// Entry point channel type used for sending WebGLMsg messages to the WebGL renderer.
pub use ::webgl_channel::WebGLChan; pub use crate::webgl_channel::WebGLChan;
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WebGLCommandBacktrace { pub struct WebGLCommandBacktrace {
@ -342,7 +342,7 @@ macro_rules! define_resource_id {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: ::serde::Deserializer<'de> where D: ::serde::Deserializer<'de>
{ {
let id = try!(u32::deserialize(deserializer)); let id = r#try!(u32::deserialize(deserializer));
if id == 0 { if id == 0 {
Err(::serde::de::Error::custom("expected a non-zero value")) Err(::serde::de::Error::custom("expected a non-zero value"))
} else { } else {

View file

@ -7,7 +7,7 @@
mod ipc; mod ipc;
mod mpsc; mod mpsc;
use ::webgl::WebGLMsg; use crate::webgl::WebGLMsg;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use servo_config::opts; use servo_config::opts;
use std::fmt; use std::fmt;

View file

@ -2,14 +2,14 @@
* 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 CompositionPipeline; use crate::CompositionPipeline;
use SendableFrameTree; use crate::SendableFrameTree;
use compositor_thread::{CompositorProxy, CompositorReceiver}; use crate::compositor_thread::{CompositorProxy, CompositorReceiver};
use compositor_thread::{InitialCompositorState, Msg}; use crate::compositor_thread::{InitialCompositorState, Msg};
use euclid::{TypedPoint2D, TypedVector2D, TypedScale}; use euclid::{TypedPoint2D, TypedVector2D, TypedScale};
use gfx_traits::Epoch; use gfx_traits::Epoch;
#[cfg(feature = "gleam")] #[cfg(feature = "gleam")]
use gl; use crate::gl;
#[cfg(feature = "gleam")] #[cfg(feature = "gleam")]
use image::{DynamicImage, ImageFormat}; use image::{DynamicImage, ImageFormat};
use ipc_channel::ipc; use ipc_channel::ipc;
@ -36,11 +36,11 @@ 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 touch::{TouchHandler, TouchAction}; 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 windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods}; use crate::windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods};
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
enum UnableToComposite { enum UnableToComposite {

View file

@ -4,8 +4,8 @@
//! Communication with the compositor thread. //! Communication with the compositor thread.
use SendableFrameTree; use crate::SendableFrameTree;
use compositor::CompositingReason; use crate::compositor::CompositingReason;
use embedder_traits::EventLoopWaker; use embedder_traits::EventLoopWaker;
use gfx_traits::Epoch; use gfx_traits::Epoch;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;

View file

@ -29,10 +29,10 @@ extern crate time;
extern crate webrender; extern crate webrender;
extern crate webrender_api; extern crate webrender_api;
pub use compositor_thread::CompositorProxy; pub use crate::compositor_thread::CompositorProxy;
pub use compositor::IOCompositor; pub use crate::compositor::IOCompositor;
pub use compositor::RenderNotifier; pub use crate::compositor::RenderNotifier;
pub use compositor::ShutdownState; pub use crate::compositor::ShutdownState;
use euclid::TypedSize2D; use euclid::TypedSize2D;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;

View file

@ -8,7 +8,7 @@
use euclid::TypedSize2D; use euclid::TypedSize2D;
use getopts::Options; use getopts::Options;
use num_cpus; use num_cpus;
use prefs::{self, PrefValue, PREFS}; 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

@ -2,10 +2,10 @@
* 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 basedir::default_config_dir; use crate::basedir::default_config_dir;
use embedder_traits::resources::{self, Resource}; use embedder_traits::resources::{self, Resource};
use num_cpus; use num_cpus;
use opts; 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

@ -4,7 +4,7 @@
use euclid::TypedSize2D; use euclid::TypedSize2D;
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId}; use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
use pipeline::Pipeline; 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,8 @@
use backtrace::Backtrace; use backtrace::Backtrace;
use bluetooth_traits::BluetoothRequest; use bluetooth_traits::BluetoothRequest;
use browsingcontext::{AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator}; use crate::browsingcontext::{AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator};
use browsingcontext::NewBrowsingContextInfo; 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;
@ -105,7 +105,7 @@ 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 event_loop::EventLoop; 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 +120,8 @@ 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 network_listener::NetworkListener; use crate::network_listener::NetworkListener;
use pipeline::{InitialPipelineState, Pipeline}; 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 +139,7 @@ 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 session_history::{JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff}; 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 +151,7 @@ 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 timer_scheduler::TimerScheduler; use crate::timer_scheduler::TimerScheduler;
use webrender_api; use webrender_api;
use webvr_traits::{WebVREvent, WebVRMsg}; use webvr_traits::{WebVREvent, WebVRMsg};

View file

@ -53,7 +53,7 @@ mod sandboxing;
mod session_history; mod session_history;
mod timer_scheduler; mod timer_scheduler;
pub use constellation::{Constellation, FromCompositorLogger, FromScriptLogger, InitialConstellationState}; pub use crate::constellation::{Constellation, FromCompositorLogger, FromScriptLogger, InitialConstellationState};
pub use pipeline::UnprivilegedPipelineContent; pub use crate::pipeline::UnprivilegedPipelineContent;
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))] #[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
pub use sandboxing::content_process_sandbox_profile; pub use crate::sandboxing::content_process_sandbox_profile;

View file

@ -9,7 +9,7 @@ use compositing::CompositorProxy;
use compositing::compositor_thread::Msg as CompositorMsg; use compositing::compositor_thread::Msg as CompositorMsg;
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg}; use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
use euclid::{TypedSize2D, TypedScale}; use euclid::{TypedSize2D, TypedScale};
use event_loop::EventLoop; 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};
@ -557,7 +557,7 @@ impl UnprivilegedPipelineContent {
pub fn spawn_multiprocess(self) -> Result<(), Error> { pub fn spawn_multiprocess(self) -> Result<(), Error> {
use gaol::sandbox::{self, Sandbox, SandboxMethods}; use gaol::sandbox::{self, Sandbox, SandboxMethods};
use ipc_channel::ipc::IpcOneShotServer; use ipc_channel::ipc::IpcOneShotServer;
use sandboxing::content_process_sandbox_profile; 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

@ -2,7 +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 browsingcontext::NewBrowsingContextInfo; use crate::browsingcontext::NewBrowsingContextInfo;
use msg::constellation_msg::{BrowsingContextId, HistoryStateId, PipelineId, TopLevelBrowsingContextId}; use msg::constellation_msg::{BrowsingContextId, HistoryStateId, PipelineId, TopLevelBrowsingContextId};
use script_traits::LoadData; use script_traits::LoadData;
use servo_url::ServoUrl; use servo_url::ServoUrl;

View file

@ -7,10 +7,10 @@
//! Connection point for remote devtools that wish to investigate a particular Browsing Context's contents. //! Connection point for remote devtools that wish to investigate a particular Browsing Context's contents.
//! Supports dynamic attaching and detaching which control notifications of navigation, etc. //! Supports dynamic attaching and detaching which control notifications of navigation, etc.
use actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use actors::console::ConsoleActor; use crate::actors::console::ConsoleActor;
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications}; use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
use protocol::JsonPacketStream; use crate::protocol::JsonPacketStream;
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -7,15 +7,15 @@
//! Mediates interaction between the remote web console and equivalent functionality (object //! Mediates interaction between the remote web console and equivalent functionality (object
//! inspection, JS evaluation, autocompletion) in Servo. //! inspection, JS evaluation, autocompletion) in Servo.
use actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use actors::object::ObjectActor; use crate::actors::object::ObjectActor;
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 protocol::JsonPacketStream; 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

@ -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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use protocol::{ActorDescription, Method}; use crate::protocol::{ActorDescription, Method};
use protocol::JsonPacketStream; use crate::protocol::JsonPacketStream;
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -2,7 +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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use actors::timeline::HighResolutionStamp; use crate::actors::timeline::HighResolutionStamp;
use devtools_traits::DevtoolScriptControlMsg; use devtools_traits::DevtoolScriptControlMsg;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;

View file

@ -5,13 +5,13 @@
//! Liberally derived from the [Firefox JS implementation] //! Liberally derived from the [Firefox JS implementation]
//! (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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
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 protocol::JsonPacketStream; 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

@ -2,7 +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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -6,14 +6,14 @@
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js). //! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js).
//! 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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
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 protocol::JsonPacketStream; 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

@ -2,7 +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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use protocol::{ActorDescription, JsonPacketStream, Method}; use crate::protocol::{ActorDescription, JsonPacketStream, Method};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -2,7 +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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -6,11 +6,11 @@
/// (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/root.js). /// (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/root.js).
/// Connection point for all new remote devtools interactions, providing lists of know actors /// Connection point for all new remote devtools interactions, providing lists of know actors
/// that perform more specific actions (targets, addons, browser chrome, etc.) /// that perform more specific actions (targets, addons, browser chrome, etc.)
use actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use actors::browsing_context::{BrowsingContextActor, BrowsingContextActorMsg}; use crate::actors::browsing_context::{BrowsingContextActor, BrowsingContextActorMsg};
use actors::device::DeviceActor; use crate::actors::device::DeviceActor;
use actors::performance::PerformanceActor; use crate::actors::performance::PerformanceActor;
use protocol::{ActorDescription, JsonPacketStream}; use crate::protocol::{ActorDescription, JsonPacketStream};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -2,7 +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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use protocol::JsonPacketStream; use crate::protocol::JsonPacketStream;
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -2,15 +2,15 @@
* 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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use actors::framerate::FramerateActor; use crate::actors::framerate::FramerateActor;
use actors::memory::{MemoryActor, TimelineMemoryReply}; use crate::actors::memory::{MemoryActor, TimelineMemoryReply};
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 protocol::JsonPacketStream; 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

@ -2,7 +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 actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use devtools_traits::WorkerId; use devtools_traits::WorkerId;
use serde_json::{Map, Value}; use serde_json::{Map, Value};
use std::net::TcpStream; use std::net::TcpStream;

View file

@ -27,27 +27,27 @@ extern crate serde_json;
extern crate servo_channel; extern crate servo_channel;
extern crate time; extern crate time;
use actor::{Actor, ActorRegistry}; use crate::actor::{Actor, ActorRegistry};
use actors::browsing_context::BrowsingContextActor; use crate::actors::browsing_context::BrowsingContextActor;
use actors::console::ConsoleActor; use crate::actors::console::ConsoleActor;
use actors::device::DeviceActor; use crate::actors::device::DeviceActor;
use actors::emulation::EmulationActor; use crate::actors::emulation::EmulationActor;
use actors::framerate::FramerateActor; use crate::actors::framerate::FramerateActor;
use actors::inspector::InspectorActor; use crate::actors::inspector::InspectorActor;
use actors::network_event::{EventActor, NetworkEventActor, ResponseStartMsg}; use crate::actors::network_event::{EventActor, NetworkEventActor, ResponseStartMsg};
use actors::performance::PerformanceActor; use crate::actors::performance::PerformanceActor;
use actors::profiler::ProfilerActor; use crate::actors::profiler::ProfilerActor;
use actors::root::RootActor; use crate::actors::root::RootActor;
use actors::stylesheets::StyleSheetsActor; use crate::actors::stylesheets::StyleSheetsActor;
use actors::thread::ThreadActor; use crate::actors::thread::ThreadActor;
use actors::timeline::TimelineActor; use crate::actors::timeline::TimelineActor;
use actors::worker::WorkerActor; use crate::actors::worker::WorkerActor;
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 protocol::JsonPacketStream; 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

@ -18,5 +18,5 @@ msg = {path = "../msg"}
serde = "1.0" serde = "1.0"
servo_channel = {path = "../channel"} servo_channel = {path = "../channel"}
servo_url = {path = "../url"} servo_url = {path = "../url"}
style_traits = {path = "../style_traits"} style_traits = {path = "../style_traits", features = ["servo"]}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}

View file

@ -37,7 +37,7 @@ servo_arc = {path = "../servo_arc"}
servo_atoms = {path = "../atoms"} servo_atoms = {path = "../atoms"}
servo_url = {path = "../url"} servo_url = {path = "../url"}
smallvec = { version = "0.6", features = ["std", "union"] } smallvec = { version = "0.6", features = ["std", "union"] }
style = {path = "../style"} style = {path = "../style", features = ["servo"]}
time = "0.1.12" time = "0.1.12"
unicode-bidi = {version = "0.3", features = ["with_serde"]} unicode-bidi = {version = "0.3", features = ["with_serde"]}
unicode-script = {version = "0.2", features = ["harfbuzz"]} unicode-script = {version = "0.2", features = ["harfbuzz"]}

View file

@ -4,13 +4,13 @@
use app_units::Au; use app_units::Au;
use euclid::{Point2D, Rect, Size2D}; use euclid::{Point2D, Rect, Size2D};
use font_context::{FontContext, FontSource}; use crate::font_context::{FontContext, FontSource};
use font_template::FontTemplateDescriptor; use crate::font_template::FontTemplateDescriptor;
use ordered_float::NotNan; use ordered_float::NotNan;
use platform::font::{FontHandle, FontTable}; use crate::platform::font::{FontHandle, FontTable};
use platform::font_context::FontContextHandle; use crate::platform::font_context::FontContextHandle;
pub use platform::font_list::fallback_font_families; pub use crate::platform::font_list::fallback_font_families;
use platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use servo_atoms::Atom; use servo_atoms::Atom;
use smallvec::SmallVec; use smallvec::SmallVec;
use std::borrow::ToOwned; use std::borrow::ToOwned;
@ -24,9 +24,9 @@ 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 text::Shaper; use crate::text::Shaper;
use text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore}; use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use text::shaping::ShaperMethods; use crate::text::shaping::ShaperMethods;
use time; use time;
use unicode_script::Script; use unicode_script::Script;
use webrender_api; use webrender_api;
@ -64,13 +64,13 @@ pub trait FontHandleMethods: Sized {
fn stretchiness(&self) -> font_stretch::T; fn stretchiness(&self) -> font_stretch::T;
fn glyph_index(&self, codepoint: char) -> Option<GlyphId>; fn glyph_index(&self, codepoint: char) -> Option<GlyphId>;
fn glyph_h_advance(&self, GlyphId) -> Option<FractionalPixel>; fn glyph_h_advance(&self, _: GlyphId) -> Option<FractionalPixel>;
fn glyph_h_kerning(&self, glyph0: GlyphId, glyph1: GlyphId) -> FractionalPixel; fn glyph_h_kerning(&self, glyph0: GlyphId, glyph1: GlyphId) -> FractionalPixel;
/// Can this font do basic horizontal LTR shaping without Harfbuzz? /// Can this font do basic horizontal LTR shaping without Harfbuzz?
fn can_do_fast_shaping(&self) -> bool; fn can_do_fast_shaping(&self) -> bool;
fn metrics(&self) -> FontMetrics; fn metrics(&self) -> FontMetrics;
fn table_for_tag(&self, FontTableTag) -> Option<FontTable>; fn table_for_tag(&self, _: FontTableTag) -> Option<FontTable>;
/// A unique identifier for the font, allowing comparison. /// A unique identifier for the font, allowing comparison.
fn identifier(&self) -> Atom; fn identifier(&self) -> Atom;

View file

@ -3,19 +3,19 @@
* 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 font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope}; use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope};
use font_context::FontSource; use crate::font_context::FontSource;
use font_template::{FontTemplate, FontTemplateDescriptor}; use crate::font_template::{FontTemplate, FontTemplateDescriptor};
use fontsan; use fontsan;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async}; use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
use net_traits::request::{Destination, RequestInit}; use net_traits::request::{Destination, RequestInit};
use platform::font_context::FontContextHandle; use crate::platform::font_context::FontContextHandle;
use platform::font_list::SANS_SERIF_FONT_FAMILY; use crate::platform::font_list::SANS_SERIF_FONT_FAMILY;
use platform::font_list::for_each_available_family; use crate::platform::font_list::for_each_available_family;
use platform::font_list::for_each_variation; use crate::platform::font_list::for_each_variation;
use platform::font_list::system_default_family; use crate::platform::font_list::system_default_family;
use platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
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

@ -4,12 +4,12 @@
use app_units::Au; use app_units::Au;
use fnv::FnvHasher; use fnv::FnvHasher;
use font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef}; use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef};
use font_cache_thread::FontTemplateInfo; use crate::font_cache_thread::FontTemplateInfo;
use font_template::FontTemplateDescriptor; use crate::font_template::FontTemplateDescriptor;
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use platform::font::FontHandle; use crate::platform::font::FontHandle;
pub use platform::font_context::FontContextHandle; pub use crate::platform::font_context::FontContextHandle;
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,10 +2,10 @@
* 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 font::FontHandleMethods; use crate::font::FontHandleMethods;
use platform::font::FontHandle; use crate::platform::font::FontHandle;
use platform::font_context::FontContextHandle; use crate::platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use servo_atoms::Atom; use servo_atoms::Atom;
use std::fmt::{Debug, Error, Formatter}; use std::fmt::{Debug, Error, Formatter};
use std::io::Error as IoError; use std::io::Error as IoError;

View file

@ -6,7 +6,7 @@ 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 text::util::is_cjk; 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

@ -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 app_units::Au; use app_units::Au;
use font::{FontHandleMethods, FontMetrics, FontTableMethods}; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN}; use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN};
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 +16,8 @@ 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 platform::font_context::FontContextHandle; use crate::platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData; 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 +27,8 @@ 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 text::glyph::GlyphId; use crate::text::glyph::GlyphId;
use text::util::fixed_to_float; 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

@ -13,7 +13,7 @@ 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 text::util::is_cjk; 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

@ -13,16 +13,16 @@ use core_graphics::geometry::CGRect;
use core_text::font::CTFont; use core_text::font::CTFont;
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors}; use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
use core_text::font_descriptor::kCTFontDefaultOrientation; use core_text::font_descriptor::kCTFontDefaultOrientation;
use font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag, FractionalPixel}; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag, FractionalPixel};
use font::{GPOS, GSUB, KERN}; use crate::font::{GPOS, GSUB, KERN};
use platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use platform::macos::font_context::FontContextHandle; use crate::platform::macos::font_context::FontContextHandle;
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 text::glyph::GlyphId; use crate::text::glyph::GlyphId;
const KERN_PAIR_LEN: usize = 6; const KERN_PAIR_LEN: usize = 6;

View file

@ -3,7 +3,7 @@
* 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 core_text; use core_text;
use text::util::unicode_plane; use crate::text::util::unicode_plane;
use ucd::{Codepoint, UnicodeBlock}; use ucd::{Codepoint, UnicodeBlock};
pub fn for_each_available_family<F>(mut callback: F) pub fn for_each_available_family<F>(mut callback: F)

View file

@ -3,16 +3,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(any(target_os = "linux", target_os = "android"))]
pub use platform::freetype::{font, font_context}; pub use crate::platform::freetype::{font, font_context};
#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(any(target_os = "linux", target_os = "android"))]
pub use platform::freetype::{font_list, font_template}; pub use crate::platform::freetype::{font_list, font_template};
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
pub use platform::windows::{font, font_context, font_list, font_template}; pub use crate::platform::windows::{font, font_context, font_list, font_template};
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
pub use platform::macos::{font, font_context, font_list, font_template}; pub use crate::platform::macos::{font, font_context, font_list, font_template};
#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(any(target_os = "linux", target_os = "android"))]
mod freetype { mod freetype {

View file

@ -10,11 +10,11 @@ use app_units::Au;
use dwrote; use dwrote;
use dwrote::{Font, FontFace, FontFile}; use dwrote::{Font, FontFace, FontFile};
use dwrote::{FontStretch, FontStyle}; use dwrote::{FontStretch, FontStyle};
use font::{FontHandleMethods, FontMetrics, FontTableMethods}; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel}; use crate::font::{FontTableTag, FractionalPixel};
use platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
use platform::windows::font_context::FontContextHandle; use crate::platform::windows::font_context::FontContextHandle;
use platform::windows::font_list::font_from_atom; use crate::platform::windows::font_list::font_from_atom;
use servo_atoms::Atom; use servo_atoms::Atom;
use std::fmt; use std::fmt;
use std::ops::Deref; use std::ops::Deref;
@ -25,7 +25,7 @@ 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 text::glyph::GlyphId; 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

@ -7,7 +7,7 @@ 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 text::util::unicode_plane; use crate::text::util::unicode_plane;
use ucd::{Codepoint, UnicodeBlock}; use ucd::{Codepoint, UnicodeBlock};
lazy_static! { lazy_static! {

View file

@ -2,7 +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 platform::windows::font_list::{descriptor_from_atom, font_from_atom}; use crate::platform::windows::font_list::{descriptor_from_atom, font_from_atom};
use servo_atoms::Atom; use servo_atoms::Atom;
use std::fmt; use std::fmt;
use std::io; use std::io;

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/. */
pub use text::shaping::Shaper; pub use crate::text::shaping::Shaper;
pub use text::text_run::TextRun; pub use crate::text::text_run::TextRun;
pub mod glyph; pub mod glyph;
pub mod shaping; pub mod shaping;

View file

@ -6,39 +6,39 @@
use app_units::Au; use app_units::Au;
use euclid::Point2D; use euclid::Point2D;
use font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN}; use crate::font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN};
use 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 harfbuzz::{hb_blob_create, hb_face_create_for_tables}; use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
use harfbuzz::{hb_buffer_create, hb_font_destroy}; use crate::harfbuzz::{hb_buffer_create, hb_font_destroy};
use harfbuzz::{hb_buffer_get_glyph_infos, hb_shape}; use crate::harfbuzz::{hb_buffer_get_glyph_infos, hb_shape};
use harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script}; use crate::harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script};
use harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t}; use crate::harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
use harfbuzz::{hb_face_t, hb_font_t}; use crate::harfbuzz::{hb_face_t, hb_font_t};
use harfbuzz::{hb_position_t, hb_tag_t}; use crate::harfbuzz::{hb_position_t, hb_tag_t};
use harfbuzz::hb_blob_t; use crate::harfbuzz::hb_blob_t;
use harfbuzz::hb_bool_t; use crate::harfbuzz::hb_bool_t;
use harfbuzz::hb_buffer_add_utf8; use crate::harfbuzz::hb_buffer_add_utf8;
use harfbuzz::hb_buffer_destroy; use crate::harfbuzz::hb_buffer_destroy;
use harfbuzz::hb_buffer_get_glyph_positions; use crate::harfbuzz::hb_buffer_get_glyph_positions;
use harfbuzz::hb_buffer_get_length; use crate::harfbuzz::hb_buffer_get_length;
use harfbuzz::hb_face_destroy; use crate::harfbuzz::hb_face_destroy;
use harfbuzz::hb_feature_t; use crate::harfbuzz::hb_feature_t;
use harfbuzz::hb_font_create; use crate::harfbuzz::hb_font_create;
use harfbuzz::hb_font_funcs_create; use crate::harfbuzz::hb_font_funcs_create;
use harfbuzz::hb_font_funcs_set_glyph_h_advance_func; use crate::harfbuzz::hb_font_funcs_set_glyph_h_advance_func;
use harfbuzz::hb_font_funcs_set_glyph_h_kerning_func; use crate::harfbuzz::hb_font_funcs_set_glyph_h_kerning_func;
use harfbuzz::hb_font_funcs_set_nominal_glyph_func; use crate::harfbuzz::hb_font_funcs_set_nominal_glyph_func;
use harfbuzz::hb_font_set_funcs; use crate::harfbuzz::hb_font_set_funcs;
use harfbuzz::hb_font_set_ppem; use crate::harfbuzz::hb_font_set_ppem;
use harfbuzz::hb_font_set_scale; use crate::harfbuzz::hb_font_set_scale;
use harfbuzz::hb_glyph_info_t; use crate::harfbuzz::hb_glyph_info_t;
use harfbuzz::hb_glyph_position_t; use crate::harfbuzz::hb_glyph_position_t;
use platform::font::FontTable; use crate::platform::font::FontTable;
use std::{char, cmp, ptr}; use std::{char, cmp, ptr};
use std::os::raw::{c_char, c_int, c_uint, c_void}; use std::os::raw::{c_char, c_int, c_uint, c_void};
use text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore}; use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use text::shaping::ShaperMethods; use crate::text::shaping::ShaperMethods;
use text::util::{fixed_to_float, float_to_fixed, is_bidi_control}; use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
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

@ -7,10 +7,10 @@
//! //!
//! Currently, only harfbuzz bindings are implemented. //! Currently, only harfbuzz bindings are implemented.
use font::ShapingOptions; use crate::font::ShapingOptions;
use text::glyph::GlyphStore; use crate::text::glyph::GlyphStore;
pub use text::shaping::harfbuzz::Shaper; pub use crate::text::shaping::harfbuzz::Shaper;
pub mod harfbuzz; pub mod harfbuzz;

View file

@ -3,16 +3,16 @@
* 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 font::{Font, FontHandleMethods, FontMetrics, ShapingFlags}; use crate::font::{Font, FontHandleMethods, FontMetrics, ShapingFlags};
use font::{RunMetrics, ShapingOptions}; use crate::font::{RunMetrics, ShapingOptions};
use platform::font_template::FontTemplateData; use crate::platform::font_template::FontTemplateData;
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 text::glyph::{ByteIndex, GlyphStore}; 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

@ -4,13 +4,13 @@
//! CSS transitions and animations. //! CSS transitions and animations.
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use flow::{Flow, GetBaseFlow}; use crate::flow::{Flow, GetBaseFlow};
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 opaque_node::OpaqueNodeMethods; 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

@ -26,22 +26,22 @@
//! http://dev.w3.org/csswg/css-sizing/ //! http://dev.w3.org/csswg/css-sizing/
use app_units::{Au, MAX_AU}; use app_units::{Au, MAX_AU};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode}; use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use display_list::{DisplayListBuildState, StackingContextCollectionFlags}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags};
use display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use display_list::items::DisplayListSection; use crate::display_list::items::DisplayListSection;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D}; use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use floats::{ClearType, FloatKind, Floats, PlacementInfo}; use crate::floats::{ClearType, FloatKind, Floats, PlacementInfo};
use flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow}; use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow};
use flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags}; use crate::flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags};
use flow_list::FlowList; use crate::flow_list::FlowList;
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use incremental::RelayoutMode; use crate::incremental::RelayoutMode;
use layout_debug; use crate::layout_debug;
use model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto}; use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
use sequential; use crate::sequential;
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 +59,7 @@ 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 traversal::PreorderFlowTraversal; use crate::traversal::PreorderFlowTraversal;
/// Information specific to floated blocks. /// Information specific to floated blocks.
#[derive(Clone, Serialize)] #[derive(Clone, Serialize)]
@ -591,7 +591,7 @@ pub enum FormattingContextType {
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for BlockFlow {} unsafe impl crate::flow::HasBaseFlow for BlockFlow {}
// A block formatting context. // A block formatting context.
#[derive(Serialize)] #[derive(Serialize)]
@ -2585,7 +2585,7 @@ impl Flow for BlockFlow {
self.build_display_list_for_block(state, BorderPaintingMode::Separate); self.build_display_list_for_block(state, BorderPaintingMode::Separate);
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.fragment.repair_style(new_style) self.fragment.repair_style(new_style)
} }

View file

@ -11,25 +11,25 @@
//! maybe it's an absolute or fixed position thing that hasn't found its containing block yet. //! maybe it's an absolute or fixed position thing that hasn't found its containing block yet.
//! Construction items bubble up the tree from children to parents until they find their homes. //! Construction items bubble up the tree from children to parents until they find their homes.
use ServoArc; use crate::ServoArc;
use block::BlockFlow; use crate::block::BlockFlow;
use context::{LayoutContext, with_thread_local_font_context}; use crate::context::{LayoutContext, with_thread_local_font_context};
use data::{LayoutDataFlags, LayoutData}; use crate::data::{LayoutDataFlags, LayoutData};
use display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use flex::FlexFlow; use crate::flex::FlexFlow;
use floats::FloatKind; use crate::floats::FloatKind;
use flow::{AbsoluteDescendants, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{AbsoluteDescendants, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils};
use flow::{FlowFlags, MutableFlowUtils, MutableOwnedFlowUtils}; use crate::flow::{FlowFlags, MutableFlowUtils, MutableOwnedFlowUtils};
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use fragment::{CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo}; use crate::fragment::{CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo};
use fragment::{ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo}; use crate::fragment::{ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo};
use fragment::{InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo}; use crate::fragment::{InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo};
use fragment::{TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult}; use crate::fragment::{TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult};
use inline::{InlineFlow, InlineFragmentNodeInfo, InlineFragmentNodeFlags}; use crate::inline::{InlineFlow, InlineFragmentNodeInfo, InlineFragmentNodeFlags};
use linked_list::prepend_from; use crate::linked_list::prepend_from;
use list_item::{ListItemFlow, ListStyleTypeContent}; use crate::list_item::{ListItemFlow, ListStyleTypeContent};
use multicol::{MulticolColumnFlow, MulticolFlow}; use crate::multicol::{MulticolColumnFlow, MulticolFlow};
use parallel; use crate::parallel;
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 +53,16 @@ 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 table::TableFlow; use crate::table::TableFlow;
use table_caption::TableCaptionFlow; use crate::table_caption::TableCaptionFlow;
use table_cell::TableCellFlow; use crate::table_cell::TableCellFlow;
use table_colgroup::TableColGroupFlow; use crate::table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow; use crate::table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow; use crate::table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow; use crate::table_wrapper::TableWrapperFlow;
use text::TextRunScanner; use crate::text::TextRunScanner;
use traversal::PostorderNodeMutTraversal; use crate::traversal::PostorderNodeMutTraversal;
use wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers}; 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

@ -4,7 +4,7 @@
//! Data needed by the layout thread. //! Data needed by the layout thread.
use display_list::items::{WebRenderImageInfo, OpaqueNode}; use crate::display_list::items::{WebRenderImageInfo, OpaqueNode};
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 +12,7 @@ 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 opaque_node::OpaqueNodeMethods; 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

@ -3,7 +3,7 @@
* 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 atomic_refcell::AtomicRefCell; use atomic_refcell::AtomicRefCell;
use construct::ConstructionResult; use crate::construct::ConstructionResult;
use script_layout_interface::StyleData; use script_layout_interface::StyleData;
#[repr(C)] #[repr(C)]

View file

@ -5,9 +5,9 @@
// FIXME(rust-lang/rust#26264): Remove GenericBackgroundSize. // FIXME(rust-lang/rust#26264): Remove GenericBackgroundSize.
use app_units::Au; use app_units::Au;
use display_list::border; use crate::display_list::border;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D}; use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use model::MaybeAuto; use crate::model::MaybeAuto;
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

@ -5,7 +5,7 @@
// FIXME(rust-lang/rust#26264): Remove GenericBorderImageSideWidth. // FIXME(rust-lang/rust#26264): Remove GenericBorderImageSideWidth.
use app_units::Au; use app_units::Au;
use display_list::ToLayout; use crate::display_list::ToLayout;
use euclid::{Rect, SideOffsets2D, Size2D}; use euclid::{Rect, SideOffsets2D, Size2D};
use style::computed_values::border_image_outset::T as BorderImageOutset; use style::computed_values::border_image_outset::T as BorderImageOutset;
use style::properties::style_structs::Border; use style::properties::style_structs::Border;

View file

@ -9,35 +9,35 @@
//! paint. //! paint.
use app_units::{Au, AU_PER_PX}; use app_units::{Au, AU_PER_PX};
use block::BlockFlow; use crate::block::BlockFlow;
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg}; use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::ToLayout; use crate::display_list::ToLayout;
use display_list::background::{self, get_cyclic}; use crate::display_list::background::{self, get_cyclic};
use display_list::border; use crate::display_list::border;
use display_list::gradient; use crate::display_list::gradient;
use display_list::items::{BaseDisplayItem, BLUR_INFLATION_FACTOR, ClipScrollNode}; use crate::display_list::items::{BaseDisplayItem, BLUR_INFLATION_FACTOR, ClipScrollNode};
use display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling}; use crate::display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling};
use display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList}; use crate::display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList};
use display_list::items::{DisplayListSection, CommonDisplayItem}; use crate::display_list::items::{DisplayListSection, CommonDisplayItem};
use display_list::items::{IframeDisplayItem, OpaqueNode}; use crate::display_list::items::{IframeDisplayItem, OpaqueNode};
use display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem}; use crate::display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem};
use display_list::items::{StackingContext, StackingContextType, StickyFrameData}; use crate::display_list::items::{StackingContext, StackingContextType, StickyFrameData};
use display_list::items::{TextOrientation, WebRenderImageInfo}; use crate::display_list::items::{TextOrientation, WebRenderImageInfo};
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D}; use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
use flex::FlexFlow; use crate::flex::FlexFlow;
use flow::{BaseFlow, Flow, FlowFlags}; use crate::flow::{BaseFlow, Flow, FlowFlags};
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use fnv::FnvHashMap; use fnv::FnvHashMap;
use fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo}; use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
use fragment::SpecificFragmentInfo; use crate::fragment::SpecificFragmentInfo;
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 inline::{InlineFlow, InlineFragmentNodeFlags}; use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
use ipc_channel::ipc; use ipc_channel::ipc;
use list_item::ListItemFlow; use crate::list_item::ListItemFlow;
use model::MaybeAuto; 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 +65,7 @@ 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 table_cell::CollapsedBordersForCell; 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

@ -5,7 +5,7 @@
// FIXME(rust-lang/rust#26264): Remove GenericEndingShape and GenericGradientItem. // FIXME(rust-lang/rust#26264): Remove GenericEndingShape and GenericGradientItem.
use app_units::Au; use app_units::Au;
use display_list::ToLayout; use crate::display_list::ToLayout;
use euclid::{Point2D, Size2D, Vector2D}; use euclid::{Point2D, Size2D, Vector2D};
use style::properties::ComputedValues; use style::properties::ComputedValues;
use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position}; use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position};

View file

@ -7,8 +7,8 @@
// This might be achieved by sharing types between WR and Servo display lists, or // This might be achieved by sharing types between WR and Servo display lists, or
// completely converting layout to directly generate WebRender display lists, for example. // completely converting layout to directly generate WebRender display lists, for example.
use display_list::items::{ClipScrollNode, ClipScrollNodeIndex, ClipScrollNodeType}; use crate::display_list::items::{ClipScrollNode, ClipScrollNodeIndex, ClipScrollNodeType};
use display_list::items::{DisplayItem, DisplayList, StackingContextType}; use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType};
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use webrender_api::{self, ClipAndScrollInfo, ClipId, DisplayListBuilder, RasterSpace}; use webrender_api::{self, ClipAndScrollInfo, ClipId, DisplayListBuilder, RasterSpace};
use webrender_api::{LayoutPoint, SpecificDisplayItem}; use webrender_api::{LayoutPoint, SpecificDisplayItem};

View file

@ -5,17 +5,17 @@
//! Layout for elements with a CSS `display` property of `flex`. //! Layout for elements with a CSS `display` property of `flex`.
use app_units::{Au, MAX_AU}; use app_units::{Au, MAX_AU};
use block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseFlag}; use crate::block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseFlag};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding}; use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
use display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use euclid::Point2D; use euclid::Point2D;
use floats::FloatKind; use crate::floats::FloatKind;
use flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags}; use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use layout_debug; use crate::layout_debug;
use model::{AdjoiningMargins, CollapsibleMargins}; use crate::model::{AdjoiningMargins, CollapsibleMargins};
use model::{IntrinsicISizes, MaybeAuto, SizeConstraint}; use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
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 +29,7 @@ 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 traversal::PreorderFlowTraversal; 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
@ -348,7 +348,7 @@ impl FlexLine {
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for FlexFlow {} unsafe impl crate::flow::HasBaseFlow for FlexFlow {}
/// A block with the CSS `display` property equal to `flex`. /// A block with the CSS `display` property equal to `flex`.
#[derive(Debug, Serialize)] #[derive(Debug, Serialize)]
@ -1099,7 +1099,7 @@ impl Flow for FlexFlow {
self.block_flow.collect_stacking_contexts(state); self.block_flow.collect_stacking_contexts(state);
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

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 app_units::{Au, MAX_AU}; use app_units::{Au, MAX_AU};
use block::FormattingContextType; use crate::block::FormattingContextType;
use flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
use persistent_list::PersistentList; use crate::persistent_list::PersistentList;
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::fmt; use std::fmt;
use style::computed_values::float::T as StyleFloat; use style::computed_values::float::T as StyleFloat;

View file

@ -26,22 +26,22 @@
//! similar methods. //! similar methods.
use app_units::Au; use app_units::Au;
use block::{BlockFlow, FormattingContextType}; use crate::block::{BlockFlow, FormattingContextType};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use display_list::items::ClippingAndScrolling; use crate::display_list::items::ClippingAndScrolling;
use euclid::{Point2D, Vector2D, Rect, Size2D}; use euclid::{Point2D, Vector2D, Rect, Size2D};
use flex::FlexFlow; use crate::flex::FlexFlow;
use floats::{Floats, SpeculatedFloatPlacement}; use crate::floats::{Floats, SpeculatedFloatPlacement};
use flow_list::{FlowList, FlowListIterator, MutFlowListIterator}; use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
use flow_ref::{FlowRef, WeakFlowRef}; use crate::flow_ref::{FlowRef, WeakFlowRef};
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::StackingContextId; use gfx_traits::StackingContextId;
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use inline::InlineFlow; use crate::inline::InlineFlow;
use model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo}; use crate::model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
use multicol::MulticolFlow; use crate::multicol::MulticolFlow;
use parallel::FlowParallelInfo; use crate::parallel::FlowParallelInfo;
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 +60,13 @@ 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 table::TableFlow; use crate::table::TableFlow;
use table_caption::TableCaptionFlow; use crate::table_caption::TableCaptionFlow;
use table_cell::TableCellFlow; use crate::table_cell::TableCellFlow;
use table_colgroup::TableColGroupFlow; use crate::table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow; use crate::table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow; use crate::table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow; 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
@ -502,7 +502,7 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
/// Attempts to perform incremental fixup of this flow by replacing its fragment's style with /// Attempts to perform incremental fixup of this flow by replacing its fragment's style with
/// the new style. This can only succeed if the flow has exactly one fragment. /// the new style. This can only succeed if the flow has exactly one fragment.
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>); fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>);
/// Print any extra children (such as fragments) contained in this Flow /// Print any extra children (such as fragments) contained in this Flow
/// for debugging purposes. Any items inserted into the tree will become /// for debugging purposes. Any items inserted into the tree will become
@ -578,7 +578,7 @@ pub trait ImmutableFlowUtils {
pub trait MutableFlowUtils { pub trait MutableFlowUtils {
/// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of /// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of
/// calling them individually, since there is no reason not to perform both operations. /// calling them individually, since there is no reason not to perform both operations.
fn repair_style_and_bubble_inline_sizes(self, style: &::ServoArc<ComputedValues>); fn repair_style_and_bubble_inline_sizes(self, style: &crate::ServoArc<ComputedValues>);
} }
pub trait MutableOwnedFlowUtils { pub trait MutableOwnedFlowUtils {
@ -1422,7 +1422,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
impl<'a> MutableFlowUtils for &'a mut Flow { impl<'a> MutableFlowUtils for &'a mut Flow {
/// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of /// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of
/// calling them individually, since there is no reason not to perform both operations. /// calling them individually, since there is no reason not to perform both operations.
fn repair_style_and_bubble_inline_sizes(self, style: &::ServoArc<ComputedValues>) { fn repair_style_and_bubble_inline_sizes(self, style: &crate::ServoArc<ComputedValues>) {
self.repair_style(style); self.repair_style(style);
self.mut_base().update_flags_if_needed(style); self.mut_base().update_flags_if_needed(style);
self.bubble_inline_sizes(); self.bubble_inline_sizes();

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 flow::{Flow, FlowClass}; use crate::flow::{Flow, FlowClass};
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use serde::ser::{Serialize, SerializeSeq, Serializer}; use serde::ser::{Serialize, SerializeSeq, Serializer};
use serde_json::{Map, Value, to_value}; use serde_json::{Map, Value, to_value};
use std::collections::{LinkedList, linked_list}; use std::collections::{LinkedList, linked_list};

View file

@ -8,7 +8,7 @@
//! be superfluous. This design is largely duplicating logic of Arc<T> and //! be superfluous. This design is largely duplicating logic of Arc<T> and
//! Weak<T>; please see comments there for details. //! Weak<T>; please see comments there for details.
use flow::Flow; use crate::flow::Flow;
use std::ops::Deref; use std::ops::Deref;
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};

View file

@ -4,27 +4,27 @@
//! The `Fragment` type, which represents the leaves of the layout tree. //! The `Fragment` type, which represents the leaves of the layout tree.
use ServoArc; use crate::ServoArc;
use app_units::Au; use app_units::Au;
use canvas_traits::canvas::{CanvasMsg, CanvasId}; use canvas_traits::canvas::{CanvasMsg, CanvasId};
use context::{LayoutContext, with_thread_local_font_context}; use crate::context::{LayoutContext, with_thread_local_font_context};
use display_list::ToLayout; use crate::display_list::ToLayout;
use 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 euclid::{Point2D, Vector2D, Rect, Size2D};
use floats::ClearType; use crate::floats::ClearType;
use flow::{GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use gfx; use gfx;
use gfx::text::glyph::ByteIndex; use gfx::text::glyph::ByteIndex;
use gfx::text::text_run::{TextRun, TextRunSlice}; use gfx::text::text_run::{TextRun, TextRunSlice};
use gfx_traits::StackingContextId; use gfx_traits::StackingContextId;
use inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo}; use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
use inline::{InlineMetrics, LineMetrics}; use crate::inline::{InlineMetrics, LineMetrics};
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
use layout_debug; use crate::layout_debug;
use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint}; use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
use model::style_length; use crate::model::style_length;
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 +60,10 @@ 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 text; use crate::text;
use text::TextRunScanner; use crate::text::TextRunScanner;
use webrender_api::{self, LayoutTransform}; use webrender_api::{self, LayoutTransform};
use wrapper::ThreadSafeLayoutNodeHelpers; 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

@ -8,10 +8,10 @@
//! done in parallel and is therefore a sequential pass that runs on as little of the flow tree //! done in parallel and is therefore a sequential pass that runs on as little of the flow tree
//! as possible. //! as possible.
use context::{LayoutContext, with_thread_local_font_context}; use crate::context::{LayoutContext, with_thread_local_font_context};
use display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo}; use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
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 +21,8 @@ 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 text::TextRunScanner; use crate::text::TextRunScanner;
use traversal::InorderFlowTraversal; 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'];
@ -428,7 +428,7 @@ impl Counter {
layout_context: &LayoutContext, layout_context: &LayoutContext,
node: OpaqueNode, node: OpaqueNode,
pseudo: PseudoElementType, pseudo: PseudoElementType,
style: ::ServoArc<ComputedValues>, style: crate::ServoArc<ComputedValues>,
list_style_type: ListStyleType, list_style_type: ListStyleType,
mode: RenderingMode, mode: RenderingMode,
) -> Option<SpecificFragmentInfo> { ) -> Option<SpecificFragmentInfo> {
@ -492,7 +492,7 @@ fn render_text(
layout_context: &LayoutContext, layout_context: &LayoutContext,
node: OpaqueNode, node: OpaqueNode,
pseudo: PseudoElementType, pseudo: PseudoElementType,
style: ::ServoArc<ComputedValues>, style: crate::ServoArc<ComputedValues>,
string: String, string: String,
) -> Option<SpecificFragmentInfo> { ) -> Option<SpecificFragmentInfo> {
let mut fragments = LinkedList::new(); let mut fragments = LinkedList::new();

View file

@ -2,7 +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 flow::{FlowFlags, Flow, GetBaseFlow}; use crate::flow::{FlowFlags, Flow, GetBaseFlow};
use style::computed_values::float::T as Float; use style::computed_values::float::T as Float;
use style::selector_parser::RestyleDamage; use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;

View file

@ -2,25 +2,25 @@
* 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 ServoArc; use crate::ServoArc;
use app_units::{Au, MIN_AU}; use app_units::{Au, MIN_AU};
use block::AbsoluteAssignBSizesTraversal; use crate::block::AbsoluteAssignBSizesTraversal;
use context::{LayoutContext, LayoutFontContext}; use crate::context::{LayoutContext, LayoutFontContext};
use display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding}; use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
use display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use euclid::{Point2D, Size2D}; use euclid::{Point2D, Size2D};
use floats::{FloatKind, Floats, PlacementInfo}; use crate::floats::{FloatKind, Floats, PlacementInfo};
use flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag}; use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
use flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow}; use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use fragment::FragmentFlags; use crate::fragment::FragmentFlags;
use fragment::SpecificFragmentInfo; use crate::fragment::SpecificFragmentInfo;
use gfx::font::FontMetrics; use gfx::font::FontMetrics;
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use layout_debug; use crate::layout_debug;
use model::IntrinsicISizesContribution; use crate::model::IntrinsicISizesContribution;
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 +39,8 @@ 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 text; use crate::text;
use traversal::PreorderFlowTraversal; 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
@ -943,7 +943,7 @@ impl InlineFragments {
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for InlineFlow {} unsafe impl crate::flow::HasBaseFlow for InlineFlow {}
/// Flows for inline layout. /// Flows for inline layout.
#[derive(Serialize)] #[derive(Serialize)]

View file

@ -5,8 +5,8 @@
//! Supports writing a trace file created during each layout scope //! Supports writing a trace file created during each layout scope
//! that can be viewed by an external tool to make layout debugging easier. //! that can be viewed by an external tool to make layout debugging easier.
use flow::GetBaseFlow; use crate::flow::GetBaseFlow;
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
use serde_json::{to_string, to_value, Value}; use serde_json::{to_string, to_value, Value};
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -87,8 +87,8 @@ pub mod traversal;
pub mod wrapper; pub mod wrapper;
// For unit tests: // For unit tests:
pub use fragment::Fragment; pub use crate::fragment::Fragment;
pub use fragment::SpecificFragmentInfo; pub use crate::fragment::SpecificFragmentInfo;
pub use self::data::LayoutData; pub use self::data::LayoutData;
// We can't use servo_arc for everything in layout, because the Flow stuff uses // We can't use servo_arc for everything in layout, because the Flow stuff uses

View file

@ -6,17 +6,17 @@
//! block and an extra inline fragment for the marker. //! block and an extra inline fragment for the marker.
use app_units::Au; use app_units::Au;
use block::BlockFlow; use crate::block::BlockFlow;
use context::{LayoutContext, with_thread_local_font_context}; use crate::context::{LayoutContext, with_thread_local_font_context};
use display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding}; use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
use display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use euclid::Point2D; use euclid::Point2D;
use floats::FloatKind; use crate::floats::FloatKind;
use flow::{Flow, FlowClass, OpaqueFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow};
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo}; use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
use fragment::Overflow; use crate::fragment::Overflow;
use generated_content; use crate::generated_content;
use inline::InlineFlow; use crate::inline::InlineFlow;
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;
@ -24,7 +24,7 @@ use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for ListItemFlow {} unsafe impl crate::flow::HasBaseFlow for ListItemFlow {}
/// A block with the CSS `display` property equal to `list-item`. /// A block with the CSS `display` property equal to `list-item`.
#[derive(Debug)] #[derive(Debug)]
@ -194,7 +194,7 @@ impl Flow for ListItemFlow {
self.block_flow.collect_stacking_contexts(state); self.block_flow.collect_stacking_contexts(state);
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -6,7 +6,7 @@
use app_units::Au; use app_units::Au;
use euclid::SideOffsets2D; use euclid::SideOffsets2D;
use fragment::Fragment; use crate::fragment::Fragment;
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 ServoArc; use crate::ServoArc;
use app_units::Au; use app_units::Au;
use block::BlockFlow; use crate::block::BlockFlow;
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use euclid::{Point2D, Vector2D}; use euclid::{Point2D, Vector2D};
use floats::FloatKind; use crate::floats::FloatKind;
use flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
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;
@ -24,7 +24,7 @@ use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone
use style::values::generics::column::ColumnCount; use style::values::generics::column::ColumnCount;
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for MulticolFlow {} unsafe impl crate::flow::HasBaseFlow for MulticolFlow {}
#[repr(C)] #[repr(C)]
pub struct MulticolFlow { pub struct MulticolFlow {
@ -36,7 +36,7 @@ pub struct MulticolFlow {
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for MulticolColumnFlow {} unsafe impl crate::flow::HasBaseFlow for MulticolColumnFlow {}
#[repr(C)] #[repr(C)]
pub struct MulticolColumnFlow { pub struct MulticolColumnFlow {

View file

@ -2,7 +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 display_list::items::OpaqueNode; use crate::display_list::items::OpaqueNode;
use libc::c_void; use libc::c_void;
use script_traits::UntrustedNodeAddress; use script_traits::UntrustedNodeAddress;

View file

@ -8,10 +8,10 @@
#![allow(unsafe_code)] #![allow(unsafe_code)]
use block::BlockFlow; use crate::block::BlockFlow;
use context::LayoutContext; use crate::context::LayoutContext;
use flow::{Flow, GetBaseFlow}; use crate::flow::{Flow, GetBaseFlow};
use flow_ref::FlowRef; use crate::flow_ref::FlowRef;
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 +19,8 @@ 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 traversal::{AssignBSizes, AssignISizes, BubbleISizes}; use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
use traversal::{PostorderFlowTraversal, PreorderFlowTraversal}; use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
/// Traversal chunk size. /// Traversal chunk size.
const CHUNK_SIZE: usize = 16; const CHUNK_SIZE: usize = 16;

View file

@ -5,17 +5,17 @@
//! Utilities for querying the layout, as needed by the layout thread. //! Utilities for querying the layout, as needed by the layout thread.
use app_units::Au; use app_units::Au;
use construct::ConstructionResult; use crate::construct::ConstructionResult;
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::IndexableText; use crate::display_list::IndexableText;
use display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap}; use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
use euclid::{Point2D, Vector2D, Rect, Size2D}; use euclid::{Point2D, Vector2D, Rect, Size2D};
use flow::{Flow, GetBaseFlow}; use crate::flow::{Flow, GetBaseFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use inline::InlineFragmentNodeFlags; use crate::inline::InlineFragmentNodeFlags;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use opaque_node::OpaqueNodeMethods; 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 +25,7 @@ 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 sequential; 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 +39,7 @@ 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 wrapper::LayoutNodeLayoutData; use crate::wrapper::LayoutNodeLayoutData;
/// Mutable data belonging to the LayoutThread. /// Mutable data belonging to the LayoutThread.
/// ///

View file

@ -5,18 +5,18 @@
//! Implements sequential traversals over the DOM and flow trees. //! Implements sequential traversals over the DOM and flow trees.
use app_units::Au; use app_units::Au;
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use euclid::{Point2D, Vector2D}; use euclid::{Point2D, Vector2D};
use floats::SpeculatedFloatPlacement; use crate::floats::SpeculatedFloatPlacement;
use flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow}; use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
use fragment::{FragmentBorderBoxIterator, CoordinateSystem}; use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem};
use generated_content::ResolveGeneratedContent; use crate::generated_content::ResolveGeneratedContent;
use incremental::RelayoutMode; use crate::incremental::RelayoutMode;
use servo_config::opts; use servo_config::opts;
use style::servo::restyle_damage::ServoRestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage;
use traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList}; use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
use traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal}; use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal};
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

@ -5,18 +5,18 @@
//! CSS table formatting contexts. //! CSS table formatting contexts.
use app_units::Au; use app_units::Au;
use block::{BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer}; use crate::block::{BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
use block::{ISizeConstraintInput, ISizeConstraintSolution}; use crate::block::{ISizeConstraintInput, ISizeConstraintSolution};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode}; use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D; use euclid::Point2D;
use flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow}; use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
use flow_list::{FlowListIterator, MutFlowListIterator}; use crate::flow_list::{FlowListIterator, MutFlowListIterator};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use layout_debug; use crate::layout_debug;
use model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto}; use crate::model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
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,13 +26,13 @@ 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 table_cell::TableCellFlow; use crate::table_cell::TableCellFlow;
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance}; use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use table_row::{TableRowFlow, TableRowSizeData}; use crate::table_row::{TableRowFlow, TableRowSizeData};
use table_wrapper::TableLayout; use crate::table_wrapper::TableLayout;
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableFlow {} unsafe impl crate::flow::HasBaseFlow for TableFlow {}
/// A table flow corresponded to the table's internal table fragment under a table wrapper flow. /// A table flow corresponded to the table's internal table fragment under a table wrapper flow.
/// The properties `position`, `float`, and `margin-*` are used on the table wrapper fragment, /// The properties `position`, `float`, and `margin-*` are used on the table wrapper fragment,
@ -596,7 +596,7 @@ impl Flow for TableFlow {
); );
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -5,20 +5,20 @@
//! CSS table formatting contexts. //! CSS table formatting contexts.
use app_units::Au; use app_units::Au;
use block::BlockFlow; use crate::block::BlockFlow;
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D; use euclid::Point2D;
use flow::{Flow, FlowClass, OpaqueFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
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;
use style::properties::ComputedValues; use style::properties::ComputedValues;
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableCaptionFlow {} unsafe impl crate::flow::HasBaseFlow for TableCaptionFlow {}
/// A table formatting context. /// A table formatting context.
#[repr(C)] #[repr(C)]
@ -93,7 +93,7 @@ impl Flow for TableCaptionFlow {
.collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty()); .collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -5,16 +5,16 @@
//! CSS table formatting contexts. //! CSS table formatting contexts.
use app_units::Au; use app_units::Au;
use block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag}; use crate::block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::{Point2D, Rect, SideOffsets2D, Size2D}; use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow}; use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use layout_debug; use crate::layout_debug;
use model::MaybeAuto; use crate::model::MaybeAuto;
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,11 +22,11 @@ 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 table::InternalTable; use crate::table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance}; use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableCellFlow {} unsafe impl crate::flow::HasBaseFlow for TableCellFlow {}
/// A table formatting context. /// A table formatting context.
#[derive(Serialize)] #[derive(Serialize)]
@ -311,7 +311,7 @@ impl Flow for TableCellFlow {
.collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty()); .collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -5,19 +5,19 @@
//! CSS table formatting contexts. //! CSS table formatting contexts.
use app_units::Au; use app_units::Au;
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use euclid::Point2D; use euclid::Point2D;
use flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow}; use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use layout_debug; use crate::layout_debug;
use std::fmt; use std::fmt;
use style::logical_geometry::LogicalSize; use style::logical_geometry::LogicalSize;
use style::properties::ComputedValues; use style::properties::ComputedValues;
use style::values::computed::LengthOrPercentageOrAuto; use style::values::computed::LengthOrPercentageOrAuto;
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableColGroupFlow {} unsafe impl crate::flow::HasBaseFlow for TableColGroupFlow {}
/// A table formatting context. /// A table formatting context.
#[repr(C)] #[repr(C)]
@ -100,7 +100,7 @@ impl Flow for TableColGroupFlow {
self.base.clipping_and_scrolling = Some(state.current_clipping_and_scrolling); self.base.clipping_and_scrolling = Some(state.current_clipping_and_scrolling);
} }
fn repair_style(&mut self, _: &::ServoArc<ComputedValues>) {} fn repair_style(&mut self, _: &crate::ServoArc<ComputedValues>) {}
fn compute_overflow(&self) -> Overflow { fn compute_overflow(&self) -> Overflow {
Overflow::new() Overflow::new()

View file

@ -5,17 +5,17 @@
//! CSS table formatting contexts. //! CSS table formatting contexts.
use app_units::Au; use app_units::Au;
use block::{BlockFlow, ISizeAndMarginsComputer}; use crate::block::{BlockFlow, ISizeAndMarginsComputer};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D; use euclid::Point2D;
use flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow}; use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
use flow_list::MutFlowListIterator; use crate::flow_list::MutFlowListIterator;
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use layout_debug; use crate::layout_debug;
use model::MaybeAuto; use crate::model::MaybeAuto;
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use std::cmp::max; use std::cmp::max;
use std::fmt; use std::fmt;
@ -26,11 +26,11 @@ 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 table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt}; use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use table_cell::{CollapsedBordersForCell, TableCellFlow}; use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableRowFlow {} unsafe impl crate::flow::HasBaseFlow for TableRowFlow {}
/// A single row of a table. /// A single row of a table.
#[repr(C)] #[repr(C)]
@ -626,7 +626,7 @@ impl Flow for TableRowFlow {
.collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty()); .collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -5,25 +5,25 @@
//! CSS table formatting contexts. //! CSS table formatting contexts.
use app_units::Au; use app_units::Au;
use block::{BlockFlow, ISizeAndMarginsComputer}; use crate::block::{BlockFlow, ISizeAndMarginsComputer};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState}; use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use euclid::Point2D; use euclid::Point2D;
use flow::{Flow, FlowClass, OpaqueFlow}; use crate::flow::{Flow, FlowClass, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use layout_debug; use crate::layout_debug;
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 table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow}; use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableRowGroupFlow {} unsafe impl crate::flow::HasBaseFlow for TableRowGroupFlow {}
/// A table formatting context. /// A table formatting context.
#[repr(C)] #[repr(C)]
@ -224,7 +224,7 @@ impl Flow for TableRowGroupFlow {
); );
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -12,17 +12,17 @@
//! Hereafter this document is referred to as INTRINSIC. //! Hereafter this document is referred to as INTRINSIC.
use app_units::Au; use app_units::Au;
use block::{AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput}; use crate::block::{AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput};
use block::{ISizeConstraintSolution, MarginsMayCollapseFlag}; use crate::block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags}; use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags};
use display_list::StackingContextCollectionState; use crate::display_list::StackingContextCollectionState;
use euclid::Point2D; use euclid::Point2D;
use floats::FloatKind; use crate::floats::FloatKind;
use flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow}; use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree; use gfx_traits::print_tree::PrintTree;
use model::MaybeAuto; use crate::model::MaybeAuto;
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 +32,7 @@ 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 table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize}; use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
#[derive(Clone, Copy, Debug, Serialize)] #[derive(Clone, Copy, Debug, Serialize)]
pub enum TableLayout { pub enum TableLayout {
@ -41,7 +41,7 @@ pub enum TableLayout {
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for TableWrapperFlow {} unsafe impl crate::flow::HasBaseFlow for TableWrapperFlow {}
/// A table wrapper flow based on a block formatting context. /// A table wrapper flow based on a block formatting context.
#[derive(Serialize)] #[derive(Serialize)]
@ -515,7 +515,7 @@ impl Flow for TableWrapperFlow {
); );
} }
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) { fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
self.block_flow.repair_style(new_style) self.block_flow.repair_style(new_style)
} }

View file

@ -5,15 +5,15 @@
//! Text layout. //! Text layout.
use app_units::Au; use app_units::Au;
use context::LayoutFontContext; use crate::context::LayoutFontContext;
use fragment::{Fragment, ScannedTextFlags}; use crate::fragment::{Fragment, ScannedTextFlags};
use fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo}; use crate::fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
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 inline::{InlineFragmentNodeFlags, InlineFragments}; use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
use linked_list::split_off_head; 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;
@ -508,7 +508,7 @@ fn bounding_box_for_run_metrics(
#[inline] #[inline]
pub fn font_metrics_for_style( pub fn font_metrics_for_style(
mut font_context: &mut LayoutFontContext, mut font_context: &mut LayoutFontContext,
style: ::ServoArc<FontStyleStruct>, style: crate::ServoArc<FontStyleStruct>,
) -> FontMetrics { ) -> FontMetrics {
let font_group = font_context.font_group(style); let font_group = font_context.font_group(style);
let font = font_group.borrow_mut().first(&mut font_context); let font = font_group.borrow_mut().first(&mut font_context);

View file

@ -4,10 +4,10 @@
//! Traversals over the DOM and flow trees, running the layout computations. //! Traversals over the DOM and flow trees, running the layout computations.
use construct::FlowConstructor; use crate::construct::FlowConstructor;
use context::LayoutContext; use crate::context::LayoutContext;
use display_list::DisplayListBuildState; use crate::display_list::DisplayListBuildState;
use flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils}; use crate::flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils};
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 +17,8 @@ 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 wrapper::{GetRawData, LayoutNodeLayoutData}; use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
use wrapper::ThreadSafeLayoutNodeHelpers; use crate::wrapper::ThreadSafeLayoutNodeHelpers;
pub struct RecalcStyleAndConstructFlows<'a> { pub struct RecalcStyleAndConstructFlows<'a> {
context: LayoutContext<'a>, context: LayoutContext<'a>,
@ -220,7 +220,7 @@ where
.mutate_layout_data() .mutate_layout_data()
.unwrap() .unwrap()
.flags .flags
.insert(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED); .insert(crate::data::LayoutDataFlags::HAS_BEEN_TRAVERSED);
} }
if let Some(el) = node.as_element() { if let Some(el) = node.as_element() {

View file

@ -31,7 +31,7 @@
#![allow(unsafe_code)] #![allow(unsafe_code)]
use atomic_refcell::{AtomicRef, AtomicRefMut}; use atomic_refcell::{AtomicRef, AtomicRefMut};
use data::{LayoutData, LayoutDataFlags, StyleAndLayoutData}; use crate::data::{LayoutData, LayoutDataFlags, StyleAndLayoutData};
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode}; use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use script_layout_interface::wrapper_traits::GetLayoutData; use script_layout_interface::wrapper_traits::GetLayoutData;
use style::dom::{NodeInfo, TNode}; use style::dom::{NodeInfo, TNode};
@ -144,7 +144,7 @@ impl<T: ThreadSafeLayoutNode> ThreadSafeLayoutNodeHelpers for T {
.layout_data .layout_data
.borrow() .borrow()
.flags .flags
.contains(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED) .contains(crate::data::LayoutDataFlags::HAS_BEEN_TRAVERSED)
{ {
// We're reflowing a node that was styled for the first time and // We're reflowing a node that was styled for the first time and
// has never been visited by layout. Return rebuild_and_reflow, // has never been visited by layout. Return rebuild_and_reflow,

View file

@ -55,8 +55,8 @@ extern crate webrender_api;
mod dom_wrapper; mod dom_wrapper;
use app_units::Au; use app_units::Au;
use dom_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode}; use crate::dom_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode};
use dom_wrapper::drop_style_and_layout_data; use crate::dom_wrapper::drop_style_and_layout_data;
use embedder_traits::resources::{self, Resource}; use embedder_traits::resources::{self, Resource};
use euclid::{Point2D, Rect, Size2D, TypedScale, TypedSize2D}; use euclid::{Point2D, Rect, Size2D, TypedScale, TypedSize2D};
use fnv::FnvHashMap; use fnv::FnvHashMap;

View file

@ -2,7 +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 filemanager_thread::FileManager; use crate::filemanager_thread::FileManager;
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{ContentLength, ContentType}; use headers_ext::{ContentLength, ContentType};
use http::HeaderMap; use http::HeaderMap;

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::hosts::replace_host;
use crate::http_loader::Decoder;
use flate2::read::GzDecoder; use flate2::read::GzDecoder;
use hosts::replace_host;
use http_loader::Decoder;
use hyper::{Body, Client}; use hyper::{Body, Client};
use hyper::body::Payload; use hyper::body::Payload;
use hyper::client::HttpConnector as HyperHttpConnector; use hyper::client::HttpConnector as HyperHttpConnector;

View file

@ -5,7 +5,7 @@
//! Implementation of cookie creation and matching as specified by //! Implementation of cookie creation and matching as specified by
//! http://tools.ietf.org/html/rfc6265 //! http://tools.ietf.org/html/rfc6265
use cookie_rs; use crate::cookie_rs;
use hyper_serde::{self, Serde}; use hyper_serde::{self, Serde};
use net_traits::CookieSource; use net_traits::CookieSource;
use net_traits::pub_domains::is_pub_domain; use net_traits::pub_domains::is_pub_domain;

View file

@ -5,8 +5,8 @@
//! Implementation of cookie storage as specified in //! Implementation of cookie storage as specified in
//! http://tools.ietf.org/html/rfc6265 //! http://tools.ietf.org/html/rfc6265
use cookie::Cookie; use crate::cookie::Cookie;
use cookie_rs; use crate::cookie_rs;
use net_traits::CookieSource; use net_traits::CookieSource;
use net_traits::pub_domains::reg_suffix; use net_traits::pub_domains::reg_suffix;
use servo_url::ServoUrl; use servo_url::ServoUrl;

View file

@ -2,16 +2,16 @@
* 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 blob_loader::load_blob_sync; use crate::blob_loader::load_blob_sync;
use data_loader::decode; use crate::data_loader::decode;
use devtools_traits::DevtoolsControlMsg; use devtools_traits::DevtoolsControlMsg;
use fetch::cors_cache::CorsCache; use crate::fetch::cors_cache::CorsCache;
use filemanager_thread::FileManager; use crate::filemanager_thread::FileManager;
use crate::http_loader::{HttpState, determine_request_referrer, http_fetch};
use crate::http_loader::{set_default_accept, set_default_accept_language};
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};
use http_loader::{HttpState, determine_request_referrer, http_fetch};
use http_loader::{set_default_accept, set_default_accept_language};
use hyper::Method; use hyper::Method;
use hyper::StatusCode; use hyper::StatusCode;
use ipc_channel::ipc::IpcReceiver; use ipc_channel::ipc::IpcReceiver;
@ -32,7 +32,7 @@ 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 subresource_integrity::is_response_integrity_valid; 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,7 +7,7 @@
//! A memory cache implementing the logic specified in <http://tools.ietf.org/html/rfc7234> //! A memory cache implementing the logic specified in <http://tools.ietf.org/html/rfc7234>
//! and <http://tools.ietf.org/html/rfc7232>. //! and <http://tools.ietf.org/html/rfc7232>.
use fetch::methods::{Data, DoneChannel}; use crate::fetch::methods::{Data, DoneChannel};
use headers_core::HeaderMapExt; use headers_core::HeaderMapExt;
use headers_ext::{CacheControl, ContentRange, Expires, LastModified, Pragma, Range, Vary}; use headers_ext::{CacheControl, ContentRange, Expires, LastModified, Pragma, Range, Vary};
use http::{header, HeaderMap}; use http::{header, HeaderMap};

View file

@ -4,26 +4,26 @@
use brotli::Decompressor; use brotli::Decompressor;
use bytes::Bytes; use bytes::Bytes;
use connector::{BUF_SIZE, Connector, create_http_client, WrappedBody}; use crate::connector::{BUF_SIZE, Connector, create_http_client, WrappedBody};
use cookie; use crate::cookie;
use cookie_storage::CookieStorage; use crate::cookie_storage::CookieStorage;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest}; use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
use devtools_traits::{HttpResponse as DevtoolsHttpResponse, NetworkEvent}; use devtools_traits::{HttpResponse as DevtoolsHttpResponse, NetworkEvent};
use fetch::cors_cache::CorsCache; use crate::fetch::cors_cache::CorsCache;
use fetch::methods::{Data, DoneChannel, FetchContext, Target}; use crate::fetch::methods::{Data, DoneChannel, FetchContext, Target};
use 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 flate2::read::{DeflateDecoder, GzDecoder};
use crate::hsts::HstsList;
use crate::http_cache::HttpCache;
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};
use headers_ext::{AccessControlAllowOrigin, AccessControlMaxAge, Basic}; use headers_ext::{AccessControlAllowOrigin, AccessControlMaxAge, Basic};
use headers_ext::{CacheControl, ContentEncoding, ContentLength}; use headers_ext::{CacheControl, ContentEncoding, ContentLength};
use headers_ext::{Host, IfModifiedSince, LastModified, Origin as HyperOrigin, Pragma, Referer, UserAgent}; use headers_ext::{Host, IfModifiedSince, LastModified, Origin as HyperOrigin, Pragma, Referer, UserAgent};
use hsts::HstsList;
use http::{HeaderMap, Request as HyperRequest}; use http::{HeaderMap, Request as HyperRequest};
use http::header::{self, HeaderName, HeaderValue}; use http::header::{self, HeaderName, HeaderValue};
use http::uri::Authority; use http::uri::Authority;
use http_cache::HttpCache;
use hyper::{Body, Client, Method, StatusCode, Response as HyperResponse}; use hyper::{Body, Client, Method, StatusCode, Response as HyperResponse};
use hyper_serde::Serde; use hyper_serde::Serde;
use log; use log;
@ -36,7 +36,7 @@ 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 resource_thread::AuthCache; 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};

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