mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Sort use
statements
This commit is contained in:
parent
45f7199eee
commit
76e59a46d3
162 changed files with 444 additions and 431 deletions
|
@ -11,8 +11,8 @@ extern crate serde;
|
|||
pub mod blocklist;
|
||||
pub mod scanfilter;
|
||||
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use crate::scanfilter::{BluetoothScanfilterSequence, RequestDeviceoptions};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum BluetoothError {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use azure::azure_hl::AntialiasMode;
|
||||
use crate::canvas_data::*;
|
||||
use canvas_traits::canvas::*;
|
||||
use crate::canvas_data::*;
|
||||
use euclid::Size2D;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::borrow::ToOwned;
|
||||
|
|
|
@ -2,17 +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::gl_context::GLContextFactory;
|
||||
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;
|
||||
use fnv::FnvHashMap;
|
||||
use gleam::gl;
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::rc::Rc;
|
||||
use crate::webgl_thread::{WebGLExternalImageApi, WebGLExternalImageHandler, WebGLThread};
|
||||
use webrender;
|
||||
use webrender_api;
|
||||
|
||||
|
|
|
@ -6,10 +6,12 @@ use crate::CompositionPipeline;
|
|||
use crate::SendableFrameTree;
|
||||
use crate::compositor_thread::{CompositorProxy, CompositorReceiver};
|
||||
use crate::compositor_thread::{InitialCompositorState, Msg};
|
||||
use euclid::{TypedPoint2D, TypedVector2D, TypedScale};
|
||||
use gfx_traits::Epoch;
|
||||
#[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 gfx_traits::Epoch;
|
||||
#[cfg(feature = "gleam")]
|
||||
use image::{DynamicImage, ImageFormat};
|
||||
use ipc_channel::ipc;
|
||||
|
@ -36,11 +38,9 @@ use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
|
|||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use time::{now, precise_time_ns, precise_time_s};
|
||||
use crate::touch::{TouchHandler, TouchAction};
|
||||
use webrender;
|
||||
use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResult};
|
||||
use webrender_api::{LayoutVector2D, ScrollLocation};
|
||||
use crate::windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
enum UnableToComposite {
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
//! Configuration options for a single run of the servo application. Created
|
||||
//! from command line arguments.
|
||||
|
||||
use crate::prefs::{self, PrefValue, PREFS};
|
||||
use euclid::TypedSize2D;
|
||||
use getopts::Options;
|
||||
use num_cpus;
|
||||
use crate::prefs::{self, PrefValue, PREFS};
|
||||
use servo_geometry::DeviceIndependentPixel;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::Cow;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::basedir::default_config_dir;
|
||||
use crate::opts;
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use num_cpus;
|
||||
use crate::opts;
|
||||
use rustc_serialize::json::{Json, ToJson};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cmp::max;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::pipeline::Pipeline;
|
||||
use euclid::TypedSize2D;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use crate::pipeline::Pipeline;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use style_traits::CSSPixel;
|
||||
|
||||
|
|
|
@ -91,8 +91,6 @@
|
|||
|
||||
use backtrace::Backtrace;
|
||||
use bluetooth_traits::BluetoothRequest;
|
||||
use crate::browsingcontext::{AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator};
|
||||
use crate::browsingcontext::NewBrowsingContextInfo;
|
||||
use canvas::canvas_paint_thread::CanvasPaintThread;
|
||||
use canvas::webgl_thread::WebGLThreads;
|
||||
use canvas_traits::canvas::CanvasId;
|
||||
|
@ -101,11 +99,17 @@ 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 crate::browsingcontext::NewBrowsingContextInfo;
|
||||
use crate::event_loop::EventLoop;
|
||||
use crate::network_listener::NetworkListener;
|
||||
use crate::pipeline::{InitialPipelineState, Pipeline};
|
||||
use crate::session_history::{JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff};
|
||||
use crate::timer_scheduler::TimerScheduler;
|
||||
use debugger;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy};
|
||||
use euclid::{Size2D, TypedSize2D, TypedScale};
|
||||
use crate::event_loop::EventLoop;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::{Error as IpcError};
|
||||
|
@ -120,8 +124,6 @@ use net_traits::{self, IpcSend, FetchResponseMsg, ResourceThreads};
|
|||
use net_traits::pub_domains::reg_host;
|
||||
use net_traits::request::RequestInit;
|
||||
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
|
||||
use crate::network_listener::NetworkListener;
|
||||
use crate::pipeline::{InitialPipelineState, Pipeline};
|
||||
use profile_traits::mem;
|
||||
use profile_traits::time;
|
||||
use script_traits::{AnimationState, AuxiliaryBrowsingContextLoadInfo, AnimationTickType, CompositorEvent};
|
||||
|
@ -139,7 +141,6 @@ use servo_config::prefs::PREFS;
|
|||
use servo_rand::{Rng, SeedableRng, ServoRng, random};
|
||||
use servo_remutex::ReentrantMutex;
|
||||
use servo_url::{Host, ImmutableOrigin, ServoUrl};
|
||||
use crate::session_history::{JointSessionHistory, NeedsToReload, SessionHistoryChange, SessionHistoryDiff};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use std::marker::PhantomData;
|
||||
|
@ -151,7 +152,6 @@ use std::thread;
|
|||
use style_traits::CSSPixel;
|
||||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use crate::timer_scheduler::TimerScheduler;
|
||||
use webrender_api;
|
||||
use webvr_traits::{WebVREvent, WebVRMsg};
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ use canvas_traits::webgl::WebGLPipeline;
|
|||
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 crate::event_loop::EventLoop;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
|
@ -555,9 +555,9 @@ impl UnprivilegedPipelineContent {
|
|||
|
||||
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
|
||||
pub fn spawn_multiprocess(self) -> Result<(), Error> {
|
||||
use crate::sandboxing::content_process_sandbox_profile;
|
||||
use gaol::sandbox::{self, Sandbox, SandboxMethods};
|
||||
use ipc_channel::ipc::IpcOneShotServer;
|
||||
use crate::sandboxing::content_process_sandbox_profile;
|
||||
|
||||
impl CommandMethods for sandbox::Command {
|
||||
fn arg<T>(&mut self, arg: T)
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::actors::console::ConsoleActor;
|
||||
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
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 ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use serde_json::{self, Map, Number, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::net::TcpStream;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
|
||||
|
||||
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 ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use serde_json::{self, Map, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::net::TcpStream;
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
//! Handles interaction with the remote web console on network events (HTTP requests, responses) in Servo.
|
||||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use devtools_traits::HttpRequest as DevtoolsHttpRequest;
|
||||
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
|
||||
use headers_core::HeaderMapExt;
|
||||
use headers_ext::{ContentType, Cookie};
|
||||
use http::{header, HeaderMap};
|
||||
use hyper::{Method, StatusCode};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
use time;
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
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 ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde_json::{Map, Value};
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -42,12 +42,12 @@ use crate::actors::stylesheets::StyleSheetsActor;
|
|||
use crate::actors::thread::ThreadActor;
|
||||
use crate::actors::timeline::TimelineActor;
|
||||
use crate::actors::worker::WorkerActor;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, ConsoleMessage, DevtoolsControlMsg};
|
||||
use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo, LogLevel, NetworkEvent};
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use servo_channel::{Receiver, Sender, channel};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -3,14 +3,17 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use crate::font_context::{FontContext, FontSource};
|
||||
use crate::font_template::FontTemplateDescriptor;
|
||||
use ordered_float::NotNan;
|
||||
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 euclid::{Point2D, Rect, Size2D};
|
||||
use ordered_float::NotNan;
|
||||
use servo_atoms::Atom;
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -24,9 +27,6 @@ use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
|||
use style::computed_values::{font_stretch, font_style, font_variant_caps, font_weight};
|
||||
use style::properties::style_structs::Font as FontStyleStruct;
|
||||
use style::values::computed::font::SingleFontFamily;
|
||||
use crate::text::Shaper;
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
use time;
|
||||
use unicode_script::Script;
|
||||
use webrender_api;
|
||||
|
|
|
@ -6,16 +6,16 @@ use app_units::Au;
|
|||
use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope};
|
||||
use crate::font_context::FontSource;
|
||||
use crate::font_template::{FontTemplate, FontTemplateDescriptor};
|
||||
use fontsan;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
|
||||
use net_traits::request::{Destination, RequestInit};
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
use crate::platform::font_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_template::FontTemplateData;
|
||||
use fontsan;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
|
||||
use net_traits::request::{Destination, RequestInit};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::{fmt, f32, mem, thread};
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use fnv::FnvHasher;
|
||||
use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef};
|
||||
use crate::font_cache_thread::FontTemplateInfo;
|
||||
use crate::font_template::FontTemplateDescriptor;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use crate::platform::font::FontHandle;
|
||||
pub use crate::platform::font_context::FontContextHandle;
|
||||
use fnv::FnvHasher;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use servo_arc::Arc;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* 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::text::util::is_cjk;
|
||||
use std::cell::RefCell;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read};
|
||||
use std::path::Path;
|
||||
use crate::text::util::is_cjk;
|
||||
use ucd::{Codepoint, UnicodeBlock};
|
||||
use xml5ever::Attribute;
|
||||
use xml5ever::driver::parse_document;
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
use app_units::Au;
|
||||
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN};
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::text::glyph::GlyphId;
|
||||
use crate::text::util::fixed_to_float;
|
||||
use freetype::freetype::{FT_Done_Face, FT_New_Face, FT_New_Memory_Face};
|
||||
use freetype::freetype::{FT_F26Dot6, FT_Face, FT_FaceRec};
|
||||
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
|
||||
|
@ -16,8 +20,6 @@ use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, FT_Vector};
|
|||
use freetype::freetype::FT_Sfnt_Tag;
|
||||
use freetype::succeeded;
|
||||
use freetype::tt_os2::TT_OS2;
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use servo_atoms::Atom;
|
||||
use std::{mem, ptr};
|
||||
use std::ffi::CString;
|
||||
|
@ -27,8 +29,6 @@ use style::computed_values::font_stretch::T as FontStretch;
|
|||
use style::computed_values::font_weight::T as FontWeight;
|
||||
use style::values::computed::font::FontStyle;
|
||||
use super::c_str_to_string;
|
||||
use crate::text::glyph::GlyphId;
|
||||
use crate::text::util::fixed_to_float;
|
||||
|
||||
// This constant is not present in the freetype
|
||||
// bindings due to bindgen not handling the way
|
||||
|
|
|
@ -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 crate::text::util::is_cjk;
|
||||
use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem};
|
||||
use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute};
|
||||
use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString};
|
||||
|
@ -13,7 +14,6 @@ use libc::{c_char, c_int};
|
|||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use super::c_str_to_string;
|
||||
use crate::text::util::is_cjk;
|
||||
|
||||
static FC_FAMILY: &'static [u8] = b"family\0";
|
||||
static FC_FILE: &'static [u8] = b"file\0";
|
||||
|
|
|
@ -17,12 +17,12 @@ use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag
|
|||
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 style::values::computed::font::{FontStretch, FontStyle, FontWeight};
|
||||
use crate::text::glyph::GlyphId;
|
||||
|
||||
const KERN_PAIR_LEN: usize = 6;
|
||||
|
||||
|
|
|
@ -7,14 +7,15 @@
|
|||
// renderer moves to a sandboxed process.
|
||||
|
||||
use app_units::Au;
|
||||
use dwrote;
|
||||
use dwrote::{Font, FontFace, FontFile};
|
||||
use dwrote::{FontStretch, FontStyle};
|
||||
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use crate::font::{FontTableTag, FractionalPixel};
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::platform::windows::font_context::FontContextHandle;
|
||||
use crate::platform::windows::font_list::font_from_atom;
|
||||
use crate::text::glyph::GlyphId;
|
||||
use dwrote;
|
||||
use dwrote::{Font, FontFace, FontFile};
|
||||
use dwrote::{FontStretch, FontStyle};
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
|
@ -25,7 +26,6 @@ use style::values::computed::font::FontStyle as StyleFontStyle;
|
|||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::font::FontStyle as GenericFontStyle;
|
||||
use style::values::specified::font::FontStretchKeyword;
|
||||
use crate::text::glyph::GlyphId;
|
||||
use truetype;
|
||||
|
||||
// 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::text::util::unicode_plane;
|
||||
use dwrote::{Font, FontDescriptor, FontCollection};
|
||||
use servo_atoms::Atom;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::atomic::{Ordering, AtomicUsize};
|
||||
use crate::text::util::unicode_plane;
|
||||
use ucd::{Codepoint, UnicodeBlock};
|
||||
|
||||
lazy_static! {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
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};
|
||||
|
@ -34,11 +33,12 @@ use crate::harfbuzz::hb_font_set_scale;
|
|||
use crate::harfbuzz::hb_glyph_info_t;
|
||||
use crate::harfbuzz::hb_glyph_position_t;
|
||||
use crate::platform::font::FontTable;
|
||||
use std::{char, cmp, ptr};
|
||||
use std::os::raw::{c_char, c_int, c_uint, c_void};
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::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};
|
||||
|
||||
const NO_GLYPH: i32 = -1;
|
||||
const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a');
|
||||
|
|
|
@ -6,13 +6,13 @@ use app_units::Au;
|
|||
use crate::font::{Font, FontHandleMethods, FontMetrics, ShapingFlags};
|
||||
use crate::font::{RunMetrics, ShapingOptions};
|
||||
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::slice::Iter;
|
||||
use std::sync::Arc;
|
||||
use style::str::char_is_whitespace;
|
||||
use crate::text::glyph::{ByteIndex, GlyphStore};
|
||||
use unicode_bidi as bidi;
|
||||
use webrender_api;
|
||||
use xi_unicode::LineBreakLeafIter;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::flow::{Flow, GetBaseFlow};
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use fxhash::FxHashMap;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use servo_channel::Receiver;
|
||||
|
|
|
@ -31,17 +31,18 @@ use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
|||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::items::DisplayListSection;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
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_list::FlowList;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::incremental::RelayoutMode;
|
||||
use crate::layout_debug;
|
||||
use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
|
||||
use crate::sequential;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::{Serialize, Serializer};
|
||||
use servo_geometry::MaxRect;
|
||||
use std::cmp::{max, min};
|
||||
|
@ -59,7 +60,6 @@ use style::properties::ComputedValues;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
|
||||
/// Information specific to floated blocks.
|
||||
#[derive(Clone, Serialize)]
|
||||
|
|
|
@ -30,6 +30,16 @@ use crate::linked_list::prepend_from;
|
|||
use crate::list_item::{ListItemFlow, ListStyleTypeContent};
|
||||
use crate::multicol::{MulticolColumnFlow, MulticolFlow};
|
||||
use crate::parallel;
|
||||
use crate::table::TableFlow;
|
||||
use crate::table_caption::TableCaptionFlow;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_colgroup::TableColGroupFlow;
|
||||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::PostorderNodeMutTraversal;
|
||||
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data};
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use servo_config::opts;
|
||||
|
@ -53,16 +63,6 @@ use style::selector_parser::{PseudoElement, RestyleDamage};
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::generics::counters::ContentItem;
|
||||
use style::values::generics::url::UrlOrNone as ImageUrlOrNone;
|
||||
use crate::table::TableFlow;
|
||||
use crate::table_caption::TableCaptionFlow;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_colgroup::TableColGroupFlow;
|
||||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::PostorderNodeMutTraversal;
|
||||
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
|
||||
|
||||
/// The results of flow construction for a DOM node.
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
//! Data needed by the layout thread.
|
||||
|
||||
use crate::display_list::items::{WebRenderImageInfo, OpaqueNode};
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use fnv::FnvHasher;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context::FontContext;
|
||||
|
@ -12,7 +13,6 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image_cache::{CanRequestImages, ImageCache, ImageState};
|
||||
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use parking_lot::RwLock;
|
||||
use script_layout_interface::{PendingImage, PendingImageState};
|
||||
use script_traits::Painter;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
use app_units::Au;
|
||||
use crate::display_list::border;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use crate::model::MaybeAuto;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use style::computed_values::background_attachment::single_value::T as BackgroundAttachment;
|
||||
use style::computed_values::background_clip::single_value::T as BackgroundClip;
|
||||
use style::computed_values::background_origin::single_value::T as BackgroundOrigin;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
//! paint.
|
||||
|
||||
use app_units::{Au, AU_PER_PX};
|
||||
use crate::block::BlockFlow;
|
||||
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};
|
||||
|
@ -24,20 +24,21 @@ 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 euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::flow::{BaseFlow, Flow, FlowFlags};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use fnv::FnvHashMap;
|
||||
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
|
||||
use crate::list_item::ListItemFlow;
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table_cell::CollapsedBordersForCell;
|
||||
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
|
||||
use fnv::FnvHashMap;
|
||||
use gfx::text::TextRun;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId};
|
||||
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
|
||||
use ipc_channel::ipc;
|
||||
use crate::list_item::ListItemFlow;
|
||||
use crate::model::MaybeAuto;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image_cache::UsePlaceholder;
|
||||
use range::Range;
|
||||
|
@ -65,7 +66,6 @@ use style::values::generics::ui::Cursor;
|
|||
use style_traits::CSSPixel;
|
||||
use style_traits::ToCss;
|
||||
use style_traits::cursor::CursorKind;
|
||||
use crate::table_cell::CollapsedBordersForCell;
|
||||
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};
|
||||
|
|
|
@ -9,13 +9,14 @@ use crate::block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseF
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use euclid::Point2D;
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::{AdjoiningMargins, CollapsibleMargins};
|
||||
use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use euclid::Point2D;
|
||||
use std::cmp::{max, min};
|
||||
use std::ops::Range;
|
||||
use style::computed_values::align_content::T as AlignContent;
|
||||
|
@ -29,7 +30,6 @@ use style::servo::restyle_damage::ServoRestyleDamage;
|
|||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use style::values::computed::flex::FlexBasis;
|
||||
use style::values::generics::flex::FlexBasis as GenericFlexBasis;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
|
||||
/// The size of an axis. May be a specified size, a min/max
|
||||
/// constraint, or an unlimited size
|
||||
|
|
|
@ -30,18 +30,25 @@ use crate::block::{BlockFlow, FormattingContextType};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::display_list::items::ClippingAndScrolling;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::floats::{Floats, SpeculatedFloatPlacement};
|
||||
use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
|
||||
use crate::flow_ref::{FlowRef, WeakFlowRef};
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::StackingContextId;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::inline::InlineFlow;
|
||||
use crate::model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
|
||||
use crate::multicol::MulticolFlow;
|
||||
use crate::parallel::FlowParallelInfo;
|
||||
use crate::table::TableFlow;
|
||||
use crate::table_caption::TableCaptionFlow;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_colgroup::TableColGroupFlow;
|
||||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use gfx_traits::StackingContextId;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect};
|
||||
use std::fmt;
|
||||
|
@ -60,13 +67,6 @@ use style::properties::ComputedValues;
|
|||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use crate::table::TableFlow;
|
||||
use crate::table_caption::TableCaptionFlow;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_colgroup::TableColGroupFlow;
|
||||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use webrender_api::LayoutTransform;
|
||||
|
||||
/// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field
|
||||
|
|
|
@ -4,27 +4,30 @@
|
|||
|
||||
//! The `Fragment` type, which represents the leaves of the layout tree.
|
||||
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use canvas_traits::canvas::{CanvasMsg, CanvasId};
|
||||
use crate::ServoArc;
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::display_list::ToLayout;
|
||||
use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use crate::floats::ClearType;
|
||||
use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use gfx;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::{TextRun, TextRunSlice};
|
||||
use gfx_traits::StackingContextId;
|
||||
use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
|
||||
use crate::inline::{InlineMetrics, LineMetrics};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
#[cfg(debug_assertions)]
|
||||
use crate::layout_debug;
|
||||
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
|
||||
use crate::model::style_length;
|
||||
use crate::text;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use gfx;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::{TextRun, TextRunSlice};
|
||||
use gfx_traits::StackingContextId;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
|
@ -60,10 +63,7 @@ use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAu
|
|||
use style::values::computed::counters::ContentItem;
|
||||
use style::values::generics::box_::{Perspective, VerticalAlign};
|
||||
use style::values::generics::transform;
|
||||
use crate::text;
|
||||
use crate::text::TextRunScanner;
|
||||
use webrender_api::{self, LayoutTransform};
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
|
||||
// From gfxFontConstants.h in Firefox.
|
||||
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;
|
||||
|
|
|
@ -12,6 +12,8 @@ use crate::context::{LayoutContext, with_thread_local_font_context};
|
|||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::InorderFlowTraversal;
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use smallvec::SmallVec;
|
||||
use std::collections::{HashMap, LinkedList};
|
||||
|
@ -21,8 +23,6 @@ use style::properties::ComputedValues;
|
|||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::generics::counters::ContentItem;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::InorderFlowTraversal;
|
||||
|
||||
// Decimal styles per CSS-COUNTER-STYLES § 6.1:
|
||||
static DECIMAL: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
* 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::ServoArc;
|
||||
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 euclid::{Point2D, Size2D};
|
||||
use crate::floats::{FloatKind, Floats, PlacementInfo};
|
||||
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
|
||||
use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
|
||||
|
@ -17,10 +16,13 @@ use crate::flow_ref::FlowRef;
|
|||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::fragment::FragmentFlags;
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::layout_debug;
|
||||
use crate::model::IntrinsicISizesContribution;
|
||||
use crate::text;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use euclid::{Point2D, Size2D};
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use range::{Range, RangeIndex};
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use std::{fmt, i32, isize, mem};
|
||||
|
@ -39,8 +41,6 @@ use style::servo::restyle_damage::ServoRestyleDamage;
|
|||
use style::values::computed::box_::VerticalAlign;
|
||||
use style::values::generics::box_::VerticalAlign as GenericVerticalAlign;
|
||||
use style::values::specified::text::TextOverflowSide;
|
||||
use crate::text;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use unicode_bidi as bidi;
|
||||
|
||||
/// `Line`s are represented as offsets into the child list, rather than
|
||||
|
|
|
@ -10,13 +10,13 @@ use crate::block::BlockFlow;
|
|||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use euclid::Point2D;
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
|
||||
use crate::fragment::Overflow;
|
||||
use crate::generated_content;
|
||||
use crate::inline::InlineFlow;
|
||||
use euclid::Point2D;
|
||||
use style::computed_values::list_style_type::T as ListStyleType;
|
||||
use style::computed_values::position::T as Position;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
//! Borders, padding, and margins.
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::SideOffsets2D;
|
||||
use crate::fragment::Fragment;
|
||||
use euclid::SideOffsets2D;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, WritingMode};
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
|
||||
//! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/
|
||||
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use crate::ServoArc;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::cmp::{min, max};
|
||||
use std::fmt;
|
||||
|
|
|
@ -12,6 +12,8 @@ use crate::block::BlockFlow;
|
|||
use crate::context::LayoutContext;
|
||||
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 rayon;
|
||||
use servo_config::opts;
|
||||
|
@ -19,8 +21,6 @@ use smallvec::SmallVec;
|
|||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
|
||||
use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
|
||||
/// Traversal chunk size.
|
||||
const CHUNK_SIZE: usize = 16;
|
||||
|
|
|
@ -9,13 +9,15 @@ use crate::construct::ConstructionResult;
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::IndexableText;
|
||||
use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
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 ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
use script_layout_interface::StyleData;
|
||||
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};
|
||||
|
@ -25,7 +27,6 @@ use script_layout_interface::rpc::TextIndexResponse;
|
|||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use script_traits::LayoutMsg as ConstellationMsg;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use crate::sequential;
|
||||
use std::cmp::{min, max};
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -39,7 +40,6 @@ use style::properties::{style_structs, PropertyId, PropertyDeclarationId, Longha
|
|||
use style::selector_parser::PseudoElement;
|
||||
use style_traits::ToCss;
|
||||
use webrender_api::ExternalScrollId;
|
||||
use crate::wrapper::LayoutNodeLayoutData;
|
||||
|
||||
/// Mutable data belonging to the LayoutThread.
|
||||
///
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
use app_units::Au;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use crate::floats::SpeculatedFloatPlacement;
|
||||
use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
|
||||
use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem};
|
||||
use crate::generated_content::ResolveGeneratedContent;
|
||||
use crate::incremental::RelayoutMode;
|
||||
use servo_config::opts;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
|
||||
use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use servo_config::opts;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use webrender_api::LayoutPoint;
|
||||
|
||||
pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext) {
|
||||
|
|
|
@ -10,13 +10,17 @@ use crate::block::{ISizeConstraintInput, ISizeConstraintSolution};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow_list::{FlowListIterator, MutFlowListIterator};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::layout_debug;
|
||||
use crate::model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
|
||||
use crate::table_row::{TableRowFlow, TableRowSizeData};
|
||||
use crate::table_wrapper::TableLayout;
|
||||
use euclid::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::{cmp, fmt};
|
||||
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
||||
use style::context::SharedStyleContext;
|
||||
|
@ -26,10 +30,6 @@ use style::properties::style_structs::Background;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
|
||||
use crate::table_row::{TableRowFlow, TableRowSizeData};
|
||||
use crate::table_wrapper::TableLayout;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for TableFlow {}
|
||||
|
|
|
@ -9,9 +9,9 @@ use crate::block::BlockFlow;
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use euclid::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
|
|
|
@ -9,12 +9,14 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::layout_debug;
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table::InternalTable;
|
||||
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
|
@ -22,8 +24,6 @@ use style::properties::ComputedValues;
|
|||
use style::values::computed::Color;
|
||||
use style::values::generics::box_::VerticalAlign;
|
||||
use style::values::specified::BorderStyle;
|
||||
use crate::table::InternalTable;
|
||||
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for TableCellFlow {}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
use app_units::Au;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use euclid::Point2D;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
|
|
|
@ -9,13 +9,15 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow_list::MutFlowListIterator;
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::layout_debug;
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
use euclid::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::cmp::max;
|
||||
use std::fmt;
|
||||
|
@ -26,8 +28,6 @@ use style::computed_values::border_top_style::T as BorderStyle;
|
|||
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Color, LengthOrPercentageOrAuto};
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for TableRowFlow {}
|
||||
|
|
|
@ -9,18 +9,18 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::layout_debug;
|
||||
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
use euclid::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::fmt;
|
||||
use std::iter::{IntoIterator, Iterator, Peekable};
|
||||
use style::computed_values::{border_collapse, border_spacing};
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for TableRowGroupFlow {}
|
||||
|
|
|
@ -17,12 +17,13 @@ use crate::block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
|
|||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use euclid::Point2D;
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
use euclid::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use std::ops::Add;
|
||||
|
@ -32,7 +33,6 @@ use style::logical_geometry::{LogicalRect, LogicalSize};
|
|||
use style::properties::ComputedValues;
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub enum TableLayout {
|
||||
|
|
|
@ -8,12 +8,12 @@ use app_units::Au;
|
|||
use crate::context::LayoutFontContext;
|
||||
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::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::TextRun;
|
||||
use gfx::text::util::{self, CompressionMode};
|
||||
use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
|
||||
use crate::linked_list::split_off_head;
|
||||
use ordered_float::NotNan;
|
||||
use range::Range;
|
||||
use servo_atoms::Atom;
|
||||
|
|
|
@ -8,6 +8,8 @@ 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::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use servo_config::opts;
|
||||
use style::context::{SharedStyleContext, StyleContext};
|
||||
|
@ -17,8 +19,6 @@ use style::selector_parser::RestyleDamage;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::traversal::{DomTraversal, recalc_style_at};
|
||||
use style::traversal::PerLevelTraversalData;
|
||||
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
|
||||
pub struct RecalcStyleAndConstructFlows<'a> {
|
||||
context: LayoutContext<'a>,
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
use crate::blob_loader::load_blob_sync;
|
||||
use crate::data_loader::decode;
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
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::{set_default_accept, set_default_accept_language};
|
||||
use crate::subresource_integrity::is_response_integrity_valid;
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
use headers_core::HeaderMapExt;
|
||||
use headers_ext::{AccessControlExposeHeaders, ContentType, Range};
|
||||
use http::header::{self, HeaderMap, HeaderName, HeaderValue};
|
||||
|
@ -32,7 +33,6 @@ use std::str;
|
|||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::thread;
|
||||
use crate::subresource_integrity::is_response_integrity_valid;
|
||||
|
||||
lazy_static! {
|
||||
static ref X_CONTENT_TYPE_OPTIONS: HeaderName =
|
||||
|
|
|
@ -7,14 +7,15 @@ use bytes::Bytes;
|
|||
use crate::connector::{BUF_SIZE, Connector, create_http_client, WrappedBody};
|
||||
use crate::cookie;
|
||||
use crate::cookie_storage::CookieStorage;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
|
||||
use devtools_traits::{HttpResponse as DevtoolsHttpResponse, NetworkEvent};
|
||||
use crate::fetch::cors_cache::CorsCache;
|
||||
use crate::fetch::methods::{Data, DoneChannel, FetchContext, Target};
|
||||
use crate::fetch::methods::{is_cors_safelisted_request_header, is_cors_safelisted_method, main_fetch};
|
||||
use flate2::read::{DeflateDecoder, GzDecoder};
|
||||
use crate::hsts::HstsList;
|
||||
use crate::http_cache::HttpCache;
|
||||
use crate::resource_thread::AuthCache;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
|
||||
use devtools_traits::{HttpResponse as DevtoolsHttpResponse, NetworkEvent};
|
||||
use flate2::read::{DeflateDecoder, GzDecoder};
|
||||
use headers_core::HeaderMapExt;
|
||||
use headers_ext::{AccessControlAllowCredentials, AccessControlAllowHeaders};
|
||||
use headers_ext::{AccessControlAllowMethods, AccessControlRequestHeaders, AccessControlRequestMethod, Authorization};
|
||||
|
@ -36,7 +37,6 @@ use net_traits::request::{RedirectMode, Referrer, Request, RequestMode};
|
|||
use net_traits::request::{ResponseTainting, ServiceWorkersMode};
|
||||
use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType};
|
||||
use openssl::ssl::SslConnectorBuilder;
|
||||
use crate::resource_thread::AuthCache;
|
||||
use servo_channel::{channel, Sender};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
|
|
@ -7,15 +7,17 @@ use crate::connector::{create_http_client, create_ssl_connector_builder};
|
|||
use crate::cookie;
|
||||
use crate::cookie_rs;
|
||||
use crate::cookie_storage::CookieStorage;
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
use embedder_traits::EmbedderProxy;
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use crate::fetch::cors_cache::CorsCache;
|
||||
use crate::fetch::methods::{CancellationListener, FetchContext, fetch};
|
||||
use crate::filemanager_thread::FileManager;
|
||||
use crate::hsts::HstsList;
|
||||
use crate::http_cache::HttpCache;
|
||||
use crate::http_loader::{HANDLE, HttpState, http_redirect_fetch};
|
||||
use crate::storage_thread::StorageThreadFactory;
|
||||
use crate::websocket_loader;
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
use embedder_traits::EmbedderProxy;
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcReceiverSet, IpcSender};
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
|
@ -44,8 +46,6 @@ use std::ops::Deref;
|
|||
use std::path::{Path, PathBuf};
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
use std::thread;
|
||||
use crate::storage_thread::StorageThreadFactory;
|
||||
use crate::websocket_loader;
|
||||
|
||||
/// Returns a tuple of (public, private) senders to the new threads.
|
||||
pub fn new_resource_threads(
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::resource_thread;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
|
||||
use crate::resource_thread;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::BTreeMap;
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::{DEFAULT_USER_AGENT, new_fetch_context, create_embedder_proxy, fetch, make_server, make_ssl_server};
|
||||
use devtools_traits::HttpRequest as DevtoolsHttpRequest;
|
||||
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
|
||||
use crate::fetch_with_context;
|
||||
use crate::fetch_with_cors_cache;
|
||||
use crate::http_loader::{expect_devtools_http_request, expect_devtools_http_response};
|
||||
use devtools_traits::HttpRequest as DevtoolsHttpRequest;
|
||||
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
|
||||
use headers_core::HeaderMapExt;
|
||||
use headers_ext::{AccessControlAllowCredentials, AccessControlAllowHeaders, AccessControlAllowOrigin};
|
||||
use headers_ext::{AccessControlAllowMethods, AccessControlMaxAge};
|
||||
|
@ -14,7 +15,6 @@ use headers_ext::{CacheControl, ContentLength, ContentType, Expires, Host, LastM
|
|||
use http::{Method, StatusCode};
|
||||
use http::header::{self, HeaderMap, HeaderName, HeaderValue};
|
||||
use http::uri::Authority;
|
||||
use crate::http_loader::{expect_devtools_http_request, expect_devtools_http_response};
|
||||
use hyper::{Request as HyperRequest, Response as HyperResponse};
|
||||
use hyper::body::Body;
|
||||
use mime::{self, Mime};
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::cookie_rs::Cookie as CookiePair;
|
||||
use crate::fetch;
|
||||
use crate::fetch_with_context;
|
||||
use crate::make_server;
|
||||
use crate::new_fetch_context;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent};
|
||||
use devtools_traits::HttpRequest as DevtoolsHttpRequest;
|
||||
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
|
||||
use crate::fetch;
|
||||
use crate::fetch_with_context;
|
||||
use flate2::Compression;
|
||||
use flate2::write::{DeflateEncoder, GzEncoder};
|
||||
use futures::{self, Future, Stream};
|
||||
|
@ -19,7 +21,6 @@ use http::header::{self, HeaderMap, HeaderValue};
|
|||
use http::uri::Authority;
|
||||
use hyper::{Request as HyperRequest, Response as HyperResponse};
|
||||
use hyper::body::Body;
|
||||
use crate::make_server;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use net::cookie::Cookie;
|
||||
use net::cookie_storage::CookieStorage;
|
||||
|
@ -28,7 +29,6 @@ use net::test::replace_host_table;
|
|||
use net_traits::{CookieSource, NetworkError};
|
||||
use net_traits::request::{Request, RequestInit, RequestMode, CredentialsMode, Destination};
|
||||
use net_traits::response::ResponseBody;
|
||||
use crate::new_fetch_context;
|
||||
use servo_channel::{channel, Receiver};
|
||||
use servo_url::{ServoUrl, ImmutableOrigin};
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
use crate::connector::create_ssl_connector_builder;
|
||||
use crate::cookie::Cookie;
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use crate::fetch::methods::should_be_blocked_due_to_bad_port;
|
||||
use headers_ext::Host;
|
||||
use crate::hosts::replace_host;
|
||||
use crate::http_loader::HttpState;
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use headers_ext::Host;
|
||||
use http::header::{self, HeaderMap, HeaderName, HeaderValue};
|
||||
use http::uri::Authority;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* 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 ipc_channel::ipc::IpcSharedMemory;
|
||||
use crate::piston_image::{self, DynamicImage, ImageFormat};
|
||||
use ipc_channel::ipc::IpcSharedMemory;
|
||||
use pixels;
|
||||
use std::fmt;
|
||||
use webrender_api;
|
||||
|
|
|
@ -36,6 +36,9 @@ extern crate webrender_api;
|
|||
|
||||
use crate::cookie_rs::Cookie;
|
||||
use crate::filemanager_thread::FileManagerThreadMsg;
|
||||
use crate::request::{Request, RequestInit};
|
||||
use crate::response::{HttpsState, Response, ResponseInit};
|
||||
use crate::storage_thread::StorageThreadMsg;
|
||||
use headers_core::HeaderMapExt;
|
||||
use headers_ext::{ContentType, ReferrerPolicy as ReferrerPolicyHeader};
|
||||
use http::{Error as HttpError, HeaderMap};
|
||||
|
@ -47,11 +50,8 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
|||
use ipc_channel::router::ROUTER;
|
||||
use mime::Mime;
|
||||
use msg::constellation_msg::HistoryStateId;
|
||||
use crate::request::{Request, RequestInit};
|
||||
use crate::response::{HttpsState, Response, ResponseInit};
|
||||
use servo_url::ServoUrl;
|
||||
use std::error::Error;
|
||||
use crate::storage_thread::StorageThreadMsg;
|
||||
use url::percent_encoding;
|
||||
|
||||
pub mod blob_url_store;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
//! Memory profiling functions.
|
||||
|
||||
use crate::time::duration_from_seconds;
|
||||
use ipc_channel::ipc::{self, IpcReceiver};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use profile_traits::mem::{ProfilerChan, ProfilerMsg, ReportKind, Reporter, ReporterRequest};
|
||||
|
@ -13,7 +14,6 @@ use std::cmp::Ordering;
|
|||
use std::collections::HashMap;
|
||||
use std::thread;
|
||||
use std::time::Instant;
|
||||
use crate::time::duration_from_seconds;
|
||||
|
||||
pub struct Profiler {
|
||||
/// The port through which messages are received.
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
//! Timing functions.
|
||||
|
||||
use crate::heartbeats;
|
||||
use crate::std_time::precise_time_ns;
|
||||
use crate::trace_dump::TraceDump;
|
||||
use influent::client::{Client, Credentials};
|
||||
use influent::create_client;
|
||||
use influent::measurement::{Measurement, Value};
|
||||
|
@ -22,8 +24,6 @@ use std::fs::File;
|
|||
use std::io::{self, Write};
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
use crate::std_time::precise_time_ns;
|
||||
use crate::trace_dump::TraceDump;
|
||||
use tokio;
|
||||
use tokio::prelude::Future;
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bincode;
|
||||
use ipc_channel::ipc;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::io::Error;
|
||||
use crate::time;
|
||||
use crate::time::ProfilerCategory;
|
||||
use crate::time::ProfilerChan;
|
||||
use ipc_channel::ipc;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::io::Error;
|
||||
|
||||
pub struct IpcReceiver<T>
|
||||
where
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
* 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 devtools_traits::{AutoMargins, CachedConsoleMessage, CachedConsoleMessageTypes};
|
||||
use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError};
|
||||
use devtools_traits::{EvaluateJSReply, Modification, NodeInfo, TimelineMarker};
|
||||
use devtools_traits::TimelineMarkerType;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
||||
|
@ -21,12 +17,16 @@ use crate::dom::element::Element;
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::node::{Node, window_from_node};
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_thread::Documents;
|
||||
use devtools_traits::{AutoMargins, CachedConsoleMessage, CachedConsoleMessageTypes};
|
||||
use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError};
|
||||
use devtools_traits::{EvaluateJSReply, Modification, NodeInfo, TimelineMarker};
|
||||
use devtools_traits::TimelineMarkerType;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::wrappers::ObjectClassName;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use crate::script_thread::Documents;
|
||||
use std::ffi::CStr;
|
||||
use std::str;
|
||||
use style::properties::longhands::{margin_bottom, margin_left, margin_right, margin_top};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 devtools_traits::DevtoolScriptControlMsg;
|
||||
use crate::dom::abstractworker::WorkerScriptMsg;
|
||||
use crate::dom::bindings::conversions::DerivedFrom;
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
|
@ -11,8 +10,9 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::worker::TrustedWorkerAddress;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::script_runtime::{ScriptChan, CommonScriptMsg, ScriptPort};
|
||||
use servo_channel::{Receiver, Sender};
|
||||
use crate::task_queue::{QueuedTaskConversion, TaskQueue};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use servo_channel::{Receiver, Sender};
|
||||
|
||||
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
|
||||
/// common event loop messages. While this SendableWorkerScriptChan is alive, the associated
|
||||
|
|
|
@ -13,6 +13,7 @@ use crate::dom::bindings::refcounted::Trusted;
|
|||
use crate::dom::bindings::reflector::reflect_dom_object;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::window::Window;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::{self, IpcReceiver};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -21,7 +22,6 @@ use js::typedarray::{Float32Array, Uint8Array};
|
|||
use servo_media::audio::analyser_node::AnalysisEngine;
|
||||
use servo_media::audio::block::Block;
|
||||
use servo_media::audio::node::AudioNodeInit;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct AnalyserNode {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 devtools_traits::AttrInfo;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
|
@ -15,9 +14,10 @@ use crate::dom::mutationobserver::{Mutation, MutationObserver};
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::vtable_for;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{Prefix, LocalName, Namespace};
|
||||
use crate::script_thread::ScriptThread;
|
||||
use servo_atoms::Atom;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Ref;
|
||||
|
|
|
@ -16,10 +16,10 @@ use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::window::Window;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions};
|
||||
use std::rc::Rc;
|
||||
use crate::task_source::TaskSource;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct AudioContext {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::dom::audionode::{AudioNode, UnwrappedAudioNodeOptions};
|
||||
use crate::dom::baseaudiocontext::BaseAudioContext;
|
||||
use crate::dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
|
||||
|
@ -9,11 +10,11 @@ use crate::dom::bindings::inheritance::Castable;
|
|||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use dom_struct::dom_struct;
|
||||
use servo_media::audio::node::{AudioNodeMessage, AudioNodeInit, AudioScheduledSourceNodeMessage};
|
||||
use servo_media::audio::node::OnEndedCallback;
|
||||
use std::cell::Cell;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct AudioScheduledSourceNode {
|
||||
|
|
|
@ -38,6 +38,7 @@ use crate::dom::oscillatornode::OscillatorNode;
|
|||
use crate::dom::pannernode::PannerNode;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::window::Window;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use dom_struct::dom_struct;
|
||||
use js::rust::CustomAutoRooterGuard;
|
||||
use js::typedarray::ArrayBuffer;
|
||||
|
@ -51,7 +52,6 @@ use std::collections::{HashMap, VecDeque};
|
|||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#[cfg(feature = "js_backtrace")]
|
||||
use backtrace::Backtrace;
|
||||
#[cfg(feature = "js_backtrace")]
|
||||
use dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
|
||||
use crate::dom::bindings::codegen::PrototypeList::proto_id_to_name;
|
||||
use crate::dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
|
||||
|
|
|
@ -76,6 +76,7 @@ use crate::dom::customelementregistry::ConstructionStackEntry;
|
|||
use crate::dom::element::{CustomElementState, Element, ElementCreator};
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use html5ever::LocalName;
|
||||
use html5ever::interface::QualName;
|
||||
use js::glue::UnwrapObject;
|
||||
|
@ -83,7 +84,6 @@ use js::jsapi::{CallArgs, CurrentGlobalOrNull};
|
|||
use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
|
||||
use js::rust::HandleObject;
|
||||
use js::rust::MutableHandleObject;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use std::ptr;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#htmlconstructor
|
||||
|
|
|
@ -28,6 +28,7 @@ use crate::dom::bindings::reflector::{DomObject, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::trace::trace_reflector;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::task::TaskOnce;
|
||||
use js::jsapi::JSTracer;
|
||||
use libc;
|
||||
use std::cell::RefCell;
|
||||
|
@ -37,7 +38,6 @@ use std::hash::Hash;
|
|||
use std::marker::PhantomData;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Weak};
|
||||
use crate::task::TaskOnce;
|
||||
|
||||
#[allow(missing_docs)] // FIXME
|
||||
mod dummy {
|
||||
|
|
|
@ -37,8 +37,6 @@ use canvas_traits::webgl::{WebGLContextShareMode, WebGLError, WebGLFramebufferId
|
|||
use canvas_traits::webgl::{WebGLPipeline, WebGLProgramId, WebGLReceiver, WebGLRenderbufferId};
|
||||
use canvas_traits::webgl::{WebGLSLVersion, WebGLSender, WebGLShaderId, WebGLTextureId};
|
||||
use canvas_traits::webgl::{WebGLVersion, WebGLVertexArrayId};
|
||||
use cssparser::RGBA;
|
||||
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::error::Error;
|
||||
use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||
|
@ -49,6 +47,8 @@ use crate::dom::bindings::utils::WindowProxyHandler;
|
|||
use crate::dom::document::PendingRestyle;
|
||||
use crate::dom::htmlimageelement::SourceSet;
|
||||
use crate::dom::htmlmediaelement::MediaFrameRenderer;
|
||||
use cssparser::RGBA;
|
||||
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
|
||||
use encoding_rs::{Decoder, Encoding};
|
||||
use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, TypedScale};
|
||||
use euclid::Length as EuclidLength;
|
||||
|
|
|
@ -8,8 +8,9 @@ use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
|||
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
|
||||
use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit, BluetoothLEScanFilterInit};
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit};
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions};
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothBinding::BluetoothLEScanFilterInit;
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionDescriptor;
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding::
|
||||
BluetoothRemoteGATTServerMethods;
|
||||
|
@ -28,6 +29,7 @@ use crate::dom::eventtarget::EventTarget;
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::permissions::{get_descriptor_permission_state, PermissionAlgorithm};
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::task::TaskOnce;
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -40,7 +42,6 @@ use std::collections::HashMap;
|
|||
use std::rc::Rc;
|
||||
use std::str::FromStr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use crate::task::TaskOnce;
|
||||
|
||||
const KEY_CONVERSION_ERROR: &'static str =
|
||||
"This `manufacturerData` key can not be parsed as unsigned short:";
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use canvas_traits::canvas::{CanvasGradientStop, FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle};
|
||||
use cssparser::{Parser, ParserInput, RGBA};
|
||||
use cssparser::Color as CSSColor;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods;
|
||||
|
@ -14,6 +12,8 @@ use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use cssparser::{Parser, ParserInput, RGBA};
|
||||
use cssparser::Color as CSSColor;
|
||||
use dom_struct::dom_struct;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#canvasgradient
|
||||
|
|
|
@ -6,8 +6,6 @@ use canvas_traits::canvas::{Canvas2dMsg, CanvasMsg, CanvasId};
|
|||
use canvas_traits::canvas::{CompositionOrBlending, FillOrStrokeStyle, FillRule};
|
||||
use canvas_traits::canvas::{LineCapStyle, LineJoinStyle, LinearGradientStyle};
|
||||
use canvas_traits::canvas::{RadialGradientStyle, RepetitionStyle};
|
||||
use cssparser::{Parser, ParserInput, RGBA};
|
||||
use cssparser::Color as CSSColor;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule;
|
||||
|
@ -30,6 +28,9 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement};
|
||||
use crate::dom::imagedata::ImageData;
|
||||
use crate::dom::node::{Node, NodeDamage, window_from_node};
|
||||
use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
|
||||
use cssparser::{Parser, ParserInput, RGBA};
|
||||
use cssparser::Color as CSSColor;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Transform2D, Point2D, Rect, Size2D, vec2};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
@ -48,7 +49,6 @@ use std::{fmt, mem};
|
|||
use std::cell::Cell;
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
|
||||
|
||||
#[must_root]
|
||||
#[derive(Clone, JSTraceable, MallocSizeOf)]
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* 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 devtools_traits::{ConsoleMessage, LogLevel, ScriptToDevtoolsControlMsg};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use devtools_traits::{ConsoleMessage, LogLevel, ScriptToDevtoolsControlMsg};
|
||||
use std::io;
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Console
|
||||
|
|
|
@ -78,9 +78,9 @@ use crate::dom::htmlulistelement::HTMLUListElement;
|
|||
use crate::dom::htmlunknownelement::HTMLUnknownElement;
|
||||
use crate::dom::htmlvideoelement::HTMLVideoElement;
|
||||
use crate::dom::svgsvgelement::SVGSVGElement;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use html5ever::{LocalName, Prefix, QualName};
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use servo_config::prefs::PREFS;
|
||||
|
||||
fn create_svg_element(
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::{Parser, ParserInput, serialize_identifier};
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::Reflector;
|
||||
|
@ -10,6 +9,7 @@ use crate::dom::bindings::root::DomRoot;
|
|||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::window::Window;
|
||||
use crate::dom::worklet::Worklet;
|
||||
use cssparser::{Parser, ParserInput, serialize_identifier};
|
||||
use dom_struct::dom_struct;
|
||||
use style::context::QuirksMode;
|
||||
use style::parser::ParserContext;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::{Parser, ParserInput};
|
||||
use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods;
|
||||
use crate::dom::bindings::error::ErrorResult;
|
||||
|
@ -15,6 +14,7 @@ use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
|
|||
use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::window::Window;
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::{Parser, ParserInput};
|
||||
use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||
|
@ -14,6 +13,7 @@ use crate::dom::cssrule::SpecificCSSRule;
|
|||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::medialist::MediaList;
|
||||
use crate::dom::window::Window;
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::media_queries::MediaList as StyleMediaList;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* 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 cssparser::{Parser as CssParser, ParserInput as CssParserInput};
|
||||
use cssparser::ToCss;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMethods};
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
|
@ -14,6 +12,8 @@ use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
|
|||
use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
||||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::window::Window;
|
||||
use cssparser::{Parser as CssParser, ParserInput as CssParserInput};
|
||||
use cssparser::ToCss;
|
||||
use dom_struct::dom_struct;
|
||||
use selectors::parser::SelectorList;
|
||||
use servo_arc::Arc;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* 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 cssparser::Parser;
|
||||
use cssparser::ParserInput;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::Wrap;
|
||||
use crate::dom::bindings::reflector::Reflector;
|
||||
|
@ -11,6 +9,8 @@ use crate::dom::bindings::reflector::reflect_dom_object;
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use cssparser::Parser;
|
||||
use cssparser::ParserInput;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::{Parser, ParserInput};
|
||||
use crate::dom::bindings::codegen::Bindings::CSSSupportsRuleBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
|
||||
|
@ -12,6 +11,7 @@ use crate::dom::cssconditionrule::CSSConditionRule;
|
|||
use crate::dom::cssrule::SpecificCSSRule;
|
||||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::window::Window;
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::parser::ParserContext;
|
||||
|
|
|
@ -25,6 +25,8 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::node::{document_from_node, Node, window_from_node};
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::window::Window;
|
||||
use crate::microtask::Microtask;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Namespace, Prefix};
|
||||
use js::conversions::ToJSValConvertible;
|
||||
|
@ -34,8 +36,6 @@ use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
|
|||
use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue};
|
||||
use js::rust::{HandleObject, HandleValue, MutableHandleValue};
|
||||
use js::rust::wrappers::{JS_GetProperty, Construct1, JS_SameValue};
|
||||
use crate::microtask::Microtask;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use std::cell::Cell;
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use std::mem;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::devtools;
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};
|
||||
use crate::dom::abstractworkerglobalscope::{SendableWorkerScriptChan, WorkerThreadWorkerChan};
|
||||
use crate::dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
|
||||
|
@ -23,6 +22,11 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::messageevent::MessageEvent;
|
||||
use crate::dom::worker::{TrustedWorkerAddress, Worker};
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, new_rt_and_cx, Runtime};
|
||||
use crate::script_runtime::ScriptThreadEventCategory::WorkerEvent;
|
||||
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
|
||||
use crate::task_source::TaskSourceName;
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -33,8 +37,6 @@ use js::rust::HandleValue;
|
|||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
use net_traits::{IpcSend, load_whole_resource};
|
||||
use net_traits::request::{CredentialsMode, Destination, RequestInit};
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, new_rt_and_cx, Runtime};
|
||||
use crate::script_runtime::ScriptThreadEventCategory::WorkerEvent;
|
||||
use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
|
||||
use servo_channel::{channel, route_ipc_receiver_to_new_servo_sender, Sender, Receiver};
|
||||
use servo_rand::random;
|
||||
|
@ -44,8 +46,6 @@ use std::sync::Arc;
|
|||
use std::sync::atomic::AtomicBool;
|
||||
use std::thread;
|
||||
use style::thread_state::{self, ThreadState};
|
||||
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
|
||||
use crate::task_source::TaskSourceName;
|
||||
|
||||
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
|
||||
/// value for the duration of this object's lifetime. This ensures that the related Worker
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::cookie_rs;
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use crate::document_loader::{DocumentLoader, LoadType};
|
||||
use crate::dom::activation::{ActivationSource, synthetic_click_activation};
|
||||
use crate::dom::attr::Attr;
|
||||
|
@ -12,7 +11,8 @@ use crate::dom::bindings::callback::ExceptionHandling;
|
|||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState, ElementCreationOptions};
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::ElementCreationOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
|
@ -89,11 +89,16 @@ use crate::dom::virtualmethods::vtable_for;
|
|||
use crate::dom::webglcontextevent::WebGLContextEvent;
|
||||
use crate::dom::window::{ReflowReason, Window};
|
||||
use crate::dom::windowproxy::WindowProxy;
|
||||
use crate::fetch::FetchCanceller;
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
||||
use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crate::timers::OneshotTimerCallback;
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use euclid::Point2D;
|
||||
use crate::fetch::FetchCanceller;
|
||||
use html5ever::{LocalName, Namespace, QualName};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
@ -114,8 +119,6 @@ use profile_traits::ipc as profile_ipc;
|
|||
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use ref_slice::ref_slice;
|
||||
use script_layout_interface::message::{Msg, NodesFromPointQueryType, QueryMsg, ReflowGoal};
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
||||
use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
|
||||
use script_traits::{AnimationState, DocumentActivity, MouseButton, MouseEventType};
|
||||
use script_traits::{MsDuration, ScriptMsg, TouchEventType, TouchId, UntrustedNodeAddress};
|
||||
use servo_arc::Arc;
|
||||
|
@ -141,9 +144,7 @@ use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuar
|
|||
use style::str::{split_html_space_chars, str_join};
|
||||
use style::stylesheet_set::DocumentStylesheetSet;
|
||||
use style::stylesheets::{CssRule, Stylesheet, Origin, OriginSet};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use time;
|
||||
use crate::timers::OneshotTimerCallback;
|
||||
use url::Host;
|
||||
use url::percent_encoding::percent_decode;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
//! Element nodes.
|
||||
|
||||
use devtools_traits::AttrInfo;
|
||||
use crate::dom::activation::Activatable;
|
||||
use crate::dom::attr::{Attr, AttrHelpersForLayout};
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
|
@ -75,6 +74,10 @@ use crate::dom::text::Text;
|
|||
use crate::dom::validation::Validatable;
|
||||
use crate::dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
use crate::dom::window::ReflowReason;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use crate::stylesheet_loader::StylesheetOwner;
|
||||
use crate::task::TaskOnce;
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{Prefix, LocalName, Namespace, QualName};
|
||||
use html5ever::serialize;
|
||||
|
@ -87,7 +90,6 @@ use msg::constellation_msg::InputMethodType;
|
|||
use net_traits::request::CorsSettings;
|
||||
use ref_filter_map::ref_filter_map;
|
||||
use script_layout_interface::message::ReflowGoal;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use selectors::Element as SelectorsElement;
|
||||
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext};
|
||||
|
@ -119,8 +121,6 @@ use style::shared_lock::{SharedRwLock, Locked};
|
|||
use style::thread_state;
|
||||
use style::values::{CSSFloat, Either};
|
||||
use style::values::{specified, computed};
|
||||
use crate::stylesheet_loader::StylesheetOwner;
|
||||
use crate::task::TaskOnce;
|
||||
use xml5ever::serialize as xmlSerialize;
|
||||
use xml5ever::serialize::SerializeOpts as XmlSerializeOpts;
|
||||
use xml5ever::serialize::TraversalScope as XmlTraversalScope;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 devtools_traits::{TimelineMarker, TimelineMarkerType};
|
||||
use crate::dom::bindings::callback::ExceptionHandling;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::EventBinding;
|
||||
|
@ -19,11 +18,12 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::vtable_for;
|
||||
use crate::dom::window::Window;
|
||||
use crate::task::TaskOnce;
|
||||
use devtools_traits::{TimelineMarker, TimelineMarkerType};
|
||||
use dom_struct::dom_struct;
|
||||
use servo_atoms::Atom;
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
use crate::task::TaskOnce;
|
||||
use time;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -14,9 +14,12 @@ use crate::dom::event::Event;
|
|||
use crate::dom::eventtarget::EventTarget;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::messageevent::MessageEvent;
|
||||
use crate::fetch::FetchCanceller;
|
||||
use crate::network_listener::{NetworkListener, PreInvoke};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crate::timers::OneshotTimerCallback;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Length;
|
||||
use crate::fetch::FetchCanceller;
|
||||
use headers_ext::ContentType;
|
||||
use http::header::{self, HeaderName, HeaderValue};
|
||||
use ipc_channel::ipc;
|
||||
|
@ -29,15 +32,12 @@ use net_traits::{CoreResourceMsg, FetchChannels, FetchMetadata};
|
|||
use net_traits::{FetchResponseMsg, FetchResponseListener, NetworkError};
|
||||
use net_traits::request::{CacheMode, CorsSettings, CredentialsMode};
|
||||
use net_traits::request::{RequestInit, RequestMode};
|
||||
use crate::network_listener::{NetworkListener, PreInvoke};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::str::{Chars, FromStr};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crate::timers::OneshotTimerCallback;
|
||||
use utf8;
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ use crate::dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use crate::dom::eventtarget::EventTarget;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::progressevent::ProgressEvent;
|
||||
use crate::task::TaskCanceller;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crate::task_source::file_reading::{FileReadingTask, FileReadingTaskSource};
|
||||
use dom_struct::dom_struct;
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use js::jsapi::Heap;
|
||||
|
@ -34,9 +37,6 @@ use std::cell::Cell;
|
|||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use std::thread;
|
||||
use crate::task::TaskCanceller;
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crate::task_source::file_reading::{FileReadingTask, FileReadingTaskSource};
|
||||
|
||||
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
|
||||
pub enum FileReaderFunction {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::EventSourceBinding::EventSourceBinding::EventSourceMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
|
@ -25,6 +24,20 @@ use crate::dom::performance::Performance;
|
|||
use crate::dom::window::Window;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::dom::workletglobalscope::WorkletGlobalScope;
|
||||
use crate::microtask::{Microtask, MicrotaskQueue};
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
|
||||
use crate::script_thread::{MainThreadScriptChan, ScriptThread};
|
||||
use crate::task::TaskCanceller;
|
||||
use crate::task_source::TaskSourceName;
|
||||
use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
|
||||
use crate::task_source::file_reading::FileReadingTaskSource;
|
||||
use crate::task_source::networking::NetworkingTaskSource;
|
||||
use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
|
||||
use crate::task_source::remote_event::RemoteEventTaskSource;
|
||||
use crate::task_source::websocket::WebsocketTaskSource;
|
||||
use crate::timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
|
||||
use crate::timers::{OneshotTimers, TimerCallback};
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
|
||||
|
@ -38,12 +51,9 @@ use js::rust::{CompileOptionsWrapper, Runtime, get_object_class};
|
|||
use js::rust::{HandleValue, MutableHandleValue};
|
||||
use js::rust::wrappers::Evaluate2;
|
||||
use libc;
|
||||
use crate::microtask::{Microtask, MicrotaskQueue};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::{CoreResourceThread, ResourceThreads, IpcSend};
|
||||
use profile_traits::{mem, time};
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
|
||||
use crate::script_thread::{MainThreadScriptChan, ScriptThread};
|
||||
use script_traits::{MsDuration, ScriptToConstellationChan, TimerEvent};
|
||||
use script_traits::{TimerEventId, TimerSchedulerMsg, TimerSource};
|
||||
use servo_url::{MutableOrigin, ServoUrl};
|
||||
|
@ -54,17 +64,7 @@ use std::ffi::CString;
|
|||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use crate::task::TaskCanceller;
|
||||
use crate::task_source::TaskSourceName;
|
||||
use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
|
||||
use crate::task_source::file_reading::FileReadingTaskSource;
|
||||
use crate::task_source::networking::NetworkingTaskSource;
|
||||
use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
|
||||
use crate::task_source::remote_event::RemoteEventTaskSource;
|
||||
use crate::task_source::websocket::WebsocketTaskSource;
|
||||
use time::{Timespec, get_time};
|
||||
use crate::timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
|
||||
use crate::timers::{OneshotTimers, TimerCallback};
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct AutoCloseWorker(Arc<AtomicBool>);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::RGBA;
|
||||
use crate::dom::attr::Attr;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
|
@ -15,6 +14,7 @@ use crate::dom::eventtarget::EventTarget;
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::{Node, document_from_node, window_from_node};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
|
|
|
@ -14,10 +14,10 @@ use crate::dom::eventtarget::EventTarget;
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::{Node, window_from_node};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use std::cell::Cell;
|
||||
use crate::task_source::TaskSource;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDetailsElement {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::RGBA;
|
||||
use crate::dom::attr::Attr;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods;
|
||||
|
@ -14,6 +13,7 @@ use crate::dom::element::{Element, RawLayoutElementHelpers};
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use servo_atoms::Atom;
|
||||
|
|
|
@ -42,6 +42,8 @@ use crate::dom::node::{document_from_node, window_from_node};
|
|||
use crate::dom::validitystate::ValidationFlags;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_thread::MainThreadScriptMsg;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use headers_core::HeaderMapExt;
|
||||
|
@ -49,7 +51,6 @@ use headers_ext::ContentType;
|
|||
use html5ever::{LocalName, Prefix};
|
||||
use hyper::Method;
|
||||
use mime::{self, Mime};
|
||||
use crate::script_thread::MainThreadScriptMsg;
|
||||
use net_traits::http_percent_encode;
|
||||
use script_traits::LoadData;
|
||||
use servo_rand::random;
|
||||
|
@ -57,7 +58,6 @@ use std::borrow::ToOwned;
|
|||
use std::cell::Cell;
|
||||
use style::attr::AttrValue;
|
||||
use style::str::split_html_space_chars;
|
||||
use crate::task_source::TaskSource;
|
||||
use url::UrlQuery;
|
||||
use url::form_urlencoded::Serializer;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* 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 cssparser::RGBA;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::root::{DomRoot, LayoutDom};
|
||||
|
@ -12,6 +11,7 @@ use crate::dom::element::{Element, RawLayoutElementHelpers};
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
|
|
@ -23,13 +23,14 @@ use crate::dom::node::{Node, NodeDamage, UnbindContext, document_from_node, wind
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::dom::window::ReflowReason;
|
||||
use crate::dom::windowproxy::WindowProxy;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
use profile_traits::ipc as ProfiledIpc;
|
||||
use script_layout_interface::message::ReflowGoal;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, UpdatePipelineIdReason};
|
||||
use script_traits::{NewLayoutInfo, ScriptMsg};
|
||||
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
|
@ -37,7 +38,6 @@ use servo_config::prefs::PREFS;
|
|||
use servo_url::ServoUrl;
|
||||
use std::cell::Cell;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use crate::task_source::TaskSource;
|
||||
|
||||
bitflags! {
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
|
|
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