Fix reported test-tidy errors for unmerged import blocks

This merges import blocks that were reported by tidy as unmerged.
This commit is contained in:
Brandon Fairchild 2015-09-17 17:55:01 -04:00
parent e924393be8
commit de3547e401
213 changed files with 598 additions and 934 deletions

View file

@ -17,13 +17,12 @@ use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
use layers::platform::surface::NativeSurface;
use num::ToPrimitive;
use util::opts;
use util::task::spawn_named;
use util::vec::byte_swap;
use std::borrow::ToOwned;
use std::mem;
use std::sync::mpsc::{channel, Sender};
use util::opts;
use util::task::spawn_named;
use util::vec::byte_swap;
impl<'a> CanvasPaintTask<'a> {
/// It reads image data from the canvas

View file

@ -8,9 +8,6 @@ use core::nonzero::NonZero;
use euclid::size::Size2D;
use gleam::gl;
use gleam::gl::types::{GLsizei};
use util::task::spawn_named;
use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory};
use ipc_channel::router::ROUTER;
use layers::platform::surface::NativeSurface;
@ -18,6 +15,7 @@ use offscreen_gl_context::{GLContext, GLContextAttributes, ColorAttachmentType};
use std::borrow::ToOwned;
use std::slice::bytes::copy_memory;
use std::sync::mpsc::{channel, Sender};
use util::task::spawn_named;
use util::vec::byte_swap;
pub struct WebGLPaintTask {

View file

@ -6,12 +6,6 @@ use compositor_layer::{CompositorData, CompositorLayer, WantsScrollEventsFlag};
use compositor_task::{CompositorEventListener, CompositorProxy};
use compositor_task::{CompositorReceiver, InitialCompositorState, Msg};
use constellation::SendableFrameTree;
use pipeline::CompositionPipeline;
use scrolling::ScrollingTimerProxy;
use surface_map::SurfaceMap;
use windowing;
use windowing::{MouseWindowEvent, WindowEvent, WindowMethods, WindowNavigateMsg};
use euclid::point::TypedPoint2D;
use euclid::rect::TypedRect;
use euclid::scale_factor::ScaleFactor;
@ -37,10 +31,12 @@ use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, NavigationDirection};
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData};
use msg::constellation_msg::{PipelineId, WindowSizeData};
use pipeline::CompositionPipeline;
use png;
use profile_traits::mem::{self, Reporter, ReporterRequest, ReportKind};
use profile_traits::time::{self, ProfilerCategory, profile};
use script_traits::{ConstellationControlMsg, LayoutControlMsg};
use scrolling::ScrollingTimerProxy;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::mem as std_mem;
@ -48,10 +44,13 @@ use std::rc::Rc;
use std::slice::bytes::copy_memory;
use std::sync::mpsc::Sender;
use style_traits::viewport::ViewportConstraints;
use surface_map::SurfaceMap;
use time::{precise_time_ns, precise_time_s};
use url::Url;
use util::geometry::{Au, PagePx, ScreenPx, ViewportPx};
use util::opts;
use windowing;
use windowing::{MouseWindowEvent, WindowEvent, WindowMethods, WindowNavigateMsg};
const BUFFER_MAP_SIZE: usize = 10000000;

View file

@ -2,10 +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 compositor::IOCompositor;
use windowing::{MouseWindowEvent, WindowMethods};
use azure::azure_hl;
use compositor::IOCompositor;
use euclid::length::Length;
use euclid::point::{Point2D, TypedPoint2D};
use euclid::rect::Rect;
@ -18,6 +16,7 @@ use msg::constellation_msg::PipelineId;
use script_traits::CompositorEvent::{ClickEvent, MouseDownEvent, MouseMoveEvent, MouseUpEvent};
use script_traits::ConstellationControlMsg;
use std::rc::Rc;
use windowing::{MouseWindowEvent, WindowMethods};
#[derive(Debug)]
pub struct CompositorData {

View file

@ -8,10 +8,8 @@ pub use windowing;
pub use constellation::SendableFrameTree;
use compositor;
use headless;
use windowing::{WindowEvent, WindowMethods};
use euclid::{Size2D, Point2D, Rect};
use headless;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use layers::layers::{BufferRequest, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
@ -28,6 +26,7 @@ use std::sync::mpsc::{channel, Sender, Receiver};
use style_traits::viewport::ViewportConstraints;
use url::Url;
use util::cursor::Cursor;
use windowing::{WindowEvent, WindowMethods};
/// Sends messages to the compositor. This is a trait supplied by the port because the method used
/// to communicate with the compositor may have to kick OS event loops awake, communicate cross-

View file

@ -9,8 +9,6 @@
//! navigation context, each `Pipeline` encompassing a `ScriptTask`,
//! `LayoutTask`, and `PaintTask`.
use pipeline::{Pipeline, CompositionPipeline, InitialPipelineState};
use canvas::canvas_paint_task::CanvasPaintTask;
use canvas::webgl_paint_task::WebGLPaintTask;
use canvas_traits::CanvasMsg;
@ -39,6 +37,7 @@ use net_traits::image_cache_task::ImageCacheTask;
use net_traits::storage_task::{StorageTask, StorageTaskMsg};
use net_traits::{self, ResourceTask};
use offscreen_gl_context::GLContextAttributes;
use pipeline::{Pipeline, CompositionPipeline, InitialPipelineState};
use profile_traits::mem;
use profile_traits::time;
use script_traits::{CompositorEvent, ConstellationControlMsg, LayoutControlMsg};

View file

@ -4,8 +4,6 @@
use compositor_task::{CompositorEventListener, CompositorReceiver};
use compositor_task::{InitialCompositorState, Msg};
use windowing::WindowEvent;
use euclid::scale_factor::ScaleFactor;
use euclid::{Size2D, Point2D};
use msg::constellation_msg::AnimationState;
@ -13,6 +11,7 @@ use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, WindowSizeData};
use profile_traits::mem;
use profile_traits::time;
use windowing::WindowEvent;
/// Starts the compositor, which listens for messages on the specified port.
///

View file

@ -3,10 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use CompositorProxy;
use layout_traits::{LayoutTaskFactory, LayoutControlChan};
use script_traits::{ConstellationControlMsg, InitialScriptState};
use script_traits::{LayoutControlMsg, NewLayoutInfo, ScriptTaskFactory};
use compositor_task;
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
use euclid::rect::{TypedRect};
@ -16,6 +12,7 @@ use gfx::paint_task::{ChromeToPaintMsg, LayoutToPaintMsg, PaintTask};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layers::geometry::DevicePixel;
use layout_traits::{LayoutTaskFactory, LayoutControlChan};
use msg::constellation_msg::{ConstellationChan, Failure, FrameId, PipelineId, SubpageId};
use msg::constellation_msg::{LoadData, WindowSizeData, PipelineExitType, MozBrowserEvent};
use net_traits::ResourceTask;
@ -23,6 +20,8 @@ use net_traits::image_cache_task::ImageCacheTask;
use net_traits::storage_task::StorageTask;
use profile_traits::mem as profile_mem;
use profile_traits::time;
use script_traits::{ConstellationControlMsg, InitialScriptState};
use script_traits::{LayoutControlMsg, NewLayoutInfo, ScriptTaskFactory};
use std::any::Any;
use std::mem;
use std::sync::mpsc::{Receiver, Sender, channel};

View file

@ -5,7 +5,6 @@
//! A timer thread that gives the painting task a little time to catch up when the user scrolls.
use compositor_task::{CompositorProxy, Msg};
use std::sync::mpsc::{Receiver, Sender, channel};
use std::thread::{Builder, sleep_ms};
use time;

View file

@ -5,7 +5,6 @@
//! Abstract windowing methods. The concrete implementations of these can be found in `platform/`.
use compositor_task::{CompositorProxy, CompositorReceiver};
use euclid::point::TypedPoint2D;
use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D;

View file

@ -9,15 +9,13 @@
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::object::ObjectActor;
use protocol::JsonPacketStream;
use devtools_traits::CachedConsoleMessage;
use devtools_traits::EvaluateJSReply::{NullValue, VoidValue, NumberValue};
use devtools_traits::EvaluateJSReply::{StringValue, BooleanValue, ActorValue};
use devtools_traits::{CachedConsoleMessageTypes, DevtoolScriptControlMsg, PAGE_ERROR, CONSOLE_API};
use msg::constellation_msg::PipelineId;
use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::PipelineId;
use protocol::JsonPacketStream;
use rustc_serialize::json::{self, Json, ToJson};
use std::cell::RefCell;
use std::collections::BTreeMap;

View file

@ -2,17 +2,16 @@
* 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 actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::timeline::HighResolutionStamp;
use devtools_traits::DevtoolScriptControlMsg;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId;
use rustc_serialize::json;
use std::mem;
use std::net::TcpStream;
use time::precise_time_ns;
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::timeline::HighResolutionStamp;
use devtools_traits::DevtoolScriptControlMsg;
use msg::constellation_msg::PipelineId;
pub struct FramerateActor {
name: String,
pipeline: PipelineId,

View file

@ -5,15 +5,13 @@
//! Liberally derived from the [Firefox JS implementation]
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use devtools_traits::DevtoolScriptControlMsg::{GetLayout, ModifyAttribute};
use devtools_traits::DevtoolScriptControlMsg::{GetRootNode, GetDocumentElement, GetChildren};
use devtools_traits::{DevtoolScriptControlMsg, NodeInfo, ComputedNodeLayout};
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use protocol::JsonPacketStream;
use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::PipelineId;
use protocol::JsonPacketStream;
use rustc_serialize::json::{self, Json, ToJson};
use std::cell::RefCell;
use std::collections::BTreeMap;

View file

@ -2,11 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use rustc_serialize::json;
use std::net::TcpStream;
use actor::{Actor, ActorRegistry, ActorMessageStatus};
#[derive(RustcEncodable)]
pub struct TimelineMemoryReply {
jsObjectSize: u64,

View file

@ -4,7 +4,6 @@
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use protocol::JsonPacketStream;
use rustc_serialize::json;
use std::net::TcpStream;

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use rustc_serialize::json;
use std::net::TcpStream;

View file

@ -10,7 +10,6 @@
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::tab::{TabActor, TabActorMsg};
use protocol::JsonPacketStream;
use rustc_serialize::json;
use std::net::TcpStream;

View file

@ -11,7 +11,6 @@ use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::console::ConsoleActor;
use devtools_traits::DevtoolScriptControlMsg::WantsLiveNotifications;
use protocol::JsonPacketStream;
use rustc_serialize::json;
use std::net::TcpStream;

View file

@ -2,22 +2,21 @@
* 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::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::PipelineId;
use rustc_serialize::{json, Encoder, Encodable};
use std::cell::RefCell;
use std::net::TcpStream;
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
use std::thread::sleep_ms;
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::framerate::FramerateActor;
use actors::memory::{MemoryActor, TimelineMemoryReply};
use devtools_traits::DevtoolScriptControlMsg;
use devtools_traits::DevtoolScriptControlMsg::{SetTimelineMarkers, DropTimelineMarkers};
use devtools_traits::{PreciseTime, TimelineMarker, TimelineMarkerType};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::PipelineId;
use protocol::JsonPacketStream;
use rustc_serialize::{json, Encoder, Encodable};
use std::cell::RefCell;
use std::net::TcpStream;
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
use std::thread::sleep_ms;
use util::task;
pub struct TimelineActor {

View file

@ -43,15 +43,12 @@ use actors::root::RootActor;
use actors::tab::TabActor;
use actors::timeline::TimelineActor;
use actors::worker::WorkerActor;
use protocol::JsonPacketStream;
use devtools_traits::{ChromeToDevtoolsControlMsg, ConsoleMessage, DevtoolsControlMsg};
use devtools_traits::{DevtoolsPageInfo, DevtoolScriptControlMsg, LogLevel, NetworkEvent};
use devtools_traits::{ScriptToDevtoolsControlMsg};
use msg::constellation_msg::{PipelineId, WorkerId};
use util::task::spawn_named;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{PipelineId, WorkerId};
use protocol::JsonPacketStream;
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::collections::HashMap;
@ -61,6 +58,7 @@ use std::net::{TcpListener, TcpStream, Shutdown};
use std::sync::mpsc::{channel, Receiver, Sender, RecvError};
use std::sync::{Arc, Mutex};
use time::precise_time_ns;
use util::task::spawn_named;
mod actor;
/// Corresponds to http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/

View file

@ -27,18 +27,16 @@ extern crate hyper;
extern crate util;
extern crate time;
use msg::constellation_msg::{PipelineId, WorkerId};
use rustc_serialize::{Decodable, Decoder};
use url::Url;
use util::str::DOMString;
use hyper::header::Headers;
use hyper::http::RawStatus;
use hyper::method::Method;
use ipc_channel::ipc::IpcSender;
use time::Duration;
use msg::constellation_msg::{PipelineId, WorkerId};
use rustc_serialize::{Decodable, Decoder};
use std::net::TcpStream;
use time::Duration;
use url::Url;
use util::str::DOMString;
// Information would be attached to NewGlobal to be received and show in devtools.
// Extend these fields if we need more information.

View file

@ -16,15 +16,9 @@
#![deny(unsafe_code)]
use display_list::optimizer::DisplayListOptimizer;
use paint_context::PaintContext;
use self::DisplayItem::*;
use self::DisplayItemIterator::*;
use text::TextRun;
use text::glyph::CharIndex;
use azure::azure::AzFloat;
use azure::azure_hl::Color;
use display_list::optimizer::DisplayListOptimizer;
use euclid::approxeq::ApproxEq;
use euclid::num::Zero;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
@ -32,7 +26,10 @@ use gfx_traits::color;
use libc::uintptr_t;
use msg::compositor_msg::{LayerId, LayerKind, ScrollPolicy};
use net_traits::image::base::Image;
use paint_context::PaintContext;
use paint_task::PaintLayer;
use self::DisplayItem::*;
use self::DisplayItemIterator::*;
use smallvec::SmallVec;
use std::collections::linked_list::{self, LinkedList};
use std::fmt;
@ -42,6 +39,8 @@ use std::sync::Arc;
use style::computed_values::{border_style, cursor, filter, image_rendering, mix_blend_mode};
use style::computed_values::{pointer_events};
use style::properties::ComputedValues;
use text::TextRun;
use text::glyph::CharIndex;
use util::cursor::Cursor;
use util::geometry::{self, Au, MAX_RECT, ZERO_RECT};
use util::linked_list::prepend_from;

View file

@ -5,7 +5,6 @@
//! Transforms a display list to produce a visually-equivalent, but cheaper-to-paint, one.
use display_list::{DisplayItem, DisplayList, StackingContext};
use euclid::rect::Rect;
use euclid::{Matrix2D, Matrix4};
use std::collections::linked_list::LinkedList;

View file

@ -9,7 +9,6 @@ use azure::azure_hl::{ColorMatrixAttribute, ColorMatrixInput, CompositeInput, Dr
use azure::azure_hl::{FilterNode, FilterType, LinearTransferAttribute, LinearTransferInput};
use azure::azure_hl::{GaussianBlurAttribute, GaussianBlurInput};
use azure::azure_hl::{Matrix5x4, TableTransferAttribute, TableTransferInput};
use style::computed_values::filter;
use util::geometry::Au;

View file

@ -3,6 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use euclid::{Point2D, Rect, Size2D};
use font_template::FontTemplateDescriptor;
use platform::font::{FontHandle, FontTable};
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use smallvec::SmallVec;
use std::borrow::ToOwned;
use std::cell::RefCell;
@ -11,15 +15,10 @@ use std::str;
use std::sync::Arc;
use style::computed_values::{font_stretch, font_variant, font_weight};
use style::properties::style_structs::Font as FontStyle;
use util::cache::HashCache;
use font_template::FontTemplateDescriptor;
use platform::font::{FontHandle, FontTable};
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use text::Shaper;
use text::glyph::{GlyphStore, GlyphId};
use text::shaping::ShaperMethods;
use util::cache::HashCache;
use util::geometry::Au;
// FontHandle encapsulates access to the platform's font API,

View file

@ -2,23 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use font::SpecifiedFontStyle;
use font::{Font, FontGroup};
use platform::font_context::FontContextHandle;
use style::computed_values::{font_style, font_variant};
use azure::azure_hl::BackendType;
#[cfg(any(target_os = "linux", target_os = "android"))]
use azure::scaled_font::FontInfo;
use azure::scaled_font::ScaledFont;
use fnv::FnvHasher;
use font::FontHandleMethods;
use font::SpecifiedFontStyle;
use font::{Font, FontGroup};
use font_cache_task::FontCacheTask;
use font_template::FontTemplateDescriptor;
use platform::font::FontHandle;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use smallvec::SmallVec;
use string_cache::Atom;
use util::cache::HashCache;
use util::geometry::Au;
use util::mem::HeapSizeOf;
use std::borrow::{self, ToOwned};
use std::cell::RefCell;
use std::collections::HashMap;
@ -27,12 +24,11 @@ use std::default::Default;
use std::hash::{Hash, Hasher};
use std::rc::Rc;
use std::sync::Arc;
use azure::azure_hl::BackendType;
use azure::scaled_font::ScaledFont;
#[cfg(any(target_os = "linux", target_os = "android"))]
use azure::scaled_font::FontInfo;
use string_cache::Atom;
use style::computed_values::{font_style, font_variant};
use util::cache::HashCache;
use util::geometry::Au;
use util::mem::HeapSizeOf;
#[cfg(any(target_os = "linux", target_os = "android"))]
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {

View file

@ -6,9 +6,8 @@ use font::FontHandleMethods;
use platform::font::FontHandle;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use string_cache::Atom;
use std::sync::{Arc, Weak};
use string_cache::Atom;
use style::computed_values::{font_stretch, font_weight};
/// Describes how to select a font from a given family. This is very basic at the moment and needs

View file

@ -4,15 +4,6 @@
//! Painting of display lists using Moz2D/Azure.
use display_list::TextOrientation::{SidewaysLeft, SidewaysRight, Upright};
use display_list::{BLUR_INFLATION_FACTOR, BorderRadii, BoxShadowClipMode, ClippingRegion};
use display_list::{TextDisplayItem};
use filters;
use font_context::FontContext;
use gfx_traits::color;
use text::TextRun;
use text::glyph::CharIndex;
use azure::azure::AzIntSize;
use azure::azure_hl::{AntialiasMode, Color, ColorPattern, CompositionOp};
use azure::azure_hl::{DrawOptions, DrawSurfaceOptions, DrawTarget, ExtendMode, FilterType};
@ -23,11 +14,17 @@ use azure::azure_hl::{Pattern, PatternRef, Path, PathBuilder, SurfacePattern};
use azure::scaled_font::ScaledFont;
use azure::{AzFloat, struct__AzDrawOptions, struct__AzGlyph};
use azure::{struct__AzGlyphBuffer, struct__AzPoint, AzDrawTargetFillGlyphs};
use display_list::TextOrientation::{SidewaysLeft, SidewaysRight, Upright};
use display_list::{BLUR_INFLATION_FACTOR, BorderRadii, BoxShadowClipMode, ClippingRegion};
use display_list::{TextDisplayItem};
use euclid::matrix2d::Matrix2D;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::side_offsets::SideOffsets2D;
use euclid::size::Size2D;
use filters;
use font_context::FontContext;
use gfx_traits::color;
use libc::types::common::c99::uint32_t;
use msg::compositor_msg::LayerKind;
use net_traits::image::base::{Image, PixelFormat};
@ -37,6 +34,8 @@ use std::mem;
use std::ptr;
use std::sync::Arc;
use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
use text::TextRun;
use text::glyph::CharIndex;
use util::geometry::{self, Au, MAX_RECT, ZERO_RECT};
use util::opts;
use util::range::Range;

View file

@ -4,18 +4,16 @@
//! The task that handles all painting.
use display_list::{self, StackingContext};
use font_cache_task::FontCacheTask;
use font_context::FontContext;
use paint_context::PaintContext;
use azure::AzFloat;
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
use canvas_traits::CanvasMsg;
use display_list::{self, StackingContext};
use euclid::Matrix4;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::size::Size2D;
use font_cache_task::FontCacheTask;
use font_context::FontContext;
use ipc_channel::ipc::IpcSender;
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
@ -24,6 +22,7 @@ use msg::compositor_msg::{LayerProperties, PaintListener};
use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::PipelineExitType;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use paint_context::PaintContext;
use profile_traits::mem::{self, ReportsChan};
use profile_traits::time::{self, profile};
use rand::{self, Rng};

View file

@ -6,14 +6,6 @@ extern crate freetype;
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel};
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use style::computed_values::{font_stretch, font_weight};
use text::glyph::GlyphId;
use text::util::{float_to_fixed, fixed_to_float};
use util::geometry::Au;
use util::str::c_str_to_string;
use freetype::freetype::{FTErrorMethods, FT_F26Dot6, FT_Face, FT_FaceRec};
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
use freetype::freetype::{FT_Get_Kerning, FT_Get_Sfnt_Table, FT_Load_Sfnt_Table};
@ -24,11 +16,17 @@ use freetype::freetype::{FT_New_Memory_Face, FT_Done_Face};
use freetype::freetype::{FT_SizeRec, FT_UInt, FT_Size_Metrics, struct_FT_Vector_};
use freetype::freetype::{ft_sfnt_os2};
use freetype::tt_os2::TT_OS2;
use libc::c_char;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use std::mem;
use std::ptr;
use std::sync::Arc;
use style::computed_values::{font_stretch, font_weight};
use text::glyph::GlyphId;
use text::util::{float_to_fixed, fixed_to_float};
use util::geometry::Au;
use util::str::c_str_to_string;
fn float_to_fixed_ft(f: f64) -> i32 {
float_to_fixed(6, f)

View file

@ -9,14 +9,12 @@ use freetype::freetype::FT_Library;
use freetype::freetype::FT_Memory;
use freetype::freetype::FT_New_Library;
use freetype::freetype::struct_FT_MemoryRec_;
use libc::{c_void, c_long};
use std::ptr;
use std::rc::Rc;
use std::rt::heap;
use util::mem::{HeapSizeOf, heap_size_of};
use libc::{c_void, c_long};
// We pass a |User| struct -- via an opaque |void*| -- to FreeType each time a new instance is
// created. FreeType passes it back to the ft_alloc/ft_realloc/ft_free callbacks. We use it to
// record the memory usage of each FreeType instance.

View file

@ -13,14 +13,12 @@ use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPa
use fontconfig::fontconfig::{FcObjectSetAdd, FcPatternGetInteger};
use fontconfig::fontconfig::{FcPatternAddString, FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy};
use fontconfig::fontconfig::{FcPatternDestroy, FcFontSetDestroy, FcMatchPattern, FcPatternCreate};
use util::str::c_str_to_string;
use libc;
use libc::{c_int, c_char};
use std::borrow::ToOwned;
use std::ffi::CString;
use std::ptr;
use util::str::c_str_to_string;
static FC_FAMILY: &'static [u8] = b"family\0";
static FC_FILE: &'static [u8] = b"file\0";

View file

@ -8,15 +8,6 @@ extern crate core_foundation;
extern crate core_graphics;
extern crate core_text;
use font::FontTableTag;
use font::FractionalPixel;
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use platform::font_template::FontTemplateData;
use platform::macos::font_context::FontContextHandle;
use style::computed_values::{font_stretch, font_weight};
use text::glyph::GlyphId;
use util::geometry::{Au, px_to_pt};
use core_foundation::base::CFIndex;
use core_foundation::data::CFData;
use core_foundation::string::UniChar;
@ -25,9 +16,16 @@ use core_graphics::geometry::CGRect;
use core_text::font::CTFont;
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
use core_text::font_descriptor::{kCTFontDefaultOrientation};
use font::FontTableTag;
use font::FractionalPixel;
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use platform::font_template::FontTemplateData;
use platform::macos::font_context::FontContextHandle;
use std::ptr;
use std::sync::Arc;
use style::computed_values::{font_stretch, font_weight};
use text::glyph::GlyphId;
use util::geometry::{Au, px_to_pt};
pub struct FontTable {
data: CFData,

View file

@ -6,7 +6,6 @@ use core_foundation::base::TCFType;
use core_foundation::string::{CFString, CFStringRef};
use core_text;
use core_text::font_descriptor::{CTFontDescriptor, CTFontDescriptorRef};
use std::borrow::ToOwned;
use std::mem;

View file

@ -6,7 +6,6 @@ use core_graphics::data_provider::CGDataProvider;
use core_graphics::font::CGFont;
use core_text;
use core_text::font::CTFont;
use serde::de::{Error, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::borrow::ToOwned;

View file

@ -3,10 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use euclid::point::Point2D;
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
use simd::u32x4;
use std::cmp::{Ordering, PartialOrd};
use std::fmt;
use std::mem;

View file

@ -4,14 +4,9 @@
extern crate harfbuzz;
use euclid::Point2D;
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontHandleMethods, FontTableMethods, FontTableTag};
use font::{IGNORE_LIGATURES_SHAPING_FLAG, RTL_FLAG, ShapingOptions};
use platform::font::FontTable;
use text::glyph::{CharIndex, GlyphStore, GlyphId, GlyphData};
use text::shaping::ShaperMethods;
use text::util::{float_to_fixed, fixed_to_float, is_bidi_control};
use euclid::Point2D;
use harfbuzz::{HB_MEMORY_MODE_READONLY, HB_DIRECTION_LTR, HB_DIRECTION_RTL};
use harfbuzz::{RUST_hb_blob_create, RUST_hb_face_create_for_tables};
use harfbuzz::{RUST_hb_buffer_add_utf8};
@ -39,9 +34,13 @@ use harfbuzz::{hb_glyph_info_t};
use harfbuzz::{hb_glyph_position_t};
use harfbuzz::{hb_position_t, hb_tag_t};
use libc::{c_uint, c_int, c_void, c_char};
use platform::font::FontTable;
use std::char;
use std::cmp;
use std::ptr;
use text::glyph::{CharIndex, GlyphStore, GlyphId, GlyphData};
use text::shaping::ShaperMethods;
use text::util::{float_to_fixed, fixed_to_float, is_bidi_control};
use util::geometry::Au;
use util::range::Range;

View file

@ -5,15 +5,13 @@
use font::{Font, FontHandleMethods, FontMetrics, IS_WHITESPACE_SHAPING_FLAG, RunMetrics};
use font::{ShapingOptions};
use platform::font_template::FontTemplateData;
use text::glyph::{CharIndex, GlyphStore};
use util::geometry::Au;
use util::range::Range;
use util::vec::{Comparator, FullBinarySearchMethods};
use std::cmp::{Ordering, max};
use std::slice::Iter;
use std::sync::Arc;
use text::glyph::{CharIndex, GlyphStore};
use util::geometry::Au;
use util::range::Range;
use util::vec::{Comparator, FullBinarySearchMethods};
/// A single "paragraph" of text in one font size and style.
#[derive(Clone, Deserialize, Serialize)]

View file

@ -4,11 +4,10 @@
//! CSS transitions and animations.
use flow::{self, Flow};
use incremental::{self, RestyleDamage};
use clock_ticks;
use flow::{self, Flow};
use gfx::display_list::OpaqueNode;
use incremental::{self, RestyleDamage};
use layout_task::{LayoutTask, LayoutTaskData};
use msg::constellation_msg::{AnimationState, Msg, PipelineId};
use script::layout_interface::Animation;

View file

@ -30,6 +30,7 @@
use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use display_list_builder::{FragmentDisplayListBuilding};
use euclid::{Point2D, Rect, Size2D};
use floats::{ClearType, FloatKind, Floats, PlacementInfo};
use flow::{BLOCK_POSITION_IS_STATIC};
use flow::{CLEARS_LEFT, CLEARS_RIGHT};
@ -43,15 +44,12 @@ use flow::{self, BaseFlow, EarlyAbsolutePositionInfo, ForceNonfloatedFlag, FlowC
use flow_ref;
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, HAS_LAYER};
use fragment::{SpecificFragmentInfo};
use gfx::display_list::{ClippingRegion, DisplayList};
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW};
use layout_debug;
use layout_task::DISPLAY_PORT_SIZE_FACTOR;
use model::{IntrinsicISizes, MarginCollapseInfo};
use model::{MaybeAuto, CollapsibleMargins, specified, specified_or_none};
use wrapper::PseudoElementType;
use euclid::{Point2D, Rect, Size2D};
use gfx::display_list::{ClippingRegion, DisplayList};
use msg::compositor_msg::{LayerId, LayerType};
use rustc_serialize::{Encoder, Encodable};
use std::cmp::{max, min};
@ -65,6 +63,7 @@ use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
use util::geometry::{Au, MAX_AU, MAX_RECT};
use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
use util::opts;
use wrapper::PseudoElementType;
/// Information specific to floated blocks.
#[derive(Clone, RustcEncodable)]

View file

@ -26,24 +26,13 @@ use fragment::{Fragment, GeneratedContentInfo, IframeFragmentInfo};
use fragment::{InlineAbsoluteHypotheticalFragmentInfo, TableColumnFragmentInfo};
use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use fragment::{WhitespaceStrippingResult};
use gfx::display_list::OpaqueNode;
use incremental::{RECONSTRUCT_FLOW, RestyleDamage};
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, InlineFragmentNodeFlags};
use inline::{InlineFragmentNodeInfo, LAST_FRAGMENT_OF_ELEMENT};
use list_item::{ListItemFlow, ListStyleTypeContent};
use multicol::MulticolFlow;
use parallel;
use table::TableFlow;
use table_caption::TableCaptionFlow;
use table_cell::TableCellFlow;
use table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow;
use text::TextRunScanner;
use traversal::PostorderNodeMutTraversal;
use wrapper::{PseudoElementType, TextContent, ThreadSafeLayoutNode};
use gfx::display_list::OpaqueNode;
use script::dom::characterdata::CharacterDataTypeId;
use script::dom::element::ElementTypeId;
use script::dom::htmlelement::HTMLElementTypeId;
@ -58,9 +47,19 @@ use style::computed_values::content::ContentItem;
use style::computed_values::{caption_side, display, empty_cells, float, list_style_position};
use style::computed_values::{position};
use style::properties::{self, ComputedValues};
use table::TableFlow;
use table_caption::TableCaptionFlow;
use table_cell::TableCellFlow;
use table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow;
use text::TextRunScanner;
use traversal::PostorderNodeMutTraversal;
use url::Url;
use util::linked_list;
use util::opts;
use wrapper::{PseudoElementType, TextContent, ThreadSafeLayoutNode};
/// The results of flow construction for a DOM node.
#[derive(Clone)]

View file

@ -6,9 +6,8 @@
#![deny(unsafe_code)]
use css::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
use canvas_traits::CanvasMsg;
use css::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
use euclid::{Rect, Size2D};
use fnv::FnvHasher;
use gfx::display_list::OpaqueNode;

View file

@ -10,9 +10,6 @@ use animation;
use context::SharedLayoutContext;
use data::LayoutDataWrapper;
use incremental::{self, RestyleDamage};
use smallvec::SmallVec;
use wrapper::{LayoutElement, LayoutNode};
use script::dom::characterdata::CharacterDataTypeId;
use script::dom::node::NodeTypeId;
use script::layout_interface::Animation;
@ -21,6 +18,7 @@ use selectors::matching::{CommonStyleAffectingAttributeMode, CommonStyleAffectin
use selectors::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
use selectors::parser::PseudoElement;
use selectors::{Element};
use smallvec::SmallVec;
use std::borrow::ToOwned;
use std::hash::{Hash, Hasher};
use std::slice::Iter;
@ -34,6 +32,7 @@ use util::arc_ptr_eq;
use util::cache::{LRUCache, SimpleHashCache};
use util::opts;
use util::vec::ForgetfulSink;
use wrapper::{LayoutElement, LayoutNode};
pub struct ApplicableDeclarations {
pub normal: SmallVec<[DeclarationBlock; 16]>,

View file

@ -12,20 +12,15 @@
use azure::azure_hl::Color;
use block::BlockFlow;
use canvas_traits::{CanvasMsg, FromLayoutMsg};
use context::LayoutContext;
use euclid::Matrix4;
use euclid::{Point2D, Point3D, Rect, Size2D, SideOffsets2D};
use flex::FlexFlow;
use flow::{self, BaseFlow, Flow, IS_ABSOLUTELY_POSITIONED};
use flow_ref;
use fragment::{CoordinateSystem, Fragment, HAS_LAYER, IframeFragmentInfo, ImageFragmentInfo};
use fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo};
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, LAST_FRAGMENT_OF_ELEMENT};
use list_item::ListItemFlow;
use model::{self, MaybeAuto, ToGfxMatrix};
use table_cell::CollapsedBordersForCell;
use canvas_traits::{CanvasMsg, FromLayoutMsg};
use euclid::Matrix4;
use euclid::{Point2D, Point3D, Rect, Size2D, SideOffsets2D};
use gfx::display_list::{BLUR_INFLATION_FACTOR, BaseDisplayItem, BorderDisplayItem};
use gfx::display_list::{BorderRadii, BoxShadowClipMode, BoxShadowDisplayItem, ClippingRegion};
use gfx::display_list::{DisplayItem, DisplayList, DisplayItemMetadata};
@ -36,7 +31,10 @@ use gfx::display_list::{StackingContext, TextDisplayItem, TextOrientation};
use gfx::paint_task::THREAD_TINT_COLORS;
use gfx::text::glyph::CharIndex;
use gfx_traits::color;
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, LAST_FRAGMENT_OF_ELEMENT};
use ipc_channel::ipc::{self, IpcSharedMemory};
use list_item::ListItemFlow;
use model::{self, MaybeAuto, ToGfxMatrix};
use msg::compositor_msg::{ScrollPolicy, LayerId};
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
@ -59,6 +57,7 @@ use style::values::computed;
use style::values::computed::LinearGradient;
use style::values::computed::{LengthOrNone, LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirection};
use table_cell::CollapsedBordersForCell;
use url::Url;
use util::cursor::Cursor;
use util::geometry::{AU_PER_PX, Au, ZERO_POINT};

View file

@ -9,6 +9,7 @@
use block::BlockFlow;
use context::LayoutContext;
use display_list_builder::FlexFlowDisplayListBuilding;
use euclid::{Point2D, Rect};
use floats::FloatKind;
use flow;
use flow::INLINE_POSITION_IS_STATIC;
@ -18,19 +19,17 @@ use flow::mut_base;
use flow::{Flow, FlowClass, OpaqueFlow};
use flow::{HAS_LEFT_FLOATED_DESCENDANTS, HAS_RIGHT_FLOATED_DESCENDANTS};
use fragment::{Fragment, FragmentBorderBoxIterator};
use gfx::display_list::DisplayList;
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW};
use layout_debug;
use model::{IntrinsicISizes};
use style::computed_values::{flex_direction, float};
use style::properties::style_structs;
use style::values::computed::LengthOrPercentageOrAuto;
use euclid::{Point2D, Rect};
use gfx::display_list::DisplayList;
use model::MaybeAuto;
use model::{IntrinsicISizes};
use std::cmp::max;
use std::sync::Arc;
use style::computed_values::{flex_direction, float};
use style::properties::ComputedValues;
use style::properties::style_structs;
use style::values::computed::LengthOrPercentageOrAuto;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;
use util::opts;

View file

@ -28,28 +28,19 @@
use block::BlockFlow;
use context::LayoutContext;
use display_list_builder::DisplayListBuildingResult;
use euclid::{Point2D, Rect, Size2D};
use floats::Floats;
use flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
use flow_ref::{self, FlowRef, WeakFlowRef};
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use gfx::display_list::ClippingRegion;
use incremental::{self, RECONSTRUCT_FLOW, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage};
use inline::InlineFlow;
use model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
use multicol::MulticolFlow;
use parallel::FlowParallelInfo;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, TableFlow};
use table_caption::TableCaptionFlow;
use table_cell::TableCellFlow;
use table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow;
use wrapper::{PseudoElementType, ThreadSafeLayoutNode};
use euclid::{Point2D, Rect, Size2D};
use gfx::display_list::ClippingRegion;
use msg::compositor_msg::{LayerId, LayerType};
use msg::constellation_msg::ConstellationChan;
use multicol::MulticolFlow;
use parallel::FlowParallelInfo;
use rustc_serialize::{Encoder, Encodable};
use std::fmt;
use std::iter::Zip;
@ -61,8 +52,16 @@ use std::sync::atomic::Ordering;
use style::computed_values::{clear, display, empty_cells, float, position, text_align};
use style::properties::{self, ComputedValues};
use style::values::computed::LengthOrPercentageOrAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, TableFlow};
use table_caption::TableCaptionFlow;
use table_cell::TableCellFlow;
use table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow;
use util::geometry::{Au, ZERO_RECT};
use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
use wrapper::{PseudoElementType, ThreadSafeLayoutNode};
/// Virtual methods that make up a float context.
///

View file

@ -4,7 +4,6 @@
use flow::Flow;
use flow_ref::{self, FlowRef};
use std::collections::{linked_list, LinkedList};
// This needs to be reworked now that we have dynamically-sized types in Rust.

View file

@ -8,24 +8,21 @@
use canvas_traits::CanvasMsg;
use context::LayoutContext;
use euclid::{Point2D, Rect, Size2D};
use floats::ClearType;
use flow;
use flow::Flow;
use flow_ref::{self, FlowRef};
use incremental::{self, RestyleDamage};
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFragmentContext, InlineFragmentNodeInfo};
use inline::{InlineMetrics, LAST_FRAGMENT_OF_ELEMENT};
use layout_debug;
use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, specified};
use text;
use wrapper::{PseudoElementType, ThreadSafeLayoutNode};
use euclid::{Point2D, Rect, Size2D};
use gfx;
use gfx::display_list::{BLUR_INFLATION_FACTOR, OpaqueNode};
use gfx::text::glyph::CharIndex;
use gfx::text::text_run::{TextRun, TextRunSlice};
use incremental::{self, RestyleDamage};
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFragmentContext, InlineFragmentNodeInfo};
use inline::{InlineMetrics, LAST_FRAGMENT_OF_ELEMENT};
use ipc_channel::ipc::IpcSender;
use layout_debug;
use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, specified};
use msg::constellation_msg::{ConstellationChan, Msg, PipelineId, SubpageId};
use net_traits::image::base::Image;
use net_traits::image_cache_task::UsePlaceholder;
@ -43,6 +40,7 @@ use style::computed_values::{word_break, z_index};
use style::properties::ComputedValues;
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::{LengthOrPercentageOrNone};
use text;
use text::TextRunScanner;
use url::Url;
use util;
@ -50,6 +48,7 @@ use util::geometry::{Au, ZERO_POINT};
use util::logical_geometry::{LogicalRect, LogicalSize, LogicalMargin, WritingMode};
use util::range::*;
use util::str::{is_whitespace, slice_chars};
use wrapper::{PseudoElementType, ThreadSafeLayoutNode};
/// Fragments (`struct Fragment`) are the leaves of the layout tree. They cannot position
/// themselves. In general, fragments do not have a simple correspondence with CSS fragments in the

View file

@ -12,17 +12,16 @@ use context::LayoutContext;
use flow::{InorderFlowTraversal};
use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, ImmutableFlowUtils};
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use gfx::display_list::OpaqueNode;
use incremental::{self, RESOLVE_GENERATED_CONTENT};
use smallvec::SmallVec;
use text::TextRunScanner;
use wrapper::PseudoElementType;
use gfx::display_list::OpaqueNode;
use std::collections::{LinkedList, HashMap};
use std::sync::Arc;
use style::computed_values::content::ContentItem;
use style::computed_values::{display, list_style_type};
use style::properties::ComputedValues;
use text::TextRunScanner;
use wrapper::PseudoElementType;
// Decimal styles per CSS-COUNTER-STYLES § 6.1:
static DECIMAL: [char; 10] = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ];

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, IS_ABSOLUTELY_POSITIONED};
use std::fmt;
use std::sync::Arc;
use style::computed_values::float;

View file

@ -7,21 +7,18 @@
use block::{AbsoluteAssignBSizesTraversal, AbsoluteStoreOverflowTraversal};
use context::LayoutContext;
use display_list_builder::{FragmentDisplayListBuilding, InlineFlowDisplayListBuilding};
use euclid::{Point2D, Rect, Size2D};
use floats::{FloatKind, Floats, PlacementInfo};
use flow::{MutableFlowUtils, EarlyAbsolutePositionInfo, OpaqueFlow};
use flow::{self, BaseFlow, FlowClass, Flow, ForceNonfloatedFlag, IS_ABSOLUTELY_POSITIONED};
use flow_ref;
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW, RESOLVE_GENERATED_CONTENT};
use layout_debug;
use model::IntrinsicISizesContribution;
use text;
use wrapper::PseudoElementType;
use euclid::{Point2D, Rect, Size2D};
use gfx::display_list::OpaqueNode;
use gfx::font::FontMetrics;
use gfx::font_context::FontContext;
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW, RESOLVE_GENERATED_CONTENT};
use layout_debug;
use model::IntrinsicISizesContribution;
use std::cmp::max;
use std::collections::VecDeque;
use std::fmt;
@ -31,11 +28,13 @@ use std::sync::Arc;
use style::computed_values::{display, overflow_x, position, text_align, text_justify};
use style::computed_values::{text_overflow, vertical_align, white_space};
use style::properties::ComputedValues;
use text;
use unicode_bidi;
use util;
use util::geometry::{Au, MAX_AU, ZERO_RECT};
use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
use util::range::{Range, RangeIndex};
use wrapper::PseudoElementType;
// From gfxFontConstants.h in Firefox
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;

View file

@ -10,7 +10,6 @@
use flow;
use flow_ref::FlowRef;
use rustc_serialize::json;
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::fs::File;

View file

@ -8,26 +8,13 @@
#![allow(unsafe_code)]
use animation;
use azure::azure::AzColor;
use canvas_traits::CanvasMsg;
use construct::ConstructionResult;
use context::{SharedLayoutContext, heap_size_of_local_context};
use cssparser::ToCss;
use data::LayoutDataWrapper;
use display_list_builder::ToGfxColor;
use flow::{self, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils};
use flow_ref::{self, FlowRef};
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT};
use layout_debug;
use opaque_node::OpaqueNodeMethods;
use parallel::{self, WorkQueueData};
use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request};
use query::{MarginPadding, MarginRetrievingFragmentBorderBoxIterator, PositionProperty};
use query::{PositionRetrievingFragmentBorderBoxIterator, Side};
use sequential;
use wrapper::LayoutNode;
use azure::azure::AzColor;
use canvas_traits::CanvasMsg;
use encoding::EncodingRef;
use encoding::all::UTF_8;
use euclid::Matrix4;
@ -35,14 +22,19 @@ use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::scale_factor::ScaleFactor;
use euclid::size::Size2D;
use flow::{self, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils};
use flow_ref::{self, FlowRef};
use fnv::FnvHasher;
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use gfx::display_list::StackingContext;
use gfx::display_list::{ClippingRegion, DisplayList, OpaqueNode};
use gfx::font_cache_task::FontCacheTask;
use gfx::paint_task::{LayoutToPaintMsg, PaintLayer};
use gfx_traits::color;
use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layout_debug;
use layout_traits::LayoutTaskFactory;
use log;
use msg::compositor_msg::{Epoch, ScrollPolicy, LayerId};
@ -50,9 +42,14 @@ use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineExitType, PipelineId};
use net_traits::image_cache_task::{ImageCacheTask, ImageCacheResult, ImageCacheChan};
use net_traits::{load_bytes_iter, PendingAsyncLoad};
use opaque_node::OpaqueNodeMethods;
use parallel::{self, WorkQueueData};
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
use profile_traits::time::{self, ProfilerMetadata, profile};
use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request};
use query::{MarginPadding, MarginRetrievingFragmentBorderBoxIterator, PositionProperty};
use query::{PositionRetrievingFragmentBorderBoxIterator, Side};
use script::dom::bindings::js::LayoutJS;
use script::dom::node::{LayoutData, Node};
use script::layout_interface::Animation;
@ -62,6 +59,7 @@ use script::layout_interface::{ScriptLayoutChan, ScriptReflow, TrustedNodeAddres
use script_traits::StylesheetLoadResponder;
use script_traits::{ConstellationControlMsg, LayoutControlMsg, OpaqueScriptLayoutChannel};
use selectors::parser::PseudoElement;
use sequential;
use serde_json;
use std::borrow::ToOwned;
use std::cell::Cell;
@ -87,6 +85,7 @@ use util::opts;
use util::task::spawn_named_with_send_on_failure;
use util::task_state;
use util::workqueue::WorkQueue;
use wrapper::LayoutNode;
use wrapper::ThreadSafeLayoutNode;
/// The number of screens of data we're allowed to generate display lists for in each direction.

View file

@ -10,19 +10,18 @@
use block::BlockFlow;
use context::LayoutContext;
use display_list_builder::ListItemFlowDisplayListBuilding;
use euclid::{Point2D, Rect};
use floats::FloatKind;
use flow::{Flow, FlowClass, OpaqueFlow};
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
use generated_content;
use gfx::display_list::DisplayList;
use incremental::RESOLVE_GENERATED_CONTENT;
use inline::InlineMetrics;
use text;
use euclid::{Point2D, Rect};
use gfx::display_list::DisplayList;
use std::sync::Arc;
use style::computed_values::{list_style_type, position};
use style::properties::ComputedValues;
use text;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;
use util::opts;

View file

@ -6,9 +6,8 @@
#![deny(unsafe_code)]
use fragment::Fragment;
use euclid::{Matrix4, SideOffsets2D, Size2D};
use fragment::Fragment;
use std::cmp::{max, min};
use std::fmt;
use style::computed_values::transform::ComputedMatrix;

View file

@ -8,11 +8,10 @@
use block::BlockFlow;
use context::LayoutContext;
use euclid::{Point2D, Rect};
use floats::FloatKind;
use flow::{FlowClass, Flow, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use euclid::{Point2D, Rect};
use std::fmt;
use std::sync::Arc;
use style::properties::ComputedValues;

View file

@ -12,19 +12,18 @@ use context::{LayoutContext, SharedLayoutContext};
use flow;
use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal};
use flow_ref::{self, FlowRef};
use profile_traits::time::{self, ProfilerMetadata, profile};
use std::mem;
use std::sync::atomic::{AtomicIsize, Ordering};
use traversal::PostorderNodeMutTraversal;
use traversal::{BubbleISizes, AssignISizes, AssignBSizesAndStoreOverflow};
use traversal::{ComputeAbsolutePositions, BuildDisplayList};
use traversal::{PreorderDomTraversal, PostorderDomTraversal};
use traversal::{RecalcStyleForNode, ConstructFlows};
use wrapper::UnsafeLayoutNode;
use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode};
use profile_traits::time::{self, ProfilerMetadata, profile};
use std::mem;
use std::sync::atomic::{AtomicIsize, Ordering};
use util::opts;
use util::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
use wrapper::UnsafeLayoutNode;
use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode};
const CHUNK_SIZE: usize = 64;

View file

@ -4,13 +4,12 @@
//! Utilities for querying the layout, as needed by the layout task.
use layout_task::{LayoutTaskData, RWGuard};
use euclid::point::Point2D;
use euclid::rect::Rect;
use flow_ref::FlowRef;
use fragment::{Fragment, FragmentBorderBoxIterator};
use gfx::display_list::{DisplayItemMetadata, OpaqueNode};
use layout_task::{LayoutTaskData, RWGuard};
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
use opaque_node::OpaqueNodeMethods;
@ -18,7 +17,6 @@ use script::layout_interface::{ContentBoxResponse, ContentBoxesResponse, NodeGeo
use script::layout_interface::{HitTestResponse, LayoutRPC, MouseOverResponse, OffsetParentResponse};
use script::layout_interface::{ResolvedStyleResponse, ScriptLayoutChan, TrustedNodeAddress};
use sequential;
use std::sync::{Arc, Mutex};
use util::cursor::Cursor;
use util::geometry::Au;

View file

@ -5,6 +5,7 @@
//! Implements sequential traversals over the DOM and flow trees.
use context::{LayoutContext, SharedLayoutContext};
use euclid::point::Point2D;
use flow::{PostorderFlowTraversal, PreorderFlowTraversal};
use flow::{self, Flow, ImmutableFlowUtils, InorderFlowTraversal, MutableFlowUtils};
use flow_ref::{self, FlowRef};
@ -15,11 +16,9 @@ use traversal::{AssignBSizesAndStoreOverflow, AssignISizes};
use traversal::{BubbleISizes, RecalcStyleForNode, ConstructFlows};
use traversal::{ComputeAbsolutePositions, BuildDisplayList};
use traversal::{PreorderDomTraversal, PostorderDomTraversal};
use wrapper::LayoutNode;
use euclid::point::Point2D;
use util::geometry::{Au, ZERO_POINT};
use util::opts;
use wrapper::LayoutNode;
pub fn traverse_dom_preorder(root: LayoutNode,
shared_layout_context: &SharedLayoutContext) {

View file

@ -10,18 +10,14 @@ use block::{ISizeConstraintInput, ISizeConstraintSolution};
use block::{self, BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use euclid::{Point2D, Rect};
use flow::{IMPACTED_BY_RIGHT_FLOATS, ImmutableFlowUtils, MutableFlowUtils, OpaqueFlow};
use flow::{self, EarlyAbsolutePositionInfo, Flow, FlowClass, IMPACTED_BY_LEFT_FLOATS};
use fragment::{Fragment, FragmentBorderBoxIterator};
use gfx::display_list::DisplayList;
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW};
use layout_debug;
use model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
use table_row::{TableRowFlow};
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use table_wrapper::TableLayout;
use euclid::{Point2D, Rect};
use gfx::display_list::DisplayList;
use std::cmp;
use std::fmt;
use std::sync::Arc;
@ -29,6 +25,9 @@ use style::computed_values::{border_collapse, border_spacing, table_layout};
use style::properties::ComputedValues;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use table_row::{TableRowFlow};
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use table_wrapper::TableLayout;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;

View file

@ -8,10 +8,9 @@
use block::BlockFlow;
use context::LayoutContext;
use euclid::{Point2D, Rect};
use flow::{FlowClass, Flow, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use euclid::{Point2D, Rect};
use std::fmt;
use std::sync::Arc;
use style::properties::ComputedValues;

View file

@ -8,25 +8,24 @@
use block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
use context::LayoutContext;
use cssparser::Color;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use flow::{Flow, FlowClass, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use gfx::display_list::DisplayList;
use layout_debug;
use model::MaybeAuto;
use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
use wrapper::ThreadSafeLayoutNode;
use cssparser::Color;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use gfx::display_list::DisplayList;
use std::fmt;
use std::sync::Arc;
use style::computed_values::{border_collapse, border_top_style};
use style::legacy::UnsignedIntegerAttribute;
use style::properties::ComputedValues;
use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
use util::geometry::Au;
use util::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
use wrapper::ThreadSafeLayoutNode;
/// A table formatting context.
#[derive(RustcEncodable)]

View file

@ -7,11 +7,10 @@
#![deny(unsafe_code)]
use context::LayoutContext;
use euclid::{Point2D, Rect};
use flow::{BaseFlow, FlowClass, Flow, ForceNonfloatedFlag, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use layout_debug;
use euclid::{Point2D, Rect};
use std::cmp::max;
use std::fmt;
use std::sync::Arc;

View file

@ -8,18 +8,15 @@
use block::{BlockFlow, ISizeAndMarginsComputer};
use context::LayoutContext;
use cssparser::{Color, RGBA};
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use euclid::{Point2D, Rect};
use flow::{self, EarlyAbsolutePositionInfo, FlowClass, Flow, ImmutableFlowUtils, OpaqueFlow};
use flow_list::MutFlowListIterator;
use fragment::{Fragment, FragmentBorderBoxIterator};
use gfx::display_list::DisplayList;
use layout_debug;
use model::MaybeAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use table_cell::{CollapsedBordersForCell, TableCellFlow};
use cssparser::{Color, RGBA};
use euclid::{Point2D, Rect};
use gfx::display_list::DisplayList;
use rustc_serialize::{Encoder, Encodable};
use std::cmp::max;
use std::fmt;
@ -28,6 +25,8 @@ use std::sync::Arc;
use style::computed_values::{border_collapse, border_spacing, border_top_style};
use style::properties::ComputedValues;
use style::values::computed::LengthOrPercentageOrAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use table_cell::{CollapsedBordersForCell, TableCellFlow};
use util::geometry::Au;
use util::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};

View file

@ -8,19 +8,18 @@
use block::{BlockFlow, ISizeAndMarginsComputer};
use context::LayoutContext;
use euclid::{Point2D, Rect};
use flow::{FlowClass, Flow, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use layout_debug;
use style::computed_values::{border_collapse, border_spacing};
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
use table_row::{self, CollapsedBordersForRow};
use euclid::{Point2D, Rect};
use rustc_serialize::{Encoder, Encodable};
use std::fmt;
use std::iter::{IntoIterator, Iterator, Peekable};
use std::sync::Arc;
use style::computed_values::{border_collapse, border_spacing};
use style::properties::ComputedValues;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
use table_row::{self, CollapsedBordersForRow};
use util::geometry::Au;
use util::logical_geometry::{LogicalSize, WritingMode};

View file

@ -16,15 +16,12 @@
use block::{BlockFlow, FloatNonReplaced, AbsoluteNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput};
use block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
use context::LayoutContext;
use euclid::{Point2D, Rect};
use floats::FloatKind;
use flow::{FlowClass, Flow, ImmutableFlowUtils};
use flow::{IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS, INLINE_POSITION_IS_STATIC, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use model::MaybeAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
use table_row;
use euclid::{Point2D, Rect};
use std::cmp::{max, min};
use std::fmt;
use std::ops::Add;
@ -33,6 +30,8 @@ use style::computed_values::{border_collapse, table_layout};
use style::properties::ComputedValues;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
use table_row;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;

View file

@ -7,14 +7,13 @@
#![deny(unsafe_code)]
use fragment::{Fragment, SpecificFragmentInfo, ScannedTextFragmentInfo, UnscannedTextFragmentInfo};
use inline::InlineFragments;
use gfx::font::{DISABLE_KERNING_SHAPING_FLAG, FontMetrics, IGNORE_LIGATURES_SHAPING_FLAG};
use gfx::font::{RTL_FLAG, RunMetrics, ShapingFlags, ShapingOptions};
use gfx::font_context::FontContext;
use gfx::text::glyph::CharIndex;
use gfx::text::text_run::TextRun;
use gfx::text::util::{self, CompressionMode};
use inline::InlineFragments;
use std::borrow::ToOwned;
use std::collections::LinkedList;
use std::mem;

View file

@ -11,15 +11,13 @@ use flow::{MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal};
use flow::{self, Flow};
use incremental::{self, BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage};
use script::layout_interface::ReflowGoal;
use wrapper::{ThreadSafeLayoutNode, UnsafeLayoutNode};
use wrapper::{layout_node_to_unsafe_layout_node, LayoutNode};
use selectors::bloom::BloomFilter;
use util::opts;
use util::tid::tid;
use std::cell::RefCell;
use std::mem;
use util::opts;
use util::tid::tid;
use wrapper::{ThreadSafeLayoutNode, UnsafeLayoutNode};
use wrapper::{layout_node_to_unsafe_layout_node, LayoutNode};
/// Every time we do another layout, the old bloom filters are invalid. This is
/// detected by ticking a generation number every layout.

View file

@ -33,13 +33,12 @@
use canvas_traits::CanvasMsg;
use context::SharedLayoutContext;
use data::{LayoutDataFlags, LayoutDataWrapper, PrivateLayoutData};
use incremental::RestyleDamage;
use opaque_node::OpaqueNodeMethods;
use gfx::display_list::OpaqueNode;
use gfx::text::glyph::CharIndex;
use incremental::RestyleDamage;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{PipelineId, SubpageId};
use opaque_node::OpaqueNodeMethods;
use script::dom::attr::AttrValue;
use script::dom::bindings::codegen::InheritTypes::{CharacterDataCast, ElementCast};
use script::dom::bindings::codegen::InheritTypes::{HTMLIFrameElementCast, HTMLCanvasElementCast};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use azure::azure_hl::Color;
use constellation_msg::PipelineId;
use constellation_msg::{Key, KeyState, KeyModifiers};
use euclid::Matrix4;
use euclid::{Size2D, Point2D, Rect};
@ -12,8 +13,6 @@ use layers::platform::surface::NativeDisplay;
use std::fmt;
use std::fmt::{Formatter, Debug};
use constellation_msg::PipelineId;
/// A newtype struct for denoting the age of messages; prevents race conditions.
#[derive(PartialEq, Eq, Debug, Copy, Clone, PartialOrd, Ord, Deserialize, Serialize)]
pub struct Epoch(pub u32);

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use constellation_msg::{PipelineId, SubpageId};
use ipc_channel::ipc::IpcSender;
use rustc_serialize::json::{Json, ToJson};
use url::Url;

View file

@ -3,19 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use file_loader;
use hyper::header::ContentType;
use hyper::http::RawStatus;
use hyper::mime::{Mime, TopLevel, SubLevel};
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::Done;
use net_traits::{LoadData, Metadata, LoadConsumer};
use resource_task::start_sending;
use hyper::header::ContentType;
use hyper::http::RawStatus;
use hyper::mime::{Mime, TopLevel, SubLevel};
use url::Url;
use util::resource_files::resources_dir_path;
use std::fs::PathExt;
use std::sync::Arc;
use url::Url;
use util::resource_files::resources_dir_path;
pub fn factory(mut load_data: LoadData, start_chan: LoadConsumer, classifier: Arc<MIMEClassifier>) {
match load_data.url.non_relative_scheme_data().unwrap() {

View file

@ -5,10 +5,9 @@
//! Implementation of cookie creation and matching as specified by
//! http://tools.ietf.org/html/rfc6265
use cookie_rs;
use net_traits::CookieSource;
use pub_domains::PUB_DOMAINS;
use cookie_rs;
use std::borrow::ToOwned;
use std::net::{Ipv4Addr, Ipv6Addr};
use time::{Tm, now, at, Duration};

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use hyper::mime::Mime;
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::{Payload, Done};
use net_traits::{LoadData, Metadata, LoadConsumer};
use resource_task::start_sending;
use rustc_serialize::base64::FromBase64;
use hyper::mime::Mime;
use std::sync::Arc;
use url::SchemeData;
use url::percent_encoding::percent_decode;

View file

@ -6,7 +6,6 @@ use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::{Payload, Done};
use net_traits::{LoadData, Metadata, LoadConsumer};
use resource_task::{start_sending, start_sending_sniffed, ProgressSender};
use std::borrow::ToOwned;
use std::error::Error;
use std::fs::File;

View file

@ -4,11 +4,9 @@
use net_traits::{IncludeSubdomains, IPV4_REGEX, IPV6_REGEX};
use rustc_serialize::json::{decode};
use std::str::{from_utf8};
use time;
use url::Url;
use std::str::{from_utf8};
use util::resource_files::read_resource_file;
#[derive(RustcDecodable, RustcEncodable, Clone)]

View file

@ -3,13 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use net_traits::storage_task::{StorageTask, StorageTaskMsg, StorageType};
use std::borrow::ToOwned;
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::sync::mpsc::channel;
use url::Url;
use net_traits::storage_task::{StorageTask, StorageTaskMsg, StorageType};
use util::str::DOMString;
use util::task::spawn_named;

View file

@ -7,7 +7,6 @@ use std::env;
use std::fs::File;
use std::io::{BufReader, Read};
use url::Url;
use {IPV4_REGEX, IPV6_REGEX};
static mut HOST_TABLE: Option<*mut HashMap<String, String>> = None;

View file

@ -35,11 +35,10 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::{PipelineId};
use regex::Regex;
use serde::{Deserializer, Serializer};
use std::thread;
use url::Url;
use util::mem::HeapSizeOf;
use std::thread;
pub mod hosts;
pub mod image_cache_task;
pub mod net_error_list;

View file

@ -4,7 +4,6 @@
use ipc_channel::ipc::IpcSender;
use url::Url;
use util::str::DOMString;
#[derive(Copy, Clone, Deserialize, Serialize, HeapSizeOf)]

View file

@ -27,7 +27,6 @@ extern crate clippy;
use rustc::lint::LintPassObject;
use rustc::plugin::Registry;
use syntax::ext::base::*;
use syntax::feature_gate::AttributeType::Whitelisted;
use syntax::parse::token::intern;

View file

@ -6,7 +6,6 @@ use rustc::lint::{Context, LintPass, LintArray, Level};
use rustc::middle::def;
use rustc::middle::def_id::DefId;
use syntax::ast;
use utils::match_lang_ty;
declare_lint!(INHERITANCE_INTEGRITY, Deny,

View file

@ -6,7 +6,6 @@ use rustc::ast_map;
use rustc::lint::Context;
use rustc::middle::def;
use rustc::middle::def_id::DefId;
use syntax::ast;
use syntax::ast::{TyPath, Path, AngleBracketedParameters, PathSegment, Ty};
use syntax::attr::mark_used;

View file

@ -8,7 +8,6 @@
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
use std::marker::Send;
use std::sync::mpsc::Sender;

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use ipc_channel::ipc;
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
use ipc_channel::ipc;
use std::borrow::ToOwned;
use std::sync::mpsc::channel;

View file

@ -9,17 +9,6 @@
//! This library will eventually become the core of the Fetch crate
//! with CORSRequest being expanded into FetchRequest (etc)
use net_traits::{AsyncResponseListener, ResponseAction, Metadata};
use network_listener::{NetworkListener, PreInvoke};
use script_task::ScriptChan;
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::sync::{Arc, Mutex};
use time;
use time::{now, Timespec};
use hyper::client::Request;
use hyper::header::{AccessControlMaxAge, AccessControlAllowOrigin};
use hyper::header::{AccessControlRequestHeaders, AccessControlAllowHeaders};
@ -29,7 +18,15 @@ use hyper::header::{Headers, HeaderView};
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper::status::StatusClass::Success;
use net_traits::{AsyncResponseListener, ResponseAction, Metadata};
use network_listener::{NetworkListener, PreInvoke};
use script_task::ScriptChan;
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::sync::{Arc, Mutex};
use time;
use time::{now, Timespec};
use unicase::UniCase;
use url::{SchemeData, Url};
use util::mem::HeapSizeOf;

View file

@ -9,7 +9,6 @@ use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventtarget::EventTarget;
use dom::mouseevent::MouseEvent;
use dom::node::window_from_node;
use std::borrow::ToOwned;
/// Trait for elements with defined activation behavior

View file

@ -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 devtools_traits::AttrInfo;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
use dom::bindings::codegen::InheritTypes::NodeCast;
@ -12,16 +13,12 @@ use dom::bindings::utils::{Reflector, reflect_dom_object};
use dom::element::{AttributeMutation, Element};
use dom::virtualmethods::vtable_for;
use dom::window::Window;
use devtools_traits::AttrInfo;
use util::str::{DOMString, parse_unsigned_integer, split_html_space_chars, str_join};
use string_cache::{Atom, Namespace};
use std::borrow::ToOwned;
use std::cell::Ref;
use std::mem;
use std::ops::Deref;
use string_cache::{Atom, Namespace};
use util::str::{DOMString, parse_unsigned_integer, split_html_space_chars, str_join};
#[derive(JSTraceable, PartialEq, Clone, HeapSizeOf)]
pub enum AttrValue {

View file

@ -16,7 +16,6 @@ use js::jsapi::{JS_GetProperty, JS_IsExceptionPending, JS_ReportPendingException
use js::jsapi::{JS_SaveFrameChain, JS_RestoreFrameChain};
use js::jsapi::{RootedObject, RootedValue, MutableHandleObject, Heap};
use js::jsval::{JSVal, UndefinedValue};
use std::default::Default;
use std::ffi::CString;
use std::intrinsics::return_address;

View file

@ -6,12 +6,10 @@
use dom::bindings::trace::JSTraceable;
use js::jsapi::{JSTracer};
use std::cell::{BorrowState, RefCell, Ref, RefMut};
use util::task_state;
use util::task_state::SCRIPT;
use std::cell::{BorrowState, RefCell, Ref, RefMut};
/// A mutable field in the DOM.
///
/// This extends the API of `core::cell::RefCell` to allow unsafe access in

View file

@ -32,14 +32,13 @@
//! | sequences | `Vec<T>` |
//! | union types | `T` |
use core::nonzero::NonZero;
use dom::bindings::codegen::PrototypeList;
use dom::bindings::error::throw_type_error;
use dom::bindings::js::Root;
use dom::bindings::num::Finite;
use dom::bindings::str::{ByteString, USVString};
use dom::bindings::utils::{Reflectable, Reflector, DOMClass};
use util::str::DOMString;
use js;
use js::glue::{GetProxyPrivate, IsWrapper, RUST_JS_NumberValue};
use js::glue::{RUST_JSID_IS_STRING, RUST_JSID_TO_STRING, UnwrapObject};
@ -54,8 +53,6 @@ use js::jsval::{UndefinedValue, NullValue, BooleanValue, Int32Value, UInt32Value
use js::rust::{ToUint16, ToNumber, ToBoolean, ToString};
use js::rust::{ToUint32, ToInt32};
use js::rust::{ToUint64, ToInt64};
use core::nonzero::NonZero;
use libc;
use num::Float;
use num::traits::{Bounded, Zero};
@ -64,6 +61,7 @@ use std::char;
use std::ptr;
use std::rc::Rc;
use std::slice;
use util::str::DOMString;
trait As<O>: Copy {
fn cast(self) -> O;

View file

@ -8,21 +8,18 @@ use dom::bindings::codegen::PrototypeList::proto_id_to_name;
use dom::bindings::conversions::ToJSValConvertible;
use dom::bindings::global::GlobalRef;
use dom::domexception::{DOMException, DOMErrorName};
use util::mem::HeapSizeOf;
use util::str::DOMString;
use js::jsapi::JSAutoCompartment;
use js::jsapi::{JSContext, JSObject, RootedValue};
use js::jsapi::{JS_IsExceptionPending, JS_SetPendingException, JS_ReportPendingException};
use js::jsapi::{JS_ReportErrorNumber1, JSErrorFormatString, JSExnType};
use js::jsapi::{JS_SaveFrameChain, JS_RestoreFrameChain};
use js::jsval::UndefinedValue;
use libc;
use std::ffi::CString;
use std::mem;
use std::ptr;
use util::mem::HeapSizeOf;
use util::str::DOMString;
/// DOM exceptions that can be thrown by a native DOM method.
#[derive(Debug, Clone, HeapSizeOf)]

View file

@ -14,18 +14,15 @@ use dom::bindings::js::{JS, Root};
use dom::bindings::utils::{Reflectable, Reflector};
use dom::window::{self, ScriptHelpers};
use dom::workerglobalscope::WorkerGlobalScope;
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
use net_traits::ResourceTask;
use profile_traits::mem;
use ipc_channel::ipc::IpcSender;
use js::jsapi::{GetGlobalForObjectCrossCompartment};
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
use net_traits::ResourceTask;
use profile_traits::mem;
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
use url::Url;
use util::mem::HeapSizeOf;
/// A freely-copyable reference to a rooted global object.

View file

@ -23,6 +23,7 @@
//! originating `Root<T>`.
//!
use core::nonzero::NonZero;
use dom::bindings::trace::JSTraceable;
use dom::bindings::trace::trace_reflector;
use dom::bindings::utils::{Reflector, Reflectable};
@ -31,12 +32,10 @@ use js::jsapi::{JSObject, Heap, JSTracer};
use js::jsval::JSVal;
use layout_interface::TrustedNodeAddress;
use script_task::STACK_ROOTS;
use util::mem::HeapSizeOf;
use core::nonzero::NonZero;
use std::cell::{Cell, UnsafeCell};
use std::default::Default;
use std::ops::Deref;
use util::mem::HeapSizeOf;
/// A traced reference to a DOM object. Must only be used as a field in other
/// DOM objects.

View file

@ -20,7 +20,6 @@ use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
use js::jsval::ObjectValue;
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY};
use js::{JSTrue, JSFalse};
use libc;
use std::mem;
use std::ptr;

View file

@ -22,15 +22,13 @@
//! is rooted when a hashmap entry is first created, and unrooted when the hashmap entry
//! is removed.
use core::nonzero::NonZero;
use dom::bindings::js::Root;
use dom::bindings::trace::trace_reflector;
use dom::bindings::utils::{Reflector, Reflectable};
use script_task::{ScriptChan, CommonScriptMsg};
use js::jsapi::{JSContext, JSTracer};
use core::nonzero::NonZero;
use libc;
use script_task::{ScriptChan, CommonScriptMsg};
use std::cell::RefCell;
use std::collections::hash_map::Entry::{Vacant, Occupied};
use std::collections::hash_map::HashMap;

View file

@ -10,7 +10,6 @@ use std::hash::{Hash, Hasher};
use std::ops;
use std::str;
use std::str::FromStr;
use util::mem::HeapSizeOf;
/// Encapsulates the IDL `ByteString` type.

View file

@ -8,13 +8,11 @@
use dom::bindings::error::Error::DataClone;
use dom::bindings::error::Fallible;
use dom::bindings::global::GlobalRef;
use js::glue::JS_STRUCTURED_CLONE_VERSION;
use js::jsapi::JSContext;
use js::jsapi::JS_ReadStructuredClone;
use js::jsapi::{HandleValue, MutableHandleValue};
use js::jsapi::{JS_WriteStructuredClone, JS_ClearPendingException};
use libc::size_t;
use std::ptr;

View file

@ -29,15 +29,13 @@
//! The `no_jsmanaged_fields!()` macro adds an empty implementation of `JSTraceable` to
//! a datatype.
use dom::bindings::js::{JS, Root};
use dom::bindings::refcounted::Trusted;
use dom::bindings::utils::{Reflectable, Reflector, WindowProxyHandler};
use script_task::ScriptChan;
use canvas_traits::WebGLError;
use canvas_traits::{CanvasGradientStop, LinearGradientStyle, RadialGradientStyle};
use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending, RepetitionStyle};
use cssparser::RGBA;
use dom::bindings::js::{JS, Root};
use dom::bindings::refcounted::Trusted;
use dom::bindings::utils::{Reflectable, Reflector, WindowProxyHandler};
use encoding::types::EncodingRef;
use euclid::matrix2d::Matrix2D;
use euclid::rect::Rect;
@ -59,6 +57,7 @@ use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
use net_traits::storage_task::StorageType;
use profile_traits::mem::ProfilerChan as MemProfilerChan;
use profile_traits::time::ProfilerChan as TimeProfilerChan;
use script_task::ScriptChan;
use script_traits::UntrustedNodeAddress;
use selectors::parser::PseudoElement;
use serde::{Serialize, Deserialize};

View file

@ -17,9 +17,6 @@ use dom::bindings::trace::trace_object;
use dom::browsercontext;
use dom::eventtarget::EventTargetTypeId;
use dom::window;
use util::mem::HeapSizeOf;
use util::str::DOMString;
use js;
use js::glue::{CallJitMethodOp, CallJitGetterOp, CallJitSetterOp, IsWrapper};
use js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO, RUST_JSID_IS_INT};
@ -61,6 +58,8 @@ use std::default::Default;
use std::ffi::CString;
use std::ptr;
use string_cache::{Atom, Namespace};
use util::mem::HeapSizeOf;
use util::str::DOMString;
/// Proxy handler for a WindowProxy.
#[allow(raw_pointer_derive)]

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