mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
Reorder imports
This commit is contained in:
parent
4a947dd719
commit
9e92eb205a
546 changed files with 1968 additions and 1536 deletions
|
@ -23,7 +23,7 @@ mod platform {
|
|||
|
||||
/// Memory allocation APIs compatible with libc
|
||||
pub mod libc_compat {
|
||||
pub use super::ffi::{malloc, realloc, free};
|
||||
pub use super::ffi::{free, malloc, realloc};
|
||||
}
|
||||
|
||||
pub struct Allocator;
|
||||
|
@ -98,8 +98,8 @@ mod platform {
|
|||
mod platform {
|
||||
extern crate kernel32;
|
||||
|
||||
pub use std::alloc::System as Allocator;
|
||||
use self::kernel32::{GetProcessHeap, HeapSize, HeapValidate};
|
||||
pub use std::alloc::System as Allocator;
|
||||
use std::os::raw::c_void;
|
||||
|
||||
/// Get the size of a heap block.
|
||||
|
|
|
@ -6,7 +6,7 @@ extern crate string_cache_codegen;
|
|||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::{BufReader, BufRead};
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -16,11 +16,13 @@ extern crate uuid;
|
|||
|
||||
pub mod test;
|
||||
|
||||
use bluetooth_traits::blocklist::{uuid_is_blocklisted, Blocklist};
|
||||
use bluetooth_traits::scanfilter::{
|
||||
BluetoothScanfilter, BluetoothScanfilterSequence, RequestDeviceoptions,
|
||||
};
|
||||
use bluetooth_traits::{BluetoothCharacteristicMsg, BluetoothDescriptorMsg, BluetoothServiceMsg};
|
||||
use bluetooth_traits::{BluetoothDeviceMsg, BluetoothRequest, BluetoothResponse, GATTType};
|
||||
use bluetooth_traits::{BluetoothError, BluetoothResponseResult, BluetoothResult};
|
||||
use bluetooth_traits::blocklist::{uuid_is_blocklisted, Blocklist};
|
||||
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence, RequestDeviceoptions};
|
||||
use device::bluetooth::{BluetoothAdapter, BluetoothDevice, BluetoothGATTCharacteristic};
|
||||
use device::bluetooth::{BluetoothGATTDescriptor, BluetoothGATTService};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy};
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
|
||||
use crate::BluetoothManager;
|
||||
use device::bluetooth::{BluetoothAdapter, BluetoothDevice};
|
||||
use device::bluetooth::{BluetoothGATTCharacteristic, BluetoothGATTDescriptor, BluetoothGATTService};
|
||||
use device::bluetooth::{
|
||||
BluetoothGATTCharacteristic, BluetoothGATTDescriptor, BluetoothGATTService,
|
||||
};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::{HashSet, HashMap};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::error::Error;
|
||||
use std::string::String;
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use azure::azure::AzFloat;
|
||||
use azure::azure_hl::SurfacePattern;
|
||||
use azure::azure_hl::{AntialiasMode, CapStyle, CompositionOp, JoinStyle};
|
||||
use azure::azure_hl::{BackendType, DrawOptions, DrawTarget, Pattern, StrokeOptions, SurfaceFormat};
|
||||
use azure::azure_hl::{
|
||||
BackendType, DrawOptions, DrawTarget, Pattern, StrokeOptions, SurfaceFormat,
|
||||
};
|
||||
use azure::azure_hl::{Color, ColorPattern, DrawSurfaceOptions, Filter, PathBuilder};
|
||||
use azure::azure_hl::{ExtendMode, GradientStop, LinearGradientPattern, RadialGradientPattern};
|
||||
use azure::azure_hl::SurfacePattern;
|
||||
use canvas_traits::canvas::*;
|
||||
use cssparser::RGBA;
|
||||
use euclid::{Transform2D, Point2D, Vector2D, Rect, Size2D};
|
||||
use euclid::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use num_traits::ToPrimitive;
|
||||
use pixels;
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
* 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/. */
|
||||
|
||||
use canvas_traits::webgl::{WebGLCommand, WebGLVersion, WebGLCommandBacktrace};
|
||||
use compositing::compositor_thread::{CompositorProxy, self};
|
||||
use super::webgl_thread::{GLState, WebGLImpl};
|
||||
use canvas_traits::webgl::{WebGLCommand, WebGLCommandBacktrace, WebGLVersion};
|
||||
use compositing::compositor_thread::{self, CompositorProxy};
|
||||
use euclid::Size2D;
|
||||
use gleam::gl;
|
||||
use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes, GLContextDispatcher};
|
||||
use offscreen_gl_context::{
|
||||
ColorAttachmentType, GLContext, GLContextAttributes, GLContextDispatcher,
|
||||
};
|
||||
use offscreen_gl_context::{GLLimits, GLVersion};
|
||||
use offscreen_gl_context::{NativeGLContext, NativeGLContextHandle, NativeGLContextMethods};
|
||||
use offscreen_gl_context::{OSMesaContext, OSMesaContextHandle};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use super::webgl_thread::{WebGLImpl, GLState};
|
||||
|
||||
/// The GLContextFactory is used to create shared GL contexts with the main thread GL context.
|
||||
/// Currently, shared textures are used to render WebGL textures into the WR compositor.
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use canvas_traits::webgl::webgl_channel;
|
||||
use canvas_traits::webgl::DOMToTextureCommand;
|
||||
use canvas_traits::webgl::{WebGLChan, WebGLContextId, WebGLMsg, WebGLPipeline, WebGLReceiver};
|
||||
use canvas_traits::webgl::{WebGLSender, WebVRCommand, WebVRRenderHandler};
|
||||
use canvas_traits::webgl::DOMToTextureCommand;
|
||||
use canvas_traits::webgl::webgl_channel;
|
||||
use crate::gl_context::GLContextFactory;
|
||||
use crate::webgl_thread::{WebGLExternalImageApi, WebGLExternalImageHandler, WebGLThread};
|
||||
use euclid::Size2D;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use super::gl_context::{GLContextFactory, GLContextWrapper};
|
||||
use canvas_traits::webgl::*;
|
||||
use euclid::Size2D;
|
||||
use fnv::FnvHashMap;
|
||||
|
@ -9,7 +10,6 @@ use gleam::gl;
|
|||
use offscreen_gl_context::{GLContext, GLContextAttributes, GLLimits, NativeGLContextMethods};
|
||||
use pixels;
|
||||
use std::thread;
|
||||
use super::gl_context::{GLContextFactory, GLContextWrapper};
|
||||
use webrender;
|
||||
use webrender_api;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::RGBA;
|
||||
use euclid::{Transform2D, Point2D, Rect, Size2D};
|
||||
use euclid::{Point2D, Rect, Size2D, Transform2D};
|
||||
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSender};
|
||||
use serde_bytes::ByteBuf;
|
||||
use std::default::Default;
|
||||
|
|
|
@ -11,18 +11,18 @@ use std::borrow::Cow;
|
|||
use std::num::NonZeroU32;
|
||||
use webrender_api::{DocumentId, ImageKey, PipelineId};
|
||||
|
||||
/// Sender type used in WebGLCommands.
|
||||
pub use crate::webgl_channel::WebGLSender;
|
||||
/// Helper function that creates a WebGL channel (WebGLSender, WebGLReceiver) to be used in WebGLCommands.
|
||||
pub use crate::webgl_channel::webgl_channel;
|
||||
/// Entry point channel type used for sending WebGLMsg messages to the WebGL renderer.
|
||||
pub use crate::webgl_channel::WebGLChan;
|
||||
/// Entry point type used in a Script Pipeline to get the WebGLChan to be used in that thread.
|
||||
pub use crate::webgl_channel::WebGLPipeline;
|
||||
/// Receiver type used in WebGLCommands.
|
||||
pub use crate::webgl_channel::WebGLReceiver;
|
||||
/// Result type for send()/recv() calls in in WebGLCommands.
|
||||
pub use crate::webgl_channel::WebGLSendResult;
|
||||
/// Helper function that creates a WebGL channel (WebGLSender, WebGLReceiver) to be used in WebGLCommands.
|
||||
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.
|
||||
pub use crate::webgl_channel::WebGLPipeline;
|
||||
/// Entry point channel type used for sending WebGLMsg messages to the WebGL renderer.
|
||||
pub use crate::webgl_channel::WebGLChan;
|
||||
/// Sender type used in WebGLCommands.
|
||||
pub use crate::webgl_channel::WebGLSender;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct WebGLCommandBacktrace {
|
||||
|
|
|
@ -15,8 +15,8 @@ pub use crossbeam_channel::*;
|
|||
use ipc_channel::ipc::IpcReceiver;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub fn route_ipc_receiver_to_new_servo_receiver<T>(ipc_receiver: IpcReceiver<T>) -> Receiver<T>
|
||||
where
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
* 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/. */
|
||||
|
||||
use crate::CompositionPipeline;
|
||||
use crate::SendableFrameTree;
|
||||
use crate::compositor_thread::{CompositorProxy, CompositorReceiver};
|
||||
use crate::compositor_thread::{InitialCompositorState, Msg};
|
||||
#[cfg(feature = "gleam")]
|
||||
use crate::gl;
|
||||
use crate::touch::{TouchHandler, TouchAction};
|
||||
use crate::windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods};
|
||||
use euclid::{TypedPoint2D, TypedVector2D, TypedScale};
|
||||
use crate::touch::{TouchAction, TouchHandler};
|
||||
use crate::windowing::{
|
||||
self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods,
|
||||
};
|
||||
use crate::CompositionPipeline;
|
||||
use crate::SendableFrameTree;
|
||||
use euclid::{TypedPoint2D, TypedScale, TypedVector2D};
|
||||
use gfx_traits::Epoch;
|
||||
#[cfg(feature = "gleam")]
|
||||
use image::{DynamicImage, ImageFormat};
|
||||
|
@ -20,23 +22,23 @@ use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId};
|
|||
use net_traits::image::base::Image;
|
||||
#[cfg(feature = "gleam")]
|
||||
use net_traits::image::base::PixelFormat;
|
||||
use profile_traits::time::{self as profile_time, ProfilerCategory, profile};
|
||||
use profile_traits::time::{self as profile_time, profile, ProfilerCategory};
|
||||
use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent, TouchEvent};
|
||||
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
|
||||
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
|
||||
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
|
||||
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent};
|
||||
use servo_channel::Sender;
|
||||
use servo_config::opts;
|
||||
use servo_geometry::DeviceIndependentPixel;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::fs::{File, create_dir_all};
|
||||
use std::fs::{create_dir_all, File};
|
||||
use std::io::Write;
|
||||
use std::num::NonZeroU32;
|
||||
use std::rc::Rc;
|
||||
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
|
||||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
|
||||
use time::{now, precise_time_ns, precise_time_s};
|
||||
use webrender;
|
||||
use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResult};
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
//! Communication with the compositor thread.
|
||||
|
||||
use crate::SendableFrameTree;
|
||||
use crate::compositor::CompositingReason;
|
||||
use crate::SendableFrameTree;
|
||||
use embedder_traits::EventLoopWaker;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
|
|
|
@ -29,10 +29,10 @@ extern crate time;
|
|||
extern crate webrender;
|
||||
extern crate webrender_api;
|
||||
|
||||
pub use crate::compositor_thread::CompositorProxy;
|
||||
pub use crate::compositor::IOCompositor;
|
||||
pub use crate::compositor::RenderNotifier;
|
||||
pub use crate::compositor::ShutdownState;
|
||||
pub use crate::compositor_thread::CompositorProxy;
|
||||
use euclid::TypedSize2D;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{TypedPoint2D, TypedVector2D};
|
||||
use euclid::TypedScale;
|
||||
use script_traits::{EventResult, TouchId};
|
||||
use self::TouchState::*;
|
||||
use euclid::TypedScale;
|
||||
use euclid::{TypedPoint2D, TypedVector2D};
|
||||
use script_traits::{EventResult, TouchId};
|
||||
use style_traits::DevicePixel;
|
||||
|
||||
/// Minimum number of `DeviceIndependentPixel` to begin touch scrolling.
|
||||
|
|
|
@ -17,7 +17,7 @@ use std::fmt::{Debug, Error, Formatter};
|
|||
#[cfg(feature = "gleam")]
|
||||
use std::rc::Rc;
|
||||
use style_traits::DevicePixel;
|
||||
use webrender_api::{DeviceIntPoint, DevicePoint, DeviceUintSize, DeviceUintRect, ScrollLocation};
|
||||
use webrender_api::{DeviceIntPoint, DevicePoint, DeviceUintRect, DeviceUintSize, ScrollLocation};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum MouseWindowEvent {
|
||||
|
|
|
@ -19,7 +19,7 @@ use std::fs::{self, File};
|
|||
use std::io::{self, Read, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process;
|
||||
use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
|
||||
use std::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};
|
||||
use url::{self, Url};
|
||||
|
||||
/// Global flags for Servo, currently set on the command line.
|
||||
|
|
|
@ -11,7 +11,7 @@ use std::borrow::ToOwned;
|
|||
use std::cmp::max;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Write, stderr};
|
||||
use std::io::{stderr, Read, Write};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
extern crate servo_config;
|
||||
|
||||
use servo_config::opts::{parse_url_or_filename, parse_pref_from_command_line};
|
||||
use servo_config::opts::{parse_pref_from_command_line, parse_url_or_filename};
|
||||
use servo_config::prefs::{PrefValue, PREFS};
|
||||
use std::path::Path;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
extern crate servo_config;
|
||||
|
||||
use servo_config::basedir;
|
||||
use servo_config::prefs::{PREFS, PrefValue, read_prefs};
|
||||
use servo_config::prefs::{read_prefs, PrefValue, PREFS};
|
||||
use std::fs::{self, File};
|
||||
use std::io::{Read, Write};
|
||||
|
||||
|
|
|
@ -96,49 +96,61 @@ use canvas::webgl_thread::WebGLThreads;
|
|||
use canvas_traits::canvas::CanvasId;
|
||||
use canvas_traits::canvas::CanvasMsg;
|
||||
use clipboard::{ClipboardContext, ClipboardProvider};
|
||||
use compositing::SendableFrameTree;
|
||||
use compositing::compositor_thread::CompositorProxy;
|
||||
use compositing::compositor_thread::Msg as ToCompositorMsg;
|
||||
use crate::browsingcontext::{AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator};
|
||||
use compositing::SendableFrameTree;
|
||||
use crate::browsingcontext::NewBrowsingContextInfo;
|
||||
use crate::browsingcontext::{
|
||||
AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator,
|
||||
};
|
||||
use crate::event_loop::EventLoop;
|
||||
use crate::network_listener::NetworkListener;
|
||||
use crate::pipeline::{InitialPipelineState, Pipeline};
|
||||
use crate::session_history::{JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff};
|
||||
use crate::session_history::{
|
||||
JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff,
|
||||
};
|
||||
use crate::timer_scheduler::TimerScheduler;
|
||||
use debugger;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy};
|
||||
use euclid::{Size2D, TypedSize2D, TypedScale};
|
||||
use euclid::{Size2D, TypedScale, TypedSize2D};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::{Error as IpcError};
|
||||
use ipc_channel::ipc::{self, IpcSender, IpcReceiver};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use ipc_channel::Error as IpcError;
|
||||
use keyboard_types::KeyboardEvent;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
use log::{Log, Level, LevelFilter, Metadata, Record};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, HistoryStateId, TopLevelBrowsingContextId};
|
||||
use log::{Level, LevelFilter, Log, Metadata, Record};
|
||||
use msg::constellation_msg::{
|
||||
BrowsingContextId, HistoryStateId, PipelineId, TopLevelBrowsingContextId,
|
||||
};
|
||||
use msg::constellation_msg::{PipelineNamespace, PipelineNamespaceId, TraversalDirection};
|
||||
use net_traits::{self, IpcSend, FetchResponseMsg, ResourceThreads};
|
||||
use net_traits::pub_domains::reg_host;
|
||||
use net_traits::request::RequestInit;
|
||||
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
|
||||
use net_traits::{self, FetchResponseMsg, IpcSend, ResourceThreads};
|
||||
use profile_traits::mem;
|
||||
use profile_traits::time;
|
||||
use script_traits::{AnimationState, AuxiliaryBrowsingContextLoadInfo, AnimationTickType, CompositorEvent};
|
||||
use script_traits::{ConstellationControlMsg, ConstellationMsg as FromCompositorMsg, DiscardBrowsingContext};
|
||||
use script_traits::{webdriver_msg, LogEntry, ScriptToConstellationChan, ServiceWorkerMsg};
|
||||
use script_traits::{
|
||||
AnimationState, AnimationTickType, AuxiliaryBrowsingContextLoadInfo, CompositorEvent,
|
||||
};
|
||||
use script_traits::{
|
||||
ConstellationControlMsg, ConstellationMsg as FromCompositorMsg, DiscardBrowsingContext,
|
||||
};
|
||||
use script_traits::{DocumentActivity, DocumentState, LayoutControlMsg, LoadData};
|
||||
use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSandboxState, TimerSchedulerMsg};
|
||||
use script_traits::{
|
||||
IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSandboxState, TimerSchedulerMsg,
|
||||
};
|
||||
use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory};
|
||||
use script_traits::{LogEntry, ScriptToConstellationChan, ServiceWorkerMsg, webdriver_msg};
|
||||
use script_traits::{SWManagerMsg, ScopeThings, UpdatePipelineIdReason, WebDriverCommandMsg};
|
||||
use script_traits::{WindowSizeData, WindowSizeType};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_channel::{Receiver, Sender, channel};
|
||||
use servo_channel::{channel, Receiver, Sender};
|
||||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_rand::{Rng, SeedableRng, ServoRng, random};
|
||||
use servo_rand::{random, Rng, SeedableRng, ServoRng};
|
||||
use servo_remutex::ReentrantMutex;
|
||||
use servo_url::{Host, ImmutableOrigin, ServoUrl};
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -149,9 +161,9 @@ use std::process;
|
|||
use std::rc::{Rc, Weak};
|
||||
use std::sync::Arc;
|
||||
use std::thread;
|
||||
use style_traits::CSSPixel;
|
||||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use style_traits::CSSPixel;
|
||||
use webrender_api;
|
||||
use webvr_traits::{WebVREvent, WebVRMsg};
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
//! view of a script thread. When an `EventLoop` is dropped, an `ExitScriptThread`
|
||||
//! message is sent to the script thread, asking it to shut down.
|
||||
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use ipc_channel::Error;
|
||||
use script_traits::ConstellationControlMsg;
|
||||
use std::marker::PhantomData;
|
||||
use std::rc::Rc;
|
||||
|
|
|
@ -53,7 +53,9 @@ mod sandboxing;
|
|||
mod session_history;
|
||||
mod timer_scheduler;
|
||||
|
||||
pub use crate::constellation::{Constellation, FromCompositorLogger, FromScriptLogger, InitialConstellationState};
|
||||
pub use crate::constellation::{
|
||||
Constellation, FromCompositorLogger, FromScriptLogger, InitialConstellationState,
|
||||
};
|
||||
pub use crate::pipeline::UnprivilegedPipelineContent;
|
||||
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
|
||||
pub use crate::sandboxing::content_process_sandbox_profile;
|
||||
|
|
|
@ -11,10 +11,10 @@ use ipc_channel::ipc;
|
|||
use ipc_channel::router::ROUTER;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net::http_loader::{set_default_accept, set_default_accept_language};
|
||||
use net_traits::{CoreResourceMsg, FetchChannels, FetchMetadata, FetchResponseMsg};
|
||||
use net_traits::{IpcSend, NetworkError, ResourceThreads};
|
||||
use net_traits::request::{Destination, RequestInit};
|
||||
use net_traits::response::ResponseInit;
|
||||
use net_traits::{CoreResourceMsg, FetchChannels, FetchMetadata, FetchResponseMsg};
|
||||
use net_traits::{IpcSend, NetworkError, ResourceThreads};
|
||||
use servo_channel::Sender;
|
||||
|
||||
pub struct NetworkListener {
|
||||
|
|
|
@ -4,23 +4,23 @@
|
|||
|
||||
use bluetooth_traits::BluetoothRequest;
|
||||
use canvas_traits::webgl::WebGLPipeline;
|
||||
use compositing::compositor_thread::Msg as CompositorMsg;
|
||||
use compositing::CompositionPipeline;
|
||||
use compositing::CompositorProxy;
|
||||
use compositing::compositor_thread::Msg as CompositorMsg;
|
||||
use crate::event_loop::EventLoop;
|
||||
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
|
||||
use euclid::{TypedSize2D, TypedScale};
|
||||
use euclid::{TypedScale, TypedSize2D};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use ipc_channel::Error;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
use metrics::PaintTimeMetrics;
|
||||
use msg::constellation_msg::{BrowsingContextId, HistoryStateId, PipelineId, PipelineNamespaceId};
|
||||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
use msg::constellation_msg::{BrowsingContextId, HistoryStateId, PipelineId, PipelineNamespaceId};
|
||||
use net::image_cache::ImageCacheImpl;
|
||||
use net_traits::{IpcSend, ResourceThreads};
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use net_traits::{IpcSend, ResourceThreads};
|
||||
use profile_traits::mem as profile_mem;
|
||||
use profile_traits::time;
|
||||
use script_traits::{ConstellationControlMsg, DiscardBrowsingContext, ScriptToConstellationChan};
|
||||
|
@ -30,7 +30,7 @@ use script_traits::{NewLayoutInfo, SWManagerMsg, SWManagerSenders};
|
|||
use script_traits::{ScriptThreadFactory, TimerSchedulerMsg, WindowSizeData};
|
||||
use servo_channel::Sender;
|
||||
use servo_config::opts::{self, Opts};
|
||||
use servo_config::prefs::{PREFS, Pref};
|
||||
use servo_config::prefs::{Pref, PREFS};
|
||||
use servo_url::ServoUrl;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
#[cfg(not(windows))]
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
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 servo_url::ServoUrl;
|
||||
use std::{fmt, mem};
|
||||
use std::cmp::PartialEq;
|
||||
use std::{fmt, mem};
|
||||
|
||||
/// Represents the joint session history
|
||||
/// https://html.spec.whatwg.org/multipage/#joint-session-history
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::actors::object::ObjectActor;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use devtools_traits::{CachedConsoleMessageTypes, DevtoolScriptControlMsg};
|
||||
use devtools_traits::CachedConsoleMessage;
|
||||
use devtools_traits::EvaluateJSReply::{ActorValue, BooleanValue, StringValue};
|
||||
use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue};
|
||||
use devtools_traits::{CachedConsoleMessageTypes, DevtoolScriptControlMsg};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde_json::{self, Map, Number, Value};
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::{ActorDescription, Method};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use crate::protocol::{ActorDescription, Method};
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use devtools_traits::{ComputedNodeLayout, DevtoolScriptControlMsg, NodeInfo};
|
||||
use devtools_traits::DevtoolScriptControlMsg::{GetChildren, GetDocumentElement, GetRootNode};
|
||||
use devtools_traits::DevtoolScriptControlMsg::{GetLayout, ModifyAttribute};
|
||||
use devtools_traits::{ComputedNodeLayout, DevtoolScriptControlMsg, NodeInfo};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde_json::{self, Map, Value};
|
||||
|
|
|
@ -6,9 +6,9 @@ use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
|||
use crate::actors::framerate::FramerateActor;
|
||||
use crate::actors::memory::{MemoryActor, TimelineMemoryReply};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use devtools_traits::{PreciseTime, TimelineMarker, TimelineMarkerType};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use devtools_traits::DevtoolScriptControlMsg::{DropTimelineMarkers, SetTimelineMarkers};
|
||||
use devtools_traits::{PreciseTime, TimelineMarker, TimelineMarkerType};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde::{Serialize, Serializer};
|
||||
|
|
|
@ -48,11 +48,11 @@ use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo, LogLevel, Netwo
|
|||
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_channel::{Receiver, Sender, channel};
|
||||
use servo_channel::{channel, Receiver, Sender};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use std::collections::HashMap;
|
||||
use std::net::{Shutdown, TcpListener, TcpStream};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
|
|
@ -24,8 +24,8 @@ extern crate serde;
|
|||
extern crate servo_url;
|
||||
extern crate time;
|
||||
|
||||
use http::HeaderMap;
|
||||
use http::method::Method;
|
||||
use http::HeaderMap;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_url::ServoUrl;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
extern crate hashglobe;
|
||||
extern crate smallvec;
|
||||
|
||||
use hashglobe::FailedAllocationError;
|
||||
#[cfg(feature = "known_system_malloc")]
|
||||
use hashglobe::alloc;
|
||||
use hashglobe::FailedAllocationError;
|
||||
use smallvec::Array;
|
||||
use smallvec::SmallVec;
|
||||
use std::vec::Vec;
|
||||
|
|
|
@ -9,9 +9,9 @@ use crate::platform::font::{FontHandle, FontTable};
|
|||
use crate::platform::font_context::FontContextHandle;
|
||||
pub use crate::platform::font_list::fallback_font_families;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::text::Shaper;
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
use crate::text::Shaper;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use ordered_float::NotNan;
|
||||
use servo_atoms::Atom;
|
||||
|
@ -22,8 +22,8 @@ use std::collections::HashMap;
|
|||
use std::iter;
|
||||
use std::rc::Rc;
|
||||
use std::str;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
||||
use style::computed_values::{font_stretch, font_style, font_variant_caps, font_weight};
|
||||
use style::properties::style_structs::Font as FontStyleStruct;
|
||||
use style::values::computed::font::SingleFontFamily;
|
||||
|
|
|
@ -7,22 +7,22 @@ use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope};
|
|||
use crate::font_context::FontSource;
|
||||
use crate::font_template::{FontTemplate, FontTemplateDescriptor};
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
use crate::platform::font_list::SANS_SERIF_FONT_FAMILY;
|
||||
use crate::platform::font_list::for_each_available_family;
|
||||
use crate::platform::font_list::for_each_variation;
|
||||
use crate::platform::font_list::system_default_family;
|
||||
use crate::platform::font_list::SANS_SERIF_FONT_FAMILY;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use fontsan;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
|
||||
use net_traits::request::{Destination, RequestInit};
|
||||
use net_traits::{fetch_async, CoreResourceThread, FetchResponseMsg};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::{fmt, f32, mem, thread};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{f32, fmt, mem, thread};
|
||||
use style::font_face::{EffectiveSources, Source};
|
||||
use style::values::computed::font::FamilyName;
|
||||
use webrender_api;
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef};
|
||||
use crate::font::{
|
||||
Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef,
|
||||
};
|
||||
use crate::font_cache_thread::FontTemplateInfo;
|
||||
use crate::font_template::FontTemplateDescriptor;
|
||||
use crate::platform::font::FontHandle;
|
||||
|
|
|
@ -8,11 +8,11 @@ use std::fs::File;
|
|||
use std::io::{self, Read};
|
||||
use std::path::Path;
|
||||
use ucd::{Codepoint, UnicodeBlock};
|
||||
use xml5ever::Attribute;
|
||||
use xml5ever::driver::parse_document;
|
||||
use xml5ever::rcdom::*;
|
||||
use xml5ever::rcdom::{Node, RcDom};
|
||||
use xml5ever::tendril::TendrilSink;
|
||||
use xml5ever::Attribute;
|
||||
|
||||
lazy_static! {
|
||||
static ref FONT_LIST: FontList = FontList::new();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use super::c_str_to_string;
|
||||
use app_units::Au;
|
||||
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN};
|
||||
|
@ -9,6 +10,7 @@ use crate::platform::font_context::FontContextHandle;
|
|||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::text::glyph::GlyphId;
|
||||
use crate::text::util::fixed_to_float;
|
||||
use freetype::freetype::FT_Sfnt_Tag;
|
||||
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_Get_Char_Index, FT_Get_Postscript_Name};
|
||||
|
@ -17,18 +19,16 @@ use freetype::freetype::{FT_GlyphSlot, FT_Library, FT_Long, FT_ULong};
|
|||
use freetype::freetype::{FT_Int32, FT_Kerning_Mode, FT_STYLE_FLAG_ITALIC};
|
||||
use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size};
|
||||
use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, FT_Vector};
|
||||
use freetype::freetype::FT_Sfnt_Tag;
|
||||
use freetype::succeeded;
|
||||
use freetype::tt_os2::TT_OS2;
|
||||
use servo_atoms::Atom;
|
||||
use std::{mem, ptr};
|
||||
use std::ffi::CString;
|
||||
use std::os::raw::{c_char, c_long};
|
||||
use std::sync::Arc;
|
||||
use std::{mem, ptr};
|
||||
use style::computed_values::font_stretch::T as FontStretch;
|
||||
use style::computed_values::font_weight::T as FontWeight;
|
||||
use style::values::computed::font::FontStyle;
|
||||
use super::c_str_to_string;
|
||||
|
||||
// This constant is not present in the freetype
|
||||
// bindings due to bindgen not handling the way
|
||||
|
|
|
@ -10,7 +10,7 @@ use freetype::freetype::FT_MemoryRec_;
|
|||
use freetype::freetype::FT_New_Library;
|
||||
use freetype::succeeded;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use servo_allocator::libc_compat::{malloc, realloc, free};
|
||||
use servo_allocator::libc_compat::{free, malloc, realloc};
|
||||
use servo_allocator::usable_size;
|
||||
use std::os::raw::{c_long, c_void};
|
||||
use std::ptr;
|
||||
|
|
|
@ -2,18 +2,20 @@
|
|||
* 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/. */
|
||||
|
||||
use super::c_str_to_string;
|
||||
use crate::text::util::is_cjk;
|
||||
use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem};
|
||||
use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute};
|
||||
use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString};
|
||||
use fontconfig::fontconfig::{FcFontSetDestroy, FcMatchPattern, FcPatternCreate, FcPatternDestroy};
|
||||
use fontconfig::fontconfig::{FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy, FcPatternAddString};
|
||||
use fontconfig::fontconfig::{
|
||||
FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy, FcPatternAddString,
|
||||
};
|
||||
use fontconfig::fontconfig::{FcObjectSetAdd, FcPatternGetInteger};
|
||||
use libc;
|
||||
use libc::{c_char, c_int};
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use super::c_str_to_string;
|
||||
|
||||
static FC_FAMILY: &'static [u8] = b"family\0";
|
||||
static FC_FILE: &'static [u8] = b"file\0";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Error};
|
||||
use std::io::{Error, Read};
|
||||
use webrender_api::NativeFontHandle;
|
||||
|
||||
/// Platform specific font representation for Linux.
|
||||
|
|
|
@ -11,17 +11,19 @@ use core_foundation::string::UniChar;
|
|||
use core_graphics::font::CGGlyph;
|
||||
use core_graphics::geometry::CGRect;
|
||||
use core_text::font::CTFont;
|
||||
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
|
||||
use core_text::font_descriptor::kCTFontDefaultOrientation;
|
||||
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag, FractionalPixel};
|
||||
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
|
||||
use crate::font::{
|
||||
FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag, FractionalPixel,
|
||||
};
|
||||
use crate::font::{GPOS, GSUB, KERN};
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::platform::macos::font_context::FontContextHandle;
|
||||
use crate::text::glyph::GlyphId;
|
||||
use servo_atoms::Atom;
|
||||
use std::{fmt, ptr};
|
||||
use std::ops::Range;
|
||||
use std::sync::Arc;
|
||||
use std::{fmt, ptr};
|
||||
use style::values::computed::font::{FontStretch, FontStyle, FontWeight};
|
||||
|
||||
const KERN_PAIR_LEN: usize = 6;
|
||||
|
|
|
@ -7,15 +7,15 @@ use core_graphics::data_provider::CGDataProvider;
|
|||
use core_graphics::font::CGFont;
|
||||
use core_text;
|
||||
use core_text::font::CTFont;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use serde::de::{Error, Visitor};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Error as IoError};
|
||||
use std::io::{Error as IoError, Read};
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use webrender_api::NativeFontHandle;
|
||||
|
|
|
@ -23,8 +23,8 @@ use std::sync::Arc;
|
|||
use style::computed_values::font_stretch::T as StyleFontStretch;
|
||||
use style::computed_values::font_weight::T as StyleFontWeight;
|
||||
use style::values::computed::font::FontStyle as StyleFontStyle;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::font::FontStyle as GenericFontStyle;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::specified::font::FontStretchKeyword;
|
||||
use truetype;
|
||||
|
||||
|
@ -119,7 +119,7 @@ struct FontInfo {
|
|||
|
||||
impl FontInfo {
|
||||
fn new_from_face(face: &FontFace) -> Result<FontInfo, ()> {
|
||||
use std::cmp::{min, max};
|
||||
use std::cmp::{max, min};
|
||||
use std::io::Cursor;
|
||||
use truetype::{NamingTable, Value, WindowsMetrics};
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::text::util::unicode_plane;
|
||||
use dwrote::{Font, FontDescriptor, FontCollection};
|
||||
use dwrote::{Font, FontCollection, FontDescriptor};
|
||||
use servo_atoms::Atom;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::Mutex;
|
||||
use std::sync::atomic::{Ordering, AtomicUsize};
|
||||
use ucd::{Codepoint, UnicodeBlock};
|
||||
|
||||
lazy_static! {
|
||||
|
|
|
@ -10,8 +10,10 @@ extern crate style;
|
|||
extern crate webrender_api;
|
||||
|
||||
use app_units::Au;
|
||||
use gfx::font::{fallback_font_families, FontDescriptor, FontFamilyDescriptor, FontFamilyName, FontSearchScope};
|
||||
use gfx::font_cache_thread::{FontTemplates, FontTemplateInfo};
|
||||
use gfx::font::{
|
||||
fallback_font_families, FontDescriptor, FontFamilyDescriptor, FontFamilyName, FontSearchScope,
|
||||
};
|
||||
use gfx::font_cache_thread::{FontTemplateInfo, FontTemplates};
|
||||
use gfx::font_context::{FontContext, FontContextHandle, FontSource};
|
||||
use gfx::font_template::FontTemplateDescriptor;
|
||||
use servo_arc::Arc;
|
||||
|
@ -24,7 +26,9 @@ use std::path::PathBuf;
|
|||
use std::rc::Rc;
|
||||
use style::properties::longhands::font_variant_caps::computed_value::T as FontVariantCaps;
|
||||
use style::properties::style_structs::Font as FontStyleStruct;
|
||||
use style::values::computed::font::{FamilyName, FamilyNameSyntax, FontFamily, FontFamilyList, FontSize};
|
||||
use style::values::computed::font::{
|
||||
FamilyName, FamilyNameSyntax, FontFamily, FontFamilyList, FontSize,
|
||||
};
|
||||
use style::values::computed::font::{FontStretch, FontWeight, SingleFontFamily};
|
||||
use style::values::generics::font::FontStyle;
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ fn test_font_template_descriptor() {
|
|||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::path::PathBuf;
|
||||
use style::values::computed::Percentage;
|
||||
use style::values::computed::font::{FontStretch, FontWeight};
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::computed::Percentage;
|
||||
use style::values::generics::font::FontStyle;
|
||||
use style::values::generics::NonNegative;
|
||||
|
||||
fn descriptor(filename: &str) -> FontTemplateDescriptor {
|
||||
let mut path: PathBuf = [
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
extern crate gfx;
|
||||
|
||||
use gfx::text::util::{CompressionMode, transform_text};
|
||||
use gfx::text::util::{transform_text, CompressionMode};
|
||||
|
||||
#[test]
|
||||
fn test_transform_compress_none() {
|
||||
|
|
|
@ -10,9 +10,9 @@ use euclid::Point2D;
|
|||
))]
|
||||
use packed_simd::u32x4;
|
||||
use range::{self, EachIndex, Range, RangeIndex};
|
||||
use std::{fmt, mem, u16};
|
||||
use std::cmp::{Ordering, PartialOrd};
|
||||
use std::vec::Vec;
|
||||
use std::{fmt, mem, u16};
|
||||
|
||||
pub use gfx_traits::ByteIndex;
|
||||
|
||||
|
|
|
@ -5,15 +5,7 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use app_units::Au;
|
||||
use crate::font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN};
|
||||
use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
|
||||
use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
|
||||
use crate::harfbuzz::{hb_buffer_create, hb_font_destroy};
|
||||
use crate::harfbuzz::{hb_buffer_get_glyph_infos, hb_shape};
|
||||
use crate::harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script};
|
||||
use crate::harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
|
||||
use crate::harfbuzz::{hb_face_t, hb_font_t};
|
||||
use crate::harfbuzz::{hb_position_t, hb_tag_t};
|
||||
use crate::font::{Font, FontTableMethods, FontTableTag, ShapingFlags, ShapingOptions, KERN};
|
||||
use crate::harfbuzz::hb_blob_t;
|
||||
use crate::harfbuzz::hb_bool_t;
|
||||
use crate::harfbuzz::hb_buffer_add_utf8;
|
||||
|
@ -32,13 +24,21 @@ use crate::harfbuzz::hb_font_set_ppem;
|
|||
use crate::harfbuzz::hb_font_set_scale;
|
||||
use crate::harfbuzz::hb_glyph_info_t;
|
||||
use crate::harfbuzz::hb_glyph_position_t;
|
||||
use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
|
||||
use crate::harfbuzz::{hb_buffer_create, hb_font_destroy};
|
||||
use crate::harfbuzz::{hb_buffer_get_glyph_infos, hb_shape};
|
||||
use crate::harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script};
|
||||
use crate::harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
|
||||
use crate::harfbuzz::{hb_face_t, hb_font_t};
|
||||
use crate::harfbuzz::{hb_position_t, hb_tag_t};
|
||||
use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
|
||||
use crate::platform::font::FontTable;
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
|
||||
use euclid::Point2D;
|
||||
use std::{char, cmp, ptr};
|
||||
use std::os::raw::{c_char, c_int, c_uint, c_void};
|
||||
use std::{char, cmp, ptr};
|
||||
|
||||
const NO_GLYPH: i32 = -1;
|
||||
const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a');
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::platform::font_template::FontTemplateData;
|
|||
use crate::text::glyph::{ByteIndex, GlyphStore};
|
||||
use range::Range;
|
||||
use std::cell::Cell;
|
||||
use std::cmp::{Ordering, max};
|
||||
use std::cmp::{max, Ordering};
|
||||
use std::slice::Iter;
|
||||
use std::sync::Arc;
|
||||
use style::str::char_is_whitespace;
|
||||
|
|
|
@ -17,7 +17,7 @@ extern crate serde;
|
|||
pub mod print_tree;
|
||||
|
||||
use range::RangeIndex;
|
||||
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
|
||||
/// A newtype struct for denoting the age of messages; prevents race conditions.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
|
||||
|
|
|
@ -20,8 +20,8 @@ use std::fmt;
|
|||
use std::hash::{BuildHasher, Hash};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
pub use std::collections::hash_map::{Entry, RandomState, Iter as MapIter, IterMut as MapIterMut};
|
||||
pub use std::collections::hash_set::{Iter as SetIter, IntoIter as SetIntoIter};
|
||||
pub use std::collections::hash_map::{Entry, Iter as MapIter, IterMut as MapIterMut, RandomState};
|
||||
pub use std::collections::hash_set::{IntoIter as SetIntoIter, Iter as SetIter};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HashMap<K, V, S = RandomState>(StdMap<K, V, S>);
|
||||
|
|
|
@ -15,13 +15,13 @@ use std::borrow::Borrow;
|
|||
use std::cmp::max;
|
||||
use std::fmt::{self, Debug};
|
||||
#[allow(deprecated)]
|
||||
use std::hash::{Hash, BuildHasher};
|
||||
use std::hash::{BuildHasher, Hash};
|
||||
use std::iter::FromIterator;
|
||||
use std::mem::{self, replace};
|
||||
use std::ops::{Deref, Index};
|
||||
|
||||
use super::table::{self, Bucket, EmptyBucket, FullBucket, FullBucketMut, RawTable, SafeHash};
|
||||
use super::table::BucketState::{Empty, Full};
|
||||
use super::table::{self, Bucket, EmptyBucket, FullBucket, FullBucketMut, RawTable, SafeHash};
|
||||
|
||||
use FailedAllocationError;
|
||||
|
||||
|
@ -2214,11 +2214,11 @@ fn assert_covariance() {
|
|||
#[cfg(test)]
|
||||
mod test_map {
|
||||
extern crate rand;
|
||||
use super::HashMap;
|
||||
use self::rand::{thread_rng, Rng};
|
||||
use super::Entry::{Occupied, Vacant};
|
||||
use super::HashMap;
|
||||
use super::RandomState;
|
||||
use cell::RefCell;
|
||||
use self::rand::{thread_rng, Rng};
|
||||
|
||||
#[test]
|
||||
fn test_zero_capacities() {
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, BuildHasher};
|
||||
use std::hash::{BuildHasher, Hash};
|
||||
use std::iter::{Chain, FromIterator};
|
||||
use std::ops::{BitOr, BitAnd, BitXor, Sub};
|
||||
use std::ops::{BitAnd, BitOr, BitXor, Sub};
|
||||
|
||||
use super::Recover;
|
||||
use super::hash_map::{self, HashMap, Keys, RandomState};
|
||||
use super::Recover;
|
||||
|
||||
// Future Optimization (FIXME!)
|
||||
// =============================
|
||||
|
@ -1258,8 +1258,8 @@ fn assert_covariance() {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test_set {
|
||||
use super::HashSet;
|
||||
use super::hash_map::RandomState;
|
||||
use super::HashSet;
|
||||
|
||||
#[test]
|
||||
fn test_zero_capacities() {
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
// except according to those terms.
|
||||
|
||||
use alloc::{alloc, dealloc};
|
||||
use shim::{Shared, Unique};
|
||||
use std::cmp;
|
||||
use std::hash::{BuildHasher, Hash, Hasher};
|
||||
use std::marker;
|
||||
use std::mem::{self, align_of, size_of};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::ptr;
|
||||
use shim::{Unique, Shared};
|
||||
|
||||
use self::BucketState::*;
|
||||
use FailedAllocationError;
|
||||
|
|
|
@ -11,10 +11,10 @@ use crate::opaque_node::OpaqueNodeMethods;
|
|||
use fxhash::FxHashMap;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use servo_channel::Receiver;
|
||||
use style::animation::{Animation, update_style_for_animation};
|
||||
use style::animation::{update_style_for_animation, Animation};
|
||||
use style::dom::TElement;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::selector_parser::RestyleDamage;
|
||||
|
|
|
@ -27,18 +27,26 @@
|
|||
|
||||
use app_units::{Au, MAX_AU};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::items::DisplayListSection;
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::items::DisplayListSection;
|
||||
use crate::floats::{ClearType, FloatKind, Floats, PlacementInfo};
|
||||
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow};
|
||||
use crate::flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags};
|
||||
use crate::flow::{
|
||||
BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow,
|
||||
};
|
||||
use crate::flow::{
|
||||
FlowFlags, FragmentationContext, ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow,
|
||||
};
|
||||
use crate::flow_list::FlowList;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
|
||||
use crate::fragment::{
|
||||
CoordinateSystem, Fragment, FragmentBorderBoxIterator, FragmentFlags, Overflow,
|
||||
};
|
||||
use crate::incremental::RelayoutMode;
|
||||
use crate::layout_debug;
|
||||
use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
|
||||
use crate::model::{
|
||||
AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto,
|
||||
};
|
||||
use crate::sequential;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
|
@ -58,8 +66,8 @@ use style::context::SharedStyleContext;
|
|||
use style::logical_geometry::{LogicalMargin, LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
|
||||
|
||||
/// Information specific to floated blocks.
|
||||
#[derive(Clone, Serialize)]
|
||||
|
|
|
@ -11,21 +11,28 @@
|
|||
//! 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.
|
||||
|
||||
use crate::ServoArc;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::data::{LayoutDataFlags, LayoutData};
|
||||
use crate::context::{with_thread_local_font_context, LayoutContext};
|
||||
use crate::data::{LayoutData, LayoutDataFlags};
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{AbsoluteDescendants, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::flow::{FlowFlags, MutableFlowUtils, MutableOwnedFlowUtils};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use crate::fragment::{CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo};
|
||||
use crate::fragment::{ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo};
|
||||
use crate::fragment::{InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo};
|
||||
use crate::fragment::{TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult};
|
||||
use crate::inline::{InlineFlow, InlineFragmentNodeInfo, InlineFragmentNodeFlags};
|
||||
use crate::fragment::{
|
||||
CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo,
|
||||
};
|
||||
use crate::fragment::{
|
||||
ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo,
|
||||
};
|
||||
use crate::fragment::{
|
||||
InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo,
|
||||
};
|
||||
use crate::fragment::{
|
||||
TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult,
|
||||
};
|
||||
use crate::inline::{InlineFlow, InlineFragmentNodeFlags, InlineFragmentNodeInfo};
|
||||
use crate::linked_list::prepend_from;
|
||||
use crate::list_item::{ListItemFlow, ListStyleTypeContent};
|
||||
use crate::multicol::{MulticolColumnFlow, MulticolFlow};
|
||||
|
@ -40,15 +47,18 @@ use crate::table_wrapper::TableWrapperFlow;
|
|||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::PostorderNodeMutTraversal;
|
||||
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data};
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use crate::ServoArc;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{is_image_data, LayoutElementType, LayoutNodeType};
|
||||
use servo_config::opts;
|
||||
use servo_url::ServoUrl;
|
||||
use std::collections::LinkedList;
|
||||
use std::marker::PhantomData;
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::caption_side::T as CaptionSide;
|
||||
use style::computed_values::display::T as Display;
|
||||
use style::computed_values::empty_cells::T as EmptyCells;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! Data needed by the layout thread.
|
||||
|
||||
use crate::display_list::items::{WebRenderImageInfo, OpaqueNode};
|
||||
use crate::display_list::items::{OpaqueNode, WebRenderImageInfo};
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use fnv::FnvHasher;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
|
|
|
@ -13,8 +13,8 @@ use style::computed_values::background_clip::single_value::T as BackgroundClip;
|
|||
use style::computed_values::background_origin::single_value::T as BackgroundOrigin;
|
||||
use style::properties::style_structs::Background;
|
||||
use style::values::computed::{BackgroundSize, LengthOrPercentageOrAuto};
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::background::BackgroundSize as GenericBackgroundSize;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::specified::background::BackgroundRepeatKeyword;
|
||||
use webrender_api::BorderRadius;
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ use crate::display_list::ToLayout;
|
|||
use euclid::{Rect, SideOffsets2D, Size2D};
|
||||
use style::computed_values::border_image_outset::T as BorderImageOutset;
|
||||
use style::properties::style_structs::Border;
|
||||
use style::values::Either;
|
||||
use style::values::computed::NumberOrPercentage;
|
||||
use style::values::computed::{BorderCornerRadius, BorderImageWidth};
|
||||
use style::values::computed::{BorderImageSideWidth, LengthOrNumber};
|
||||
use style::values::computed::NumberOrPercentage;
|
||||
use style::values::generics::border::{BorderImageSideWidth as GenericBorderImageSideWidth};
|
||||
use style::values::generics::border::BorderImageSideWidth as GenericBorderImageSideWidth;
|
||||
use style::values::generics::rect::Rect as StyleRect;
|
||||
use style::values::Either;
|
||||
use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF};
|
||||
use webrender_api::{LayoutSize, LayoutSideOffsets, NormalBorder};
|
||||
use webrender_api::{LayoutSideOffsets, LayoutSize, NormalBorder};
|
||||
|
||||
/// Computes a border radius size against the containing size.
|
||||
///
|
||||
|
|
|
@ -12,31 +12,31 @@ use app_units::{Au, AU_PER_PX};
|
|||
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::ToLayout;
|
||||
use crate::display_list::background::{self, get_cyclic};
|
||||
use crate::display_list::border;
|
||||
use crate::display_list::gradient;
|
||||
use crate::display_list::items::{BaseDisplayItem, BLUR_INFLATION_FACTOR, ClipScrollNode};
|
||||
use crate::display_list::items::{BaseDisplayItem, ClipScrollNode, BLUR_INFLATION_FACTOR};
|
||||
use crate::display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling};
|
||||
use crate::display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList};
|
||||
use crate::display_list::items::{DisplayListSection, CommonDisplayItem};
|
||||
use crate::display_list::items::{CommonDisplayItem, DisplayListSection};
|
||||
use crate::display_list::items::{IframeDisplayItem, OpaqueNode};
|
||||
use crate::display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem};
|
||||
use crate::display_list::items::{StackingContext, StackingContextType, StickyFrameData};
|
||||
use crate::display_list::items::{TextOrientation, WebRenderImageInfo};
|
||||
use crate::display_list::ToLayout;
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::flow::{BaseFlow, Flow, FlowFlags};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
|
||||
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
|
||||
use crate::list_item::ListItemFlow;
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table_cell::CollapsedBordersForCell;
|
||||
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
|
||||
use fnv::FnvHashMap;
|
||||
use gfx::text::TextRun;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::TextRun;
|
||||
use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId};
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
|
@ -56,20 +56,20 @@ use style::computed_values::visibility::T as Visibility;
|
|||
use style::logical_geometry::{LogicalMargin, LogicalPoint, LogicalRect};
|
||||
use style::properties::{style_structs, ComputedValues};
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::{Either, RGBA};
|
||||
use style::values::computed::Gradient;
|
||||
use style::values::computed::effects::SimpleShadow;
|
||||
use style::values::computed::image::Image as ComputedImage;
|
||||
use style::values::computed::Gradient;
|
||||
use style::values::generics::background::BackgroundSize;
|
||||
use style::values::generics::image::{GradientKind, Image, PaintWorklet};
|
||||
use style::values::generics::ui::Cursor;
|
||||
use style::values::{Either, RGBA};
|
||||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::CSSPixel;
|
||||
use style_traits::ToCss;
|
||||
use style_traits::cursor::CursorKind;
|
||||
use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF};
|
||||
use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LayoutRect};
|
||||
use webrender_api::{LayoutSize, LayoutTransform, LayoutVector2D, LineStyle, NinePatchBorder};
|
||||
use webrender_api::{NinePatchBorderSource, NormalBorder, StickyOffsetBounds, ScrollSensitivity};
|
||||
use webrender_api::{NinePatchBorderSource, NormalBorder, ScrollSensitivity, StickyOffsetBounds};
|
||||
|
||||
fn establishes_containing_block_for_absolute(
|
||||
flags: StackingContextCollectionFlags,
|
||||
|
|
|
@ -7,10 +7,10 @@ use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Vector2D};
|
|||
use style::computed_values::image_rendering::T as ImageRendering;
|
||||
use style::computed_values::mix_blend_mode::T as MixBlendMode;
|
||||
use style::computed_values::transform_style::T as TransformStyle;
|
||||
use style::values::RGBA;
|
||||
use style::values::computed::{BorderStyle, Filter};
|
||||
use style::values::generics::effects::Filter as GenericFilter;
|
||||
use style::values::specified::border::BorderImageRepeatKeyword;
|
||||
use style::values::RGBA;
|
||||
use webrender_api as wr;
|
||||
|
||||
pub trait ToLayout {
|
||||
|
|
|
@ -8,11 +8,11 @@ use app_units::Au;
|
|||
use crate::display_list::ToLayout;
|
||||
use euclid::{Point2D, Size2D, Vector2D};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position};
|
||||
use style::values::computed::image::{EndingShape, LineDirection};
|
||||
use style::values::generics::image::{Circle, Ellipse, ShapeExtent};
|
||||
use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position};
|
||||
use style::values::generics::image::EndingShape as GenericEndingShape;
|
||||
use style::values::generics::image::GradientItem as GenericGradientItem;
|
||||
use style::values::generics::image::{Circle, Ellipse, ShapeExtent};
|
||||
use style::values::specified::position::{X, Y};
|
||||
use webrender_api::{ExtendMode, Gradient, GradientBuilder, GradientStop, RadialGradient};
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
//! low-level drawing primitives.
|
||||
|
||||
use euclid::{SideOffsets2D, TypedRect, Vector2D};
|
||||
use gfx_traits::{self, StackingContextId};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use gfx_traits::{self, StackingContextId};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image::base::Image;
|
||||
use servo_geometry::MaxRect;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
use app_units::{Au, MAX_AU};
|
||||
use crate::block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseFlag};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
|
||||
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::{AdjoiningMargins, CollapsibleMargins};
|
||||
|
@ -27,8 +27,10 @@ use style::computed_values::justify_content::T as JustifyContent;
|
|||
use style::logical_geometry::{Direction, LogicalSize};
|
||||
use style::properties::ComputedValues;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use style::values::computed::flex::FlexBasis;
|
||||
use style::values::computed::{
|
||||
LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone,
|
||||
};
|
||||
use style::values::generics::flex::FlexBasis as GenericFlexBasis;
|
||||
|
||||
/// The size of an axis. May be a specified size, a min/max
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
use app_units::Au;
|
||||
use crate::block::{BlockFlow, FormattingContextType};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::display_list::items::ClippingAndScrolling;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::floats::{Floats, SpeculatedFloatPlacement};
|
||||
use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
|
||||
|
@ -46,16 +46,16 @@ use crate::table_colgroup::TableColGroupFlow;
|
|||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use gfx_traits::StackingContextId;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use gfx_traits::StackingContextId;
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect};
|
||||
use std::fmt;
|
||||
use std::iter::Zip;
|
||||
use std::slice::IterMut;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::clear::T as Clear;
|
||||
use style::computed_values::float::T as Float;
|
||||
use style::computed_values::overflow_x::T as StyleOverflow;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
use crate::flow::{Flow, FlowClass};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use serde::ser::{Serialize, SerializeSeq, Serializer};
|
||||
use serde_json::{Map, Value, to_value};
|
||||
use std::collections::{LinkedList, linked_list};
|
||||
use serde_json::{to_value, Map, Value};
|
||||
use std::collections::{linked_list, LinkedList};
|
||||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
|
|
@ -5,24 +5,24 @@
|
|||
//! The `Fragment` type, which represents the leaves of the layout tree.
|
||||
|
||||
use app_units::Au;
|
||||
use canvas_traits::canvas::{CanvasMsg, CanvasId};
|
||||
use crate::ServoArc;
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use canvas_traits::canvas::{CanvasId, CanvasMsg};
|
||||
use crate::context::{with_thread_local_font_context, LayoutContext};
|
||||
use crate::display_list::items::{ClipScrollNodeIndex, OpaqueNode, BLUR_INFLATION_FACTOR};
|
||||
use crate::display_list::ToLayout;
|
||||
use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
|
||||
use crate::floats::ClearType;
|
||||
use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
|
||||
use crate::inline::{InlineFragmentContext, InlineFragmentNodeFlags, InlineFragmentNodeInfo};
|
||||
use crate::inline::{InlineMetrics, LineMetrics};
|
||||
#[cfg(debug_assertions)]
|
||||
use crate::layout_debug;
|
||||
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
|
||||
use crate::model::style_length;
|
||||
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
|
||||
use crate::text;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use crate::ServoArc;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::{TextRun, TextRunSlice};
|
||||
|
@ -32,15 +32,17 @@ use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
|||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
use range::*;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource, HTMLMediaData, SVGSVGData};
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_url::ServoUrl;
|
||||
use std::{f32, fmt};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cmp::{Ordering, max, min};
|
||||
use std::cmp::{max, min, Ordering};
|
||||
use std::collections::LinkedList;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{f32, fmt};
|
||||
use style::computed_values::border_collapse::T as BorderCollapse;
|
||||
use style::computed_values::box_sizing::T as BoxSizing;
|
||||
use style::computed_values::clear::T as Clear;
|
||||
|
@ -59,8 +61,8 @@ use style::properties::ComputedValues;
|
|||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::str::char_is_whitespace;
|
||||
use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use style::values::computed::counters::ContentItem;
|
||||
use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use style::values::generics::box_::{Perspective, VerticalAlign};
|
||||
use style::values::generics::transform;
|
||||
use webrender_api::{self, LayoutTransform};
|
||||
|
|
|
@ -8,10 +8,12 @@
|
|||
//! done in parallel and is therefore a sequential pass that runs on as little of the flow tree
|
||||
//! as possible.
|
||||
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::context::{with_thread_local_font_context, LayoutContext};
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use crate::fragment::{
|
||||
Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo,
|
||||
};
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::InorderFlowTraversal;
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::flow::{FlowFlags, Flow, GetBaseFlow};
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow};
|
||||
use style::computed_values::float::T as Float;
|
||||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
|
|
|
@ -3,32 +3,32 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::{Au, MIN_AU};
|
||||
use crate::ServoArc;
|
||||
use crate::block::AbsoluteAssignBSizesTraversal;
|
||||
use crate::context::{LayoutContext, LayoutFontContext};
|
||||
use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
|
||||
use crate::floats::{FloatKind, Floats, PlacementInfo};
|
||||
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
|
||||
use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow::{EarlyAbsolutePositionInfo, FlowFlags, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::fragment::FragmentFlags;
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::IntrinsicISizesContribution;
|
||||
use crate::text;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use crate::ServoArc;
|
||||
use euclid::{Point2D, Size2D};
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use range::{Range, RangeIndex};
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use std::{fmt, i32, isize, mem};
|
||||
use std::cmp::max;
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::Arc;
|
||||
use std::{fmt, i32, isize, mem};
|
||||
use style::computed_values::display::T as Display;
|
||||
use style::computed_values::overflow_x::T as StyleOverflow;
|
||||
use style::computed_values::position::T as Position;
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::cell::RefCell;
|
|||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
#[cfg(debug_assertions)]
|
||||
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
|
||||
thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None));
|
||||
|
||||
|
|
|
@ -87,9 +87,9 @@ pub mod traversal;
|
|||
pub mod wrapper;
|
||||
|
||||
// For unit tests:
|
||||
pub use self::data::LayoutData;
|
||||
pub use crate::fragment::Fragment;
|
||||
pub use crate::fragment::SpecificFragmentInfo;
|
||||
pub use self::data::LayoutData;
|
||||
|
||||
// We can't use servo_arc for everything in layout, because the Flow stuff uses
|
||||
// weak references.
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
|
||||
use app_units::Au;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
|
||||
use crate::context::{with_thread_local_font_context, LayoutContext};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
|
||||
use crate::fragment::Overflow;
|
||||
use crate::fragment::{
|
||||
CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo,
|
||||
};
|
||||
use crate::generated_content;
|
||||
use crate::inline::InlineFlow;
|
||||
use euclid::Point2D;
|
||||
|
|
|
@ -11,8 +11,8 @@ use std::cmp::{max, min};
|
|||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentage};
|
||||
use style::values::computed::LengthOrPercentageOrNone;
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
|
||||
/// A collapsible margin. See CSS 2.1 § 8.3.1.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
|
|
|
@ -5,23 +5,23 @@
|
|||
//! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/
|
||||
|
||||
use app_units::Au;
|
||||
use crate::ServoArc;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
|
||||
use crate::flow::{Flow, FlowClass, FragmentationContext, GetBaseFlow, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::ServoArc;
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::cmp::{min, max};
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::Either;
|
||||
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use style::values::generics::column::ColumnCount;
|
||||
use style::values::Either;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for MulticolFlow {}
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::flow::{Flow, GetBaseFlow};
|
|||
use crate::flow_ref::FlowRef;
|
||||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
|
||||
use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use profile_traits::time::{self, profile, TimerMetadata};
|
||||
use rayon;
|
||||
use servo_config::opts;
|
||||
use smallvec::SmallVec;
|
||||
|
|
|
@ -7,27 +7,29 @@
|
|||
use app_units::Au;
|
||||
use crate::construct::ConstructionResult;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::IndexableText;
|
||||
use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
|
||||
use crate::display_list::IndexableText;
|
||||
use crate::flow::{Flow, GetBaseFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
|
||||
use crate::inline::InlineFragmentNodeFlags;
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use crate::sequential;
|
||||
use crate::wrapper::LayoutNodeLayoutData;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
use script_layout_interface::StyleData;
|
||||
use script_layout_interface::rpc::TextIndexResponse;
|
||||
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};
|
||||
use script_layout_interface::rpc::{NodeGeometryResponse, NodeScrollIdResponse};
|
||||
use script_layout_interface::rpc::{OffsetParentResponse, ResolvedStyleResponse, StyleResponse};
|
||||
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_layout_interface::StyleData;
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
use script_traits::LayoutMsg as ConstellationMsg;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use std::cmp::{min, max};
|
||||
use std::cmp::{max, min};
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use style::computed_values::display::T as Display;
|
||||
|
@ -35,8 +37,8 @@ use style::computed_values::position::T as Position;
|
|||
use style::computed_values::visibility::T as Visibility;
|
||||
use style::context::{StyleContext, ThreadLocalStyleContext};
|
||||
use style::dom::TElement;
|
||||
use style::logical_geometry::{WritingMode, BlockFlowDirection, InlineBaseDirection};
|
||||
use style::properties::{style_structs, PropertyId, PropertyDeclarationId, LonghandId};
|
||||
use style::logical_geometry::{BlockFlowDirection, InlineBaseDirection, WritingMode};
|
||||
use style::properties::{style_structs, LonghandId, PropertyDeclarationId, PropertyId};
|
||||
use style::selector_parser::PseudoElement;
|
||||
use style_traits::ToCss;
|
||||
use webrender_api::ExternalScrollId;
|
||||
|
|
|
@ -8,8 +8,8 @@ use app_units::Au;
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::floats::SpeculatedFloatPlacement;
|
||||
use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
|
||||
use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem};
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::fragment::{CoordinateSystem, FragmentBorderBoxIterator};
|
||||
use crate::generated_content::ResolveGeneratedContent;
|
||||
use crate::incremental::RelayoutMode;
|
||||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
|
||||
|
|
|
@ -9,8 +9,13 @@ use crate::block::{BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
|
|||
use crate::block::{ISizeConstraintInput, ISizeConstraintSolution};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use crate::display_list::{
|
||||
DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState,
|
||||
};
|
||||
use crate::flow::{
|
||||
BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils,
|
||||
OpaqueFlow,
|
||||
};
|
||||
use crate::flow_list::{FlowListIterator, MutFlowListIterator};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
|
@ -25,11 +30,11 @@ use std::{cmp, fmt};
|
|||
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
||||
use style::context::SharedStyleContext;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
use style::properties::style_structs::Background;
|
||||
use style::properties::ComputedValues;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use style::values::CSSFloat;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for TableFlow {}
|
||||
|
|
|
@ -9,7 +9,9 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow::{
|
||||
EarlyAbsolutePositionInfo, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow,
|
||||
};
|
||||
use crate::flow_list::MutFlowListIterator;
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
|
|
|
@ -12,13 +12,17 @@
|
|||
//! Hereafter this document is referred to as INTRINSIC.
|
||||
|
||||
use app_units::Au;
|
||||
use crate::block::{AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput};
|
||||
use crate::block::{
|
||||
AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput,
|
||||
};
|
||||
use crate::block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::{
|
||||
BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags,
|
||||
};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
|
||||
use crate::flow::{Flow, FlowClass, FlowFlags, ImmutableFlowUtils, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
|
@ -31,8 +35,8 @@ use style::computed_values::{position, table_layout};
|
|||
use style::context::SharedStyleContext;
|
||||
use style::logical_geometry::{LogicalRect, LogicalSize};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use style::values::CSSFloat;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub enum TableLayout {
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::fragment::{Fragment, ScannedTextFlags};
|
|||
use crate::fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
|
||||
use crate::linked_list::split_off_head;
|
||||
use gfx::font::{FontRef, FontMetrics, RunMetrics, ShapingFlags, ShapingOptions};
|
||||
use gfx::font::{FontMetrics, FontRef, RunMetrics, ShapingFlags, ShapingOptions};
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::TextRun;
|
||||
use gfx::text::util::{self, CompressionMode};
|
||||
|
@ -26,11 +26,11 @@ use style::computed_values::text_transform::T as TextTransform;
|
|||
use style::computed_values::white_space::T as WhiteSpace;
|
||||
use style::computed_values::word_break::T as WordBreak;
|
||||
use style::logical_geometry::{LogicalSize, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::properties::style_structs::Font as FontStyleStruct;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::generics::text::LineHeight;
|
||||
use unicode_bidi as bidi;
|
||||
use unicode_script::{Script, get_script};
|
||||
use unicode_script::{get_script, Script};
|
||||
use xi_unicode::LineBreakLeafIter;
|
||||
|
||||
/// Returns the concatenated text of a list of unscanned text fragments.
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
use crate::construct::FlowConstructor;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::DisplayListBuildState;
|
||||
use crate::flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
|
||||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use servo_config::opts;
|
||||
use style::context::{SharedStyleContext, StyleContext};
|
||||
|
@ -17,8 +17,8 @@ use style::data::ElementData;
|
|||
use style::dom::{NodeInfo, TElement, TNode};
|
||||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::traversal::{DomTraversal, recalc_style_at};
|
||||
use style::traversal::PerLevelTraversalData;
|
||||
use style::traversal::{recalc_style_at, DomTraversal};
|
||||
|
||||
pub struct RecalcStyleAndConstructFlows<'a> {
|
||||
context: LayoutContext<'a>,
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
use atomic_refcell::{AtomicRef, AtomicRefMut};
|
||||
use crate::data::{LayoutData, LayoutDataFlags, StyleAndLayoutData};
|
||||
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use script_layout_interface::wrapper_traits::GetLayoutData;
|
||||
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use style::dom::{NodeInfo, TNode};
|
||||
use style::selector_parser::RestyleDamage;
|
||||
use style::values::computed::counters::ContentItem;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use atomic_refcell::{AtomicRef, AtomicRefMut, AtomicRefCell};
|
||||
use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
|
||||
use gfx_traits::ByteIndex;
|
||||
use html5ever::{LocalName, Namespace};
|
||||
use layout::data::StyleAndLayoutData;
|
||||
|
@ -38,19 +38,27 @@ use layout::wrapper::GetRawData;
|
|||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use range::Range;
|
||||
use script::layout_exports::NodeFlags;
|
||||
use script::layout_exports::PendingRestyle;
|
||||
use script::layout_exports::{CharacterDataTypeId, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
||||
use script::layout_exports::{Document, Element, Node, Text};
|
||||
use script::layout_exports::{LayoutCharacterDataHelpers, LayoutDocumentHelpers};
|
||||
use script::layout_exports::{LayoutElementHelpers, LayoutNodeHelpers, LayoutDom, RawLayoutElementHelpers};
|
||||
use script::layout_exports::NodeFlags;
|
||||
use script::layout_exports::PendingRestyle;
|
||||
use script_layout_interface::{HTMLCanvasData, HTMLMediaData, LayoutNodeType, OpaqueStyleAndLayoutData};
|
||||
use script::layout_exports::{
|
||||
LayoutDom, LayoutElementHelpers, LayoutNodeHelpers, RawLayoutElementHelpers,
|
||||
};
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
DangerousThreadSafeLayoutNode, GetLayoutData, LayoutNode,
|
||||
};
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{
|
||||
HTMLCanvasData, HTMLMediaData, LayoutNodeType, OpaqueStyleAndLayoutData,
|
||||
};
|
||||
use script_layout_interface::{SVGSVGData, StyleData, TrustedNodeAddress};
|
||||
use script_layout_interface::wrapper_traits::{DangerousThreadSafeLayoutNode, GetLayoutData, LayoutNode};
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext, QuirksMode};
|
||||
use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
|
||||
use selectors::matching::VisitedHandlingMode;
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext, QuirksMode};
|
||||
use selectors::sink::Push;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use servo_atoms::Atom;
|
||||
|
@ -60,9 +68,8 @@ use std::fmt::Debug;
|
|||
use std::hash::{Hash, Hasher};
|
||||
use std::marker::PhantomData;
|
||||
use std::ptr::NonNull;
|
||||
use std::sync::Arc as StdArc;
|
||||
use std::sync::atomic::Ordering;
|
||||
use style::CaseSensitivityExt;
|
||||
use std::sync::Arc as StdArc;
|
||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
use style::attr::AttrValue;
|
||||
use style::context::SharedStyleContext;
|
||||
|
@ -72,11 +79,12 @@ use style::dom::{TDocument, TElement, TNode, TShadowRoot};
|
|||
use style::element_state::*;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::properties::{ComputedValues, PropertyDeclarationBlock};
|
||||
use style::selector_parser::{AttrValue as SelectorAttrValue, NonTSPseudoClass, Lang};
|
||||
use style::selector_parser::{PseudoElement, SelectorImpl, extended_filtering};
|
||||
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, Locked as StyleLocked};
|
||||
use style::selector_parser::{extended_filtering, PseudoElement, SelectorImpl};
|
||||
use style::selector_parser::{AttrValue as SelectorAttrValue, Lang, NonTSPseudoClass};
|
||||
use style::shared_lock::{Locked as StyleLocked, SharedRwLock as StyleSharedRwLock};
|
||||
use style::str::is_whitespace;
|
||||
use style::stylist::CascadeData;
|
||||
use style::CaseSensitivityExt;
|
||||
|
||||
pub unsafe fn drop_style_and_layout_data(data: OpaqueStyleAndLayoutData) {
|
||||
let ptr = data.ptr.as_ptr() as *mut StyleData;
|
||||
|
@ -664,7 +672,7 @@ impl<'le> ServoLayoutElement<'le> {
|
|||
}
|
||||
|
||||
pub unsafe fn note_dirty_descendant(&self) {
|
||||
use ::selectors::Element;
|
||||
use selectors::Element;
|
||||
|
||||
let mut current = Some(*self);
|
||||
while let Some(el) = current {
|
||||
|
@ -1132,7 +1140,7 @@ where
|
|||
{
|
||||
type Item = ConcreteNode;
|
||||
fn next(&mut self) -> Option<ConcreteNode> {
|
||||
use ::selectors::Element;
|
||||
use selectors::Element;
|
||||
match self.parent_node.get_pseudo_element_type() {
|
||||
PseudoElementType::Before | PseudoElementType::After => None,
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ extern crate webrender_api;
|
|||
mod dom_wrapper;
|
||||
|
||||
use app_units::Au;
|
||||
use crate::dom_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode};
|
||||
use crate::dom_wrapper::drop_style_and_layout_data;
|
||||
use crate::dom_wrapper::{ServoLayoutDocument, ServoLayoutElement, ServoLayoutNode};
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use euclid::{Point2D, Rect, Size2D, TypedScale, TypedSize2D};
|
||||
use fnv::FnvHashMap;
|
||||
|
@ -64,28 +64,34 @@ use fxhash::FxHashMap;
|
|||
use gfx::font;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context;
|
||||
use gfx_traits::{Epoch, node_id_from_scroll_id};
|
||||
use gfx_traits::{node_id_from_scroll_id, Epoch};
|
||||
use histogram::Histogram;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use layout::animation;
|
||||
use layout::construct::ConstructionResult;
|
||||
use layout::context::malloc_size_of_persistent_local_context;
|
||||
use layout::context::LayoutContext;
|
||||
use layout::context::RegisteredPainter;
|
||||
use layout::context::RegisteredPainters;
|
||||
use layout::context::malloc_size_of_persistent_local_context;
|
||||
use layout::display_list::{IndexableText, ToLayout, WebRenderDisplayListConverter};
|
||||
use layout::display_list::items::{OpaqueNode, WebRenderImageInfo};
|
||||
use layout::display_list::{IndexableText, ToLayout, WebRenderDisplayListConverter};
|
||||
use layout::flow::{Flow, GetBaseFlow, ImmutableFlowUtils, MutableOwnedFlowUtils};
|
||||
use layout::flow_ref::FlowRef;
|
||||
use layout::incremental::{LayoutDamageComputation, RelayoutMode, SpecialRestyleDamage};
|
||||
use layout::layout_debug;
|
||||
use layout::parallel;
|
||||
use layout::query::{LayoutRPCImpl, LayoutThreadData, process_content_box_request, process_content_boxes_request};
|
||||
use layout::query::{
|
||||
process_content_box_request, process_content_boxes_request, LayoutRPCImpl, LayoutThreadData,
|
||||
};
|
||||
use layout::query::{process_element_inner_text_query, process_node_geometry_request};
|
||||
use layout::query::{process_node_scroll_area_request, process_node_scroll_id_request};
|
||||
use layout::query::{process_offset_parent_query, process_resolved_style_request, process_style_query};
|
||||
use layout::query::{
|
||||
process_offset_parent_query, process_resolved_style_request, process_style_query,
|
||||
};
|
||||
use layout::sequential;
|
||||
use layout::traversal::{ComputeStackingRelativePositions, PreorderFlowTraversal, RecalcStyleAndConstructFlows};
|
||||
use layout::traversal::{
|
||||
ComputeStackingRelativePositions, PreorderFlowTraversal, RecalcStyleAndConstructFlows,
|
||||
};
|
||||
use layout::wrapper::LayoutNodeLayoutData;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
use libc::c_void;
|
||||
|
@ -96,21 +102,21 @@ use msg::constellation_msg::TopLevelBrowsingContextId;
|
|||
use net_traits::image_cache::{ImageCache, UsePlaceholder};
|
||||
use parking_lot::RwLock;
|
||||
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use profile_traits::time::{self, profile, TimerMetadata};
|
||||
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use script_layout_interface::message::{Msg, NewLayoutThreadInfo, NodesFromPointQueryType, Reflow};
|
||||
use script_layout_interface::message::{ReflowComplete, QueryMsg, ReflowGoal, ScriptReflow};
|
||||
use script_layout_interface::rpc::{LayoutRPC, StyleResponse, OffsetParentResponse};
|
||||
use script_layout_interface::message::{QueryMsg, ReflowComplete, ReflowGoal, ScriptReflow};
|
||||
use script_layout_interface::rpc::TextIndexResponse;
|
||||
use script_layout_interface::rpc::{LayoutRPC, OffsetParentResponse, StyleResponse};
|
||||
use script_layout_interface::wrapper_traits::LayoutNode;
|
||||
use script_traits::Painter;
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::{DrawAPaintImageResult, PaintWorkletError};
|
||||
use script_traits::{ScrollState, UntrustedNodeAddress};
|
||||
use script_traits::Painter;
|
||||
use selectors::Element;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_atoms::Atom;
|
||||
use servo_channel::{Receiver, Sender, channel, route_ipc_receiver_to_new_servo_receiver};
|
||||
use servo_channel::{channel, route_ipc_receiver_to_new_servo_receiver, Receiver, Sender};
|
||||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_geometry::MaxRect;
|
||||
|
@ -121,8 +127,8 @@ use std::collections::HashMap;
|
|||
use std::mem as std_mem;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::process;
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
use std::thread;
|
||||
use style::animation::Animation;
|
||||
use style::context::{QuirksMode, RegisteredSpeculativePainter, RegisteredSpeculativePainters};
|
||||
|
@ -137,7 +143,9 @@ use style::properties::PropertyId;
|
|||
use style::selector_parser::SnapshotMap;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::shared_lock::{SharedRwLock, SharedRwLockReadGuard, StylesheetGuards};
|
||||
use style::stylesheets::{Origin, Stylesheet, DocumentStyleSheet, StylesheetInDocument, UserAgentStylesheets};
|
||||
use style::stylesheets::{
|
||||
DocumentStyleSheet, Origin, Stylesheet, StylesheetInDocument, UserAgentStylesheets,
|
||||
};
|
||||
use style::stylist::Stylist;
|
||||
use style::thread_state::{self, ThreadState};
|
||||
use style::timer::Timer;
|
||||
|
|
|
@ -27,8 +27,8 @@ use msg::constellation_msg::PipelineId;
|
|||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use profile_traits::{mem, time};
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg};
|
||||
use script_traits::LayoutMsg as ConstellationMsg;
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg};
|
||||
use servo_channel::{Receiver, Sender};
|
||||
use servo_url::ServoUrl;
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -82,8 +82,8 @@ extern crate xml5ever;
|
|||
use serde_bytes::ByteBuf;
|
||||
use std::hash::{BuildHasher, Hash};
|
||||
use std::mem::size_of;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::ops::Range;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::os::raw::c_void;
|
||||
use void::Void;
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ extern crate servo_config;
|
|||
extern crate servo_url;
|
||||
extern crate time;
|
||||
|
||||
use gfx_traits::{Epoch, DisplayList};
|
||||
use gfx_traits::{DisplayList, Epoch};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use profile_traits::time::{ProfilerChan, ProfilerCategory, send_profile_data};
|
||||
use profile_traits::time::TimerMetadata;
|
||||
use profile_traits::time::{send_profile_data, ProfilerCategory, ProfilerChan};
|
||||
use script_traits::{ConstellationControlMsg, LayoutMsg, ProgressiveWebMetricType};
|
||||
use servo_config::opts;
|
||||
use servo_url::ServoUrl;
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
use crate::filemanager_thread::FileManager;
|
||||
use headers_core::HeaderMapExt;
|
||||
use headers_ext::{ContentLength, ContentType};
|
||||
use http::HeaderMap;
|
||||
use http::header::{self, HeaderValue};
|
||||
use http::HeaderMap;
|
||||
use ipc_channel::ipc;
|
||||
use mime::{self, Mime};
|
||||
use net_traits::{http_percent_encode, NetworkError};
|
||||
use net_traits::blob_url_store::parse_blob_url;
|
||||
use net_traits::filemanager_thread::ReadFileProgress;
|
||||
use net_traits::{http_percent_encode, NetworkError};
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
// TODO: Check on GET
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
use crate::hosts::replace_host;
|
||||
use crate::http_loader::Decoder;
|
||||
use flate2::read::GzDecoder;
|
||||
use hyper::{Body, Client};
|
||||
use hyper::body::Payload;
|
||||
use hyper::client::HttpConnector as HyperHttpConnector;
|
||||
use hyper::client::connect::{Connect, Destination};
|
||||
use hyper::client::HttpConnector as HyperHttpConnector;
|
||||
use hyper::rt::Future;
|
||||
use hyper::{Body, Client};
|
||||
use hyper_openssl::HttpsConnector;
|
||||
use openssl::ssl::{SslConnector, SslConnectorBuilder, SslMethod, SslOptions};
|
||||
use openssl::x509;
|
||||
use std::io::{Cursor, Read};
|
||||
use tokio::prelude::{Async, Stream};
|
||||
use tokio::prelude::future::Executor;
|
||||
use tokio::prelude::{Async, Stream};
|
||||
|
||||
pub const BUF_SIZE: usize = 32768;
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
use crate::cookie_rs;
|
||||
use hyper_serde::{self, Serde};
|
||||
use net_traits::CookieSource;
|
||||
use net_traits::pub_domains::is_pub_domain;
|
||||
use net_traits::CookieSource;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::net::{Ipv4Addr, Ipv6Addr};
|
||||
use time::{Tm, now, at, Duration};
|
||||
use time::{at, now, Duration, Tm};
|
||||
|
||||
/// A stored cookie that wraps the definition in cookie-rs. This is used to implement
|
||||
/// various behaviours defined in the spec that rely on an associated request URL,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
use crate::cookie::Cookie;
|
||||
use crate::cookie_rs;
|
||||
use net_traits::CookieSource;
|
||||
use net_traits::pub_domains::reg_suffix;
|
||||
use net_traits::CookieSource;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
use base64;
|
||||
use mime::Mime;
|
||||
use servo_url::ServoUrl;
|
||||
use url::Position;
|
||||
use url::percent_encoding::percent_decode;
|
||||
use url::Position;
|
||||
|
||||
pub enum DecodeError {
|
||||
InvalidDataUri,
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::blob_loader::load_blob_sync;
|
|||
use crate::data_loader::decode;
|
||||
use crate::fetch::cors_cache::CorsCache;
|
||||
use crate::filemanager_thread::FileManager;
|
||||
use crate::http_loader::{HttpState, determine_request_referrer, http_fetch};
|
||||
use crate::http_loader::{determine_request_referrer, http_fetch, HttpState};
|
||||
use crate::http_loader::{set_default_accept, set_default_accept_language};
|
||||
use crate::subresource_integrity::is_response_integrity_valid;
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
|
@ -18,20 +18,20 @@ use hyper::StatusCode;
|
|||
use ipc_channel::ipc::IpcReceiver;
|
||||
use mime::{self, Mime};
|
||||
use mime_guess::guess_mime_type;
|
||||
use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy};
|
||||
use net_traits::request::{CredentialsMode, Destination, Referrer, Request, RequestMode};
|
||||
use net_traits::request::{ResponseTainting, Origin, Window};
|
||||
use net_traits::request::{Origin, ResponseTainting, Window};
|
||||
use net_traits::response::{Response, ResponseBody, ResponseType};
|
||||
use servo_channel::{channel, Sender, Receiver};
|
||||
use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy};
|
||||
use servo_channel::{channel, Receiver, Sender};
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::Cow;
|
||||
use std::fs::File;
|
||||
use std::io::{BufReader, BufRead, Seek, SeekFrom};
|
||||
use std::io::{BufRead, BufReader, Seek, SeekFrom};
|
||||
use std::mem;
|
||||
use std::ops::Bound;
|
||||
use std::str;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
||||
lazy_static! {
|
||||
|
|
|
@ -7,15 +7,17 @@ use ipc_channel::ipc::{self, IpcSender};
|
|||
use mime_guess::guess_mime_type_opt;
|
||||
use net_traits::blob_url_store::{BlobBuf, BlobURLStoreError};
|
||||
use net_traits::filemanager_thread::{FileManagerResult, FileManagerThreadMsg, FileOrigin};
|
||||
use net_traits::filemanager_thread::{FileManagerThreadError, ReadFileProgress, RelativePos, SelectedFile};
|
||||
use net_traits::filemanager_thread::{
|
||||
FileManagerThreadError, ReadFileProgress, RelativePos, SelectedFile,
|
||||
};
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Seek, SeekFrom};
|
||||
use std::ops::Index;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::atomic::{self, AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::thread;
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use net_traits::IncludeSubdomains;
|
||||
use net_traits::pub_domains::reg_suffix;
|
||||
use net_traits::IncludeSubdomains;
|
||||
use serde_json;
|
||||
use servo_url::ServoUrl;
|
||||
use std::collections::HashMap;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue