mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
remove extern crate
(#30311)
* remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
a0cff6a085
commit
711dbbd4af
274 changed files with 415 additions and 429 deletions
|
@ -3,9 +3,10 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::sampler::{NativeStack, Sampler};
|
||||
use crossbeam_channel::{after, never, unbounded, Receiver, Sender};
|
||||
use crossbeam_channel::{after, never, select, unbounded, Receiver, Sender};
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::MonitoredComponentId;
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitor, BackgroundHangMonitorClone, BackgroundHangMonitorExitSignal,
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate crossbeam_channel;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
pub mod background_hang_monitor;
|
||||
mod sampler;
|
||||
#[cfg(all(
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
use background_hang_monitor::HangMonitorRegister;
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::ScriptHangAnnotation;
|
||||
|
@ -22,7 +19,7 @@ use std::sync::Mutex;
|
|||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
lazy_static! {
|
||||
lazy_static::lazy_static! {
|
||||
static ref SERIAL: Mutex<()> = Mutex::new(());
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
pub mod test;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use bluetooth_traits::blocklist::{uuid_is_blocklisted, Blocklist};
|
||||
use bluetooth_traits::scanfilter::{
|
||||
BluetoothScanfilter, BluetoothScanfilterSequence, RequestDeviceoptions,
|
||||
|
@ -20,6 +16,7 @@ use device::bluetooth::{BluetoothAdapter, BluetoothDevice, BluetoothGATTCharacte
|
|||
use device::bluetooth::{BluetoothGATTDescriptor, BluetoothGATTService};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use log::warn;
|
||||
use servo_config::pref;
|
||||
use servo_rand::{self, Rng};
|
||||
use std::borrow::ToOwned;
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
pub mod blocklist;
|
||||
pub mod scanfilter;
|
||||
|
||||
use crate::scanfilter::{BluetoothScanfilterSequence, RequestDeviceoptions};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum BluetoothError {
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
use std::collections::{HashMap, HashSet};
|
||||
use std::slice::Iter;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// A device name can never be longer than 29 bytes. An adv packet is at most
|
||||
// 31 bytes long. The length and identifier of the length field take 2 bytes.
|
||||
// That leaves 29 bytes for the name.
|
||||
|
|
|
@ -17,6 +17,7 @@ use gfx::font::FontHandleMethods;
|
|||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context::FontContext;
|
||||
use ipc_channel::ipc::{IpcSender, IpcSharedMemory};
|
||||
use log::{debug, error, warn};
|
||||
use num_traits::ToPrimitive;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -10,6 +10,7 @@ use euclid::default::Size2D;
|
|||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use log::warn;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::thread;
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
mod raqote_backend;
|
||||
|
||||
pub use webgl_mode::WebGLComm;
|
||||
|
|
|
@ -14,6 +14,7 @@ use cssparser::RGBA;
|
|||
use euclid::default::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use euclid::Angle;
|
||||
use font_kit::font::Font;
|
||||
use log::warn;
|
||||
use lyon_geom::Arc;
|
||||
use raqote::PathOp;
|
||||
use std::marker::PhantomData;
|
||||
|
|
|
@ -7,6 +7,7 @@ use canvas_traits::webgl::webgl_channel;
|
|||
use canvas_traits::webgl::{WebGLContextId, WebGLMsg, WebGLThreads};
|
||||
use euclid::default::Size2D;
|
||||
use fnv::FnvHashMap;
|
||||
use log::debug;
|
||||
use sparkle::gl::GlType;
|
||||
use std::default::Default;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::webgl_limits::GLLimitsDetect;
|
||||
use bitflags::bitflags;
|
||||
use byteorder::{ByteOrder, NativeEndian, WriteBytesExt};
|
||||
use canvas_traits::webgl;
|
||||
use canvas_traits::webgl::webgl_channel;
|
||||
|
@ -45,6 +46,7 @@ use canvas_traits::webgl::YAxisTreatment;
|
|||
use euclid::default::Size2D;
|
||||
use fnv::FnvHashMap;
|
||||
use half::f16;
|
||||
use log::{debug, error, trace, warn};
|
||||
use pixels::{self, PixelFormat};
|
||||
use sparkle::gl;
|
||||
use sparkle::gl::GLint;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
use cssparser::RGBA;
|
||||
use euclid::default::{Point2D, Rect, Size2D, Transform2D};
|
||||
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSender, IpcSharedMemory};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_bytes::ByteBuf;
|
||||
use std::default::Default;
|
||||
use std::str::FromStr;
|
||||
|
|
|
@ -10,13 +10,6 @@ use crate::canvas::CanvasId;
|
|||
use crossbeam_channel::Sender;
|
||||
use euclid::default::Size2D;
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
pub mod canvas;
|
||||
#[macro_use]
|
||||
pub mod webgl;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use euclid::default::{Rect, Size2D};
|
||||
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSharedMemory};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use pixels::PixelFormat;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sparkle::gl;
|
||||
|
@ -889,7 +890,7 @@ parameters! {
|
|||
macro_rules! gl_enums {
|
||||
($(pub enum $name:ident { $($variant:ident = $mod:ident::$constant:ident,)+ })*) => {
|
||||
$(
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, malloc_size_of_derive::MallocSizeOf)]
|
||||
#[derive(PartialEq, Serialize)]
|
||||
#[repr(u32)]
|
||||
pub enum $name { $($variant = $mod::$constant,)+ }
|
||||
|
|
|
@ -10,6 +10,7 @@ mod mpsc;
|
|||
use crate::webgl::WebGLMsg;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::opts;
|
||||
use std::fmt;
|
||||
|
|
|
@ -23,7 +23,7 @@ use gfx_traits::{Epoch, FontData};
|
|||
use image::{DynamicImage, ImageFormat};
|
||||
use ipc_channel::ipc;
|
||||
use libc::c_void;
|
||||
use log::warn;
|
||||
use log::{debug, error, info, warn};
|
||||
use msg::constellation_msg::{
|
||||
PipelineId, PipelineIndex, PipelineNamespaceId, TopLevelBrowsingContextId,
|
||||
};
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
pub use crate::compositor::IOCompositor;
|
||||
pub use crate::compositor::ShutdownState;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use self::TouchState::*;
|
||||
use euclid::{Point2D, Scale, Vector2D};
|
||||
use log::warn;
|
||||
use script_traits::{EventResult, TouchId};
|
||||
use style_traits::DevicePixel;
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
//! Communication with the compositor thread.
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
mod constellation_msg;
|
||||
|
||||
pub use constellation_msg::ConstellationMsg;
|
||||
|
@ -17,6 +14,7 @@ use embedder_traits::EventLoopWaker;
|
|||
use euclid::Rect;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::{PipelineId, TopLevelBrowsingContextId};
|
||||
use net_traits::image::base::Image;
|
||||
use script_traits::{
|
||||
|
|
|
@ -4,15 +4,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
pub mod pref_util;
|
||||
#[macro_use]
|
||||
pub mod prefs;
|
||||
|
||||
pub mod basedir;
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
use euclid::Size2D;
|
||||
use getopts::{Matches, Options};
|
||||
use lazy_static::lazy_static;
|
||||
use log::error;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_geometry::DeviceIndependentPixel;
|
||||
use servo_url::ServoUrl;
|
||||
use std::default::Default;
|
||||
|
@ -19,6 +22,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
|
|||
use std::sync::{RwLock, RwLockReadGuard};
|
||||
use url::{self, Url};
|
||||
|
||||
use crate::{pref, set_pref};
|
||||
|
||||
/// Global flags for Servo, currently set on the command line.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct Opts {
|
||||
|
|
|
@ -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 https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use lazy_static::lazy_static;
|
||||
use serde_json::{self, Value};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
|
@ -85,6 +86,7 @@ pub fn read_prefs_map(txt: &str) -> Result<HashMap<String, PrefValue>, PrefError
|
|||
}
|
||||
|
||||
mod gen {
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config_plugins::build_structs;
|
||||
|
||||
// The number of layout threads is calculated if it is not present in `prefs.json`.
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
use servo_config::basedir;
|
||||
use servo_config::pref_util::Preferences;
|
||||
use servo_config::prefs::{read_prefs_map, PrefValue};
|
||||
|
@ -303,6 +300,7 @@ static WITHOUT_DEFAULTS_JSON_STR: &'static str = r#"{
|
|||
}"#;
|
||||
|
||||
mod gen {
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::pref_util::{Accessor, PrefValue};
|
||||
use servo_config_plugins::build_structs;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::pipeline::Pipeline;
|
||||
use euclid::Size2D;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::{
|
||||
BrowsingContextGroupId, BrowsingContextId, PipelineId, TopLevelBrowsingContextId,
|
||||
};
|
||||
|
|
|
@ -110,7 +110,7 @@ use compositing_traits::{
|
|||
CompositorMsg, CompositorProxy, ConstellationMsg as FromCompositorMsg, SendableFrameTree,
|
||||
WebrenderMsg,
|
||||
};
|
||||
use crossbeam_channel::{after, never, unbounded, Receiver, Sender};
|
||||
use crossbeam_channel::{after, never, select, unbounded, Receiver, Sender};
|
||||
use devtools_traits::{
|
||||
ChromeToDevtoolsControlMsg, DevtoolsControlMsg, DevtoolsPageInfo, NavigationState,
|
||||
ScriptToDevtoolsControlMsg,
|
||||
|
@ -126,6 +126,7 @@ use ipc_channel::Error as IpcError;
|
|||
use keyboard_types::webdriver::Event as WebDriverInputEvent;
|
||||
use keyboard_types::KeyboardEvent;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
use log::{debug, error, info, warn};
|
||||
use media::{GLPlayerThreads, WindowGLContext};
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitorControlMsg, BackgroundHangMonitorRegister, HangMonitorAlert,
|
||||
|
|
|
@ -4,13 +4,6 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate crossbeam_channel;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
mod browsingcontext;
|
||||
mod constellation;
|
||||
mod event_loop;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use backtrace::Backtrace;
|
||||
use compositing_traits::ConstellationMsg as FromCompositorMsg;
|
||||
use crossbeam_channel::Sender;
|
||||
use log::{Level, LevelFilter, Log, Metadata, Record};
|
||||
use log::{debug, Level, LevelFilter, Log, Metadata, Record};
|
||||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
use script_traits::{LogEntry, ScriptMsg as FromScriptMsg, ScriptToConstellationChan};
|
||||
use servo_remutex::ReentrantMutex;
|
||||
|
|
|
@ -10,6 +10,7 @@ use crossbeam_channel::Sender;
|
|||
use http::HeaderMap;
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net::http_loader::{set_default_accept, set_default_accept_language};
|
||||
use net_traits::request::{Destination, Referrer, RequestBuilder};
|
||||
|
|
|
@ -18,6 +18,7 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
|||
use ipc_channel::router::ROUTER;
|
||||
use ipc_channel::Error;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
use log::{debug, error, warn};
|
||||
use media::WindowGLContext;
|
||||
use metrics::PaintTimeMetrics;
|
||||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
|
@ -40,6 +41,7 @@ use script_traits::{DocumentActivity, InitialScriptState};
|
|||
use script_traits::{LayoutControlMsg, LayoutMsg, LoadData};
|
||||
use script_traits::{NewLayoutInfo, SWManagerMsg};
|
||||
use script_traits::{ScriptThreadFactory, TimerSchedulerMsg, WindowSizeData};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::opts::{self, Opts};
|
||||
use servo_config::{prefs, prefs::PrefValue};
|
||||
use servo_url::ServoUrl;
|
||||
|
|
|
@ -16,6 +16,7 @@ use crate::serviceworker::ServiceWorkerUnprivilegedContent;
|
|||
))]
|
||||
use gaol::profile::{Operation, PathPattern, Profile};
|
||||
use ipc_channel::Error;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::opts::Opts;
|
||||
use servo_config::prefs::PrefValue;
|
||||
use std::collections::HashMap;
|
||||
|
@ -128,7 +129,7 @@ pub fn content_process_sandbox_profile() -> Profile {
|
|||
all(target_arch = "aarch64", not(target_os = "macos"))
|
||||
))]
|
||||
pub fn content_process_sandbox_profile() {
|
||||
error!("Sandboxed multiprocess is not supported on this platform.");
|
||||
log::error!("Sandboxed multiprocess is not supported on this platform.");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
|
@ -218,7 +219,7 @@ pub fn spawn_multiprocess(content: UnprivilegedContent) -> Result<(), Error> {
|
|||
|
||||
#[cfg(any(target_os = "windows", target_os = "ios"))]
|
||||
pub fn spawn_multiprocess(_content: UnprivilegedContent) -> Result<(), Error> {
|
||||
error!("Multiprocess is not supported on Windows or iOS.");
|
||||
log::error!("Multiprocess is not supported on Windows or iOS.");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use crate::sandboxing::{spawn_multiprocess, UnprivilegedContent};
|
||||
use ipc_channel::Error;
|
||||
use script_traits::{SWManagerSenders, ServiceWorkerManagerFactory};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::opts::{self, Opts};
|
||||
use servo_config::prefs::{self, PrefValue};
|
||||
use servo_url::ImmutableOrigin;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::browsingcontext::NewBrowsingContextInfo;
|
||||
use euclid::Size2D;
|
||||
use log::debug;
|
||||
use msg::constellation_msg::{
|
||||
BrowsingContextId, HistoryStateId, PipelineId, TopLevelBrowsingContextId,
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
/// General actor system infrastructure.
|
||||
use crate::StreamId;
|
||||
use devtools_traits::PreciseTime;
|
||||
use log::{debug, warn};
|
||||
use serde_json::{Map, Value};
|
||||
use std::any::Any;
|
||||
use std::cell::{Cell, RefCell};
|
||||
|
|
|
@ -23,6 +23,7 @@ use devtools_traits::DevtoolsPageInfo;
|
|||
use devtools_traits::NavigationState;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -21,7 +21,9 @@ use devtools_traits::{
|
|||
CachedConsoleMessageTypes, ConsoleAPI, DevtoolScriptControlMsg, LogLevel, PageError,
|
||||
};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use log::debug;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use serde::Serialize;
|
||||
use serde_json::{self, Map, Number, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
|||
use crate::protocol::JsonPacketStream;
|
||||
use crate::protocol::{ActorDescription, Method};
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ use devtools_traits::DevtoolScriptControlMsg::{GetLayout, ModifyAttribute};
|
|||
use devtools_traits::{ComputedNodeLayout, DevtoolScriptControlMsg, NodeInfo};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{self, Map, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::net::TcpStream;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use devtools_traits::HttpRequest as DevtoolsHttpRequest;
|
|||
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
|
||||
use headers::{ContentType, Cookie, HeaderMapExt};
|
||||
use http::{header, HeaderMap, Method, StatusCode};
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
use time::Tm;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::{ActorDescription, JsonPacketStream, Method};
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use servo_config::pref_util::PrefValue;
|
||||
use servo_config::prefs::pref_map;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use crate::actors::tab::{TabDescriptorActor, TabDescriptorActorMsg};
|
|||
use crate::actors::worker::{WorkerActor, WorkerMsg};
|
||||
use crate::protocol::{ActorDescription, JsonPacketStream};
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use crate::actors::browsing_context::{BrowsingContextActor, BrowsingContextActor
|
|||
use crate::actors::root::RootActor;
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::protocol::JsonPacketStream;
|
||||
use crate::StreamId;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use devtools_traits::DevtoolScriptControlMsg::WantsLiveNotifications;
|
|||
use devtools_traits::{DevtoolScriptControlMsg, WorkerId};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -12,11 +12,6 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
use crate::actor::{Actor, ActorRegistry};
|
||||
use crate::actors::browsing_context::BrowsingContextActor;
|
||||
use crate::actors::console::{ConsoleActor, Root};
|
||||
|
@ -38,7 +33,9 @@ use devtools_traits::{
|
|||
use devtools_traits::{PageError, ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy, PromptDefinition, PromptOrigin, PromptResult};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use log::{debug, warn};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use serde::Serialize;
|
||||
use servo_rand::RngCore;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
//! [JSON packets]
|
||||
//! (https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport#JSON_Packets).
|
||||
|
||||
use log::debug;
|
||||
use serde::Serialize;
|
||||
use serde_json::{self, Value};
|
||||
use std::error::Error;
|
||||
|
|
|
@ -11,17 +11,14 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use http::HeaderMap;
|
||||
use http::Method;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use servo_url::ServoUrl;
|
||||
use std::net::TcpStream;
|
||||
use time::{self, Duration, Tm};
|
||||
|
|
|
@ -12,7 +12,7 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
panic!("#[dom_struct] takes no arguments");
|
||||
}
|
||||
let attributes = quote! {
|
||||
#[derive(DenyPublicFields, DomObject, JSTraceable, MallocSizeOf)]
|
||||
#[derive(deny_public_fields::DenyPublicFields, domobject_derive::DomObject, JSTraceable, MallocSizeOf)]
|
||||
#[unrooted_must_root_lint::must_root]
|
||||
#[repr(C)]
|
||||
};
|
||||
|
|
|
@ -4,13 +4,10 @@
|
|||
|
||||
#![recursion_limit = "128"]
|
||||
|
||||
#[macro_use]
|
||||
extern crate quote;
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
|
||||
use proc_macro2;
|
||||
use quote::quote;
|
||||
use quote::TokenStreamExt;
|
||||
use syn::parse_quote;
|
||||
|
||||
#[proc_macro_derive(DomObject)]
|
||||
pub fn expand_token_stream(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
|
|
|
@ -2,21 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate num_derive;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
pub mod resources;
|
||||
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use keyboard_types::KeyboardEvent;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::{InputMethodType, PipelineId, TopLevelBrowsingContextId};
|
||||
use num_derive::FromPrimitive;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt::{Debug, Error, Formatter};
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
|
||||
|
|
|
@ -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 https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{Once, RwLock};
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of_derive;
|
||||
|
||||
use app_units::{Au, MAX_AU, MIN_AU};
|
||||
use euclid::{
|
||||
default::{Point2D, Rect, Size2D},
|
||||
Length,
|
||||
};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use std::f32;
|
||||
use webrender_api::units::{FramebufferPixel, LayoutPoint, LayoutRect, LayoutSize};
|
||||
|
||||
|
|
|
@ -12,8 +12,11 @@ use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
|||
use crate::text::shaping::ShaperMethods;
|
||||
use crate::text::Shaper;
|
||||
use app_units::Au;
|
||||
use bitflags::bitflags;
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use servo_atoms::Atom;
|
||||
use log::debug;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_atoms::{atom, Atom};
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
|
@ -29,6 +32,7 @@ use style::values::computed::font::{GenericFontFamily, SingleFontFamily};
|
|||
use unicode_script::Script;
|
||||
use webrender_api::FontInstanceKey;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! ot_tag {
|
||||
($t1:expr, $t2:expr, $t3:expr, $t4:expr) => {
|
||||
(($t1 as u32) << 24) | (($t2 as u32) << 16) | (($t3 as u32) << 8) | ($t4 as u32)
|
||||
|
|
|
@ -14,8 +14,10 @@ use crate::platform::font_template::FontTemplateData;
|
|||
use app_units::Au;
|
||||
use gfx_traits::{FontData, WebrenderApi};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use log::{debug, trace};
|
||||
use net_traits::request::{Destination, Referrer, RequestBuilder};
|
||||
use net_traits::{fetch_async, CoreResourceThread, FetchResponseMsg};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
|
|
|
@ -11,6 +11,7 @@ use crate::platform::font::FontHandle;
|
|||
pub use crate::platform::font_context::FontContextHandle;
|
||||
use app_units::Au;
|
||||
use fnv::FnvHasher;
|
||||
use log::debug;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use servo_arc::Arc;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::font::FontHandleMethods;
|
|||
use crate::platform::font::FontHandle;
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt::{Debug, Error, Formatter};
|
||||
use std::io::Error as IoError;
|
||||
|
|
|
@ -4,19 +4,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate servo_atoms;
|
||||
|
||||
// Fonts
|
||||
#[macro_use]
|
||||
pub mod font;
|
||||
pub mod font_cache_thread;
|
||||
pub mod font_context;
|
||||
|
|
|
@ -21,6 +21,7 @@ use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size};
|
|||
use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, FT_Vector};
|
||||
use freetype::succeeded;
|
||||
use freetype::tt_os2::TT_OS2;
|
||||
use log::debug;
|
||||
use servo_atoms::Atom;
|
||||
use std::ffi::CString;
|
||||
use std::os::raw::{c_char, c_long};
|
||||
|
|
|
@ -11,6 +11,7 @@ use fontconfig_sys::{FcFontSetDestroy, FcMatchPattern, FcPatternCreate, FcPatter
|
|||
use fontconfig_sys::{FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy, FcPatternAddString};
|
||||
use fontconfig_sys::{FcObjectSetAdd, FcPatternGetInteger};
|
||||
use libc::{c_char, c_int};
|
||||
use log::debug;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
|
||||
|
|
|
@ -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 https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::fs::File;
|
||||
|
|
|
@ -20,6 +20,7 @@ use core_graphics::geometry::CGRect;
|
|||
use core_text::font::CTFont;
|
||||
use core_text::font_descriptor::kCTFontDefaultOrientation;
|
||||
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
|
||||
use log::debug;
|
||||
use servo_atoms::Atom;
|
||||
use std::ops::Range;
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::text::util::unicode_plane;
|
||||
use log::debug;
|
||||
use ucd::{Codepoint, UnicodeBlock};
|
||||
|
||||
pub fn for_each_available_family<F>(mut callback: F)
|
||||
|
|
|
@ -15,6 +15,7 @@ use crate::text::glyph::GlyphId;
|
|||
use app_units::Au;
|
||||
use dwrote::{Font, FontFace, FontFile};
|
||||
use dwrote::{FontStretch, FontStyle};
|
||||
use log::debug;
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::text::util::unicode_plane;
|
||||
use dwrote::{Font, FontCollection, FontDescriptor};
|
||||
use lazy_static::lazy_static;
|
||||
use servo_atoms::Atom;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::platform::windows::font_list::font_from_atom;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use log::debug;
|
||||
use range::{self, EachIndex, Range, RangeIndex};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cmp::{Ordering, PartialOrd};
|
||||
use std::vec::Vec;
|
||||
use std::{fmt, mem, u16};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use crate::font::{Font, FontTableMethods, FontTableTag, ShapingFlags, ShapingOptions, KERN};
|
||||
use crate::ot_tag;
|
||||
use crate::platform::font::FontTable;
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
|
@ -38,6 +39,8 @@ use harfbuzz_sys::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
|
|||
use harfbuzz_sys::{hb_face_t, hb_font_t};
|
||||
use harfbuzz_sys::{hb_position_t, hb_tag_t};
|
||||
use harfbuzz_sys::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
|
||||
use lazy_static::lazy_static;
|
||||
use log::debug;
|
||||
use std::os::raw::{c_char, c_int, c_uint, c_void};
|
||||
use std::{char, cmp, ptr};
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@ use crate::font::{RunMetrics, ShapingOptions};
|
|||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::text::glyph::{ByteIndex, GlyphStore};
|
||||
use app_units::Au;
|
||||
use log::debug;
|
||||
use range::Range;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cell::Cell;
|
||||
use std::cmp::{max, Ordering};
|
||||
use std::slice::Iter;
|
||||
|
|
|
@ -6,16 +6,11 @@
|
|||
#![crate_type = "rlib"]
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
extern crate range;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
pub mod print_tree;
|
||||
|
||||
use range::RangeIndex;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use range::{int_range_index, RangeIndex};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use webrender_api::{Epoch as WebRenderEpoch, FontInstanceKey, FontKey, NativeFontHandle};
|
||||
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
#[macro_use]
|
||||
extern crate synstructure;
|
||||
use syn::parse_quote;
|
||||
use synstructure::decl_derive;
|
||||
use synstructure::quote;
|
||||
|
||||
decl_derive!([JSTraceable, attributes(no_trace, custom_trace)] =>
|
||||
/// Implements `JSTraceable` on structs and enums
|
||||
|
|
|
@ -43,15 +43,17 @@ use crate::fragment::{
|
|||
CoordinateSystem, Fragment, FragmentBorderBoxIterator, FragmentFlags, Overflow,
|
||||
};
|
||||
use crate::incremental::RelayoutMode;
|
||||
use crate::layout_debug;
|
||||
use crate::model::{
|
||||
AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto,
|
||||
};
|
||||
use crate::sequential;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::{Au, MAX_AU};
|
||||
use bitflags::bitflags;
|
||||
use euclid::default::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use serde::{Serialize, Serializer};
|
||||
use servo_geometry::MaxRect;
|
||||
use std::cmp::{max, min};
|
||||
|
|
|
@ -48,6 +48,8 @@ use crate::text::TextRunScanner;
|
|||
use crate::traversal::PostorderNodeMutTraversal;
|
||||
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
|
||||
use crate::ServoArc;
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use log::debug;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::construct::ConstructionResult;
|
||||
use atomic_refcell::AtomicRefCell;
|
||||
use bitflags::bitflags;
|
||||
use script_layout_interface::wrapper_traits::LayoutDataTrait;
|
||||
use script_layout_interface::StyleData;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ use crate::inline::InlineFragmentNodeFlags;
|
|||
use crate::model::MaybeAuto;
|
||||
use crate::table_cell::CollapsedBordersForCell;
|
||||
use app_units::{Au, AU_PER_PX};
|
||||
use bitflags::bitflags;
|
||||
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
|
||||
use embedder_traits::Cursor;
|
||||
use euclid::{
|
||||
|
@ -43,6 +44,7 @@ use gfx::text::glyph::ByteIndex;
|
|||
use gfx::text::TextRun;
|
||||
use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId};
|
||||
use ipc_channel::ipc;
|
||||
use log::{debug, warn};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image_cache::UsePlaceholder;
|
||||
use range::Range;
|
||||
|
|
|
@ -19,6 +19,7 @@ use gfx_traits::{self, StackingContextId};
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image::base::Image;
|
||||
use script_traits::compositor::ScrollTreeNodeId;
|
||||
use serde::Serialize;
|
||||
use servo_geometry::MaxRect;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
use crate::display_list::items::{BaseDisplayItem, ClipScrollNode, ClipScrollNodeType, ClipType};
|
||||
use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType};
|
||||
use log::trace;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_traits::compositor::{CompositorDisplayListInfo, ScrollTreeNodeId, ScrollableNodeInfo};
|
||||
use webrender_api::units::{LayoutPoint, LayoutSize, LayoutVector2D};
|
||||
|
|
|
@ -12,12 +12,14 @@ use crate::display_list::{
|
|||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::{self, AdjoiningMargins, CollapsibleMargins};
|
||||
use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::{Au, MAX_AU};
|
||||
use euclid::default::Point2D;
|
||||
use log::debug;
|
||||
use serde::Serialize;
|
||||
use std::cmp::{max, min};
|
||||
use std::ops::Range;
|
||||
use style::computed_values::align_content::T as AlignContent;
|
||||
|
|
|
@ -6,6 +6,8 @@ use crate::block::FormattingContextType;
|
|||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::persistent_list::PersistentList;
|
||||
use app_units::{Au, MAX_AU};
|
||||
use log::debug;
|
||||
use serde::Serialize;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use style::computed_values::float::T as StyleFloat;
|
||||
|
|
|
@ -44,10 +44,13 @@ use crate::table_row::TableRowFlow;
|
|||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use app_units::Au;
|
||||
use bitflags::bitflags;
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use gfx_traits::StackingContextId;
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use log::debug;
|
||||
use serde::ser::{SerializeStruct, Serializer};
|
||||
use serde::Serialize;
|
||||
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect};
|
||||
use std::fmt;
|
||||
use std::slice::IterMut;
|
||||
|
|
|
@ -21,12 +21,15 @@ use crate::text::TextRunScanner;
|
|||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use bitflags::bitflags;
|
||||
use canvas_traits::canvas::{CanvasId, CanvasMsg};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::{TextRun, TextRunSlice};
|
||||
use gfx_traits::StackingContextId;
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use log::debug;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
|
@ -37,6 +40,7 @@ use script_layout_interface::wrapper_traits::{
|
|||
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource, HTMLMediaData, SVGSVGData};
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_url::ServoUrl;
|
||||
use size_of_test::size_of_test;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cmp::{max, min, Ordering};
|
||||
use std::collections::LinkedList;
|
||||
|
|
|
@ -16,6 +16,7 @@ use crate::fragment::{
|
|||
};
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::InorderFlowTraversal;
|
||||
use lazy_static::lazy_static;
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use smallvec::SmallVec;
|
||||
use std::collections::{HashMap, LinkedList};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow};
|
||||
use bitflags::bitflags;
|
||||
use style::computed_values::float::T as Float;
|
||||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
|
|
|
@ -15,17 +15,20 @@ use crate::flow_ref::FlowRef;
|
|||
use crate::fragment::FragmentFlags;
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::IntrinsicISizesContribution;
|
||||
use crate::text;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use crate::ServoArc;
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::{Au, MIN_AU};
|
||||
use bitflags::bitflags;
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use range::{Range, RangeIndex};
|
||||
use log::debug;
|
||||
use range::{int_range_index, Range, RangeIndex};
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use serde::Serialize;
|
||||
use servo_geometry::MaxRect;
|
||||
use std::cmp::max;
|
||||
use std::collections::VecDeque;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
use crate::flow::GetBaseFlow;
|
||||
use crate::flow_ref::FlowRef;
|
||||
use serde::Serialize;
|
||||
use serde_json::{to_string, to_value, Value};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -4,22 +4,6 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate html5ever;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate range;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate size_of_test;
|
||||
|
||||
#[macro_use]
|
||||
pub mod layout_debug;
|
||||
|
||||
mod block;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
use crate::fragment::Fragment;
|
||||
use app_units::Au;
|
||||
use euclid::SideOffsets2D;
|
||||
use serde::Serialize;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, WritingMode};
|
||||
|
|
|
@ -14,6 +14,7 @@ use crate::ServoArc;
|
|||
use app_units::Au;
|
||||
use euclid::default::{Point2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -17,15 +17,17 @@ use crate::flow::{
|
|||
};
|
||||
use crate::flow_list::{FlowListIterator, MutFlowListIterator};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
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 crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use serde::Serialize;
|
||||
use std::{cmp, fmt};
|
||||
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
||||
use style::context::SharedStyleContext;
|
||||
|
|
|
@ -14,6 +14,7 @@ use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
|||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
|
|
|
@ -11,13 +11,15 @@ use crate::display_list::{
|
|||
};
|
||||
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::table::InternalTable;
|
||||
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::Au;
|
||||
use euclid::default::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
|
||||
use serde::Serialize;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::context::LayoutContext;
|
|||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use std::fmt;
|
||||
|
|
|
@ -14,12 +14,13 @@ use crate::flow::{
|
|||
};
|
||||
use crate::flow_list::MutFlowListIterator;
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, warn};
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::cmp::max;
|
||||
use std::fmt;
|
||||
|
|
|
@ -11,11 +11,12 @@ use crate::display_list::{
|
|||
};
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
use crate::{layout_debug, layout_debug_scope};
|
||||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::fmt;
|
||||
use std::iter::{IntoIterator, Iterator, Peekable};
|
||||
|
|
|
@ -26,6 +26,8 @@ use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
|||
use app_units::Au;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use log::{debug, trace};
|
||||
use serde::Serialize;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use std::ops::Add;
|
||||
|
|
|
@ -14,6 +14,7 @@ use gfx::font::{self, FontMetrics, FontRef, RunMetrics, ShapingFlags, ShapingOpt
|
|||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::TextRun;
|
||||
use gfx::text::util::{self, CompressionMode};
|
||||
use log::debug;
|
||||
use range::Range;
|
||||
use servo_atoms::Atom;
|
||||
use std::borrow::ToOwned;
|
||||
|
|
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