sort all uses

This commit is contained in:
Johann Tuffe 2015-08-20 20:47:12 +08:00
parent d3c7e31722
commit ec07178b6f
269 changed files with 903 additions and 931 deletions

View file

@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use azure::azure::{AzFloat, AzColor};
use azure::azure_hl::{DrawTarget, SurfaceFormat, BackendType, StrokeOptions, DrawOptions, Pattern};
use azure::azure_hl::{ColorPattern, PathBuilder, DrawSurfaceOptions, Filter};
use azure::azure_hl::{DrawTarget, SurfaceFormat, BackendType, StrokeOptions, DrawOptions, Pattern};
use azure::azure_hl::{JoinStyle, CapStyle, CompositionOp, AntialiasMode};
use canvas_traits::*;
use euclid::matrix2d::Matrix2D;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::size::Size2D;
use gfx_traits::color;
use ipc_channel::ipc::IpcSharedMemory;
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
use layers::platform::surface::NativeSurface;
use gfx_traits::color;
use ipc_channel::ipc::IpcSharedMemory;
use num::ToPrimitive;
use util::opts;
use util::task::spawn_named;

View file

@ -4,21 +4,21 @@
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, CanvasCommonMsg, FromLayoutMsg, FromPaintMsg};
use canvas_traits::{WebGLShaderParameter, WebGLFramebufferBindingRequest};
use euclid::size::Size2D;
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;
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::vec::byte_swap;
use layers::platform::surface::NativeSurface;
use offscreen_gl_context::{GLContext, GLContextAttributes, ColorAttachmentType};
use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory};
use ipc_channel::router::ROUTER;
pub struct WebGLPaintTask {
size: Size2D<i32>,

View file

@ -26,6 +26,7 @@ use azure::azure_hl::{DrawTarget, Pattern, ColorPattern};
use azure::azure_hl::{GradientStop, LinearGradientPattern, RadialGradientPattern, ExtendMode};
use azure::azure_hl::{JoinStyle, CapStyle, CompositionOp};
use azure::azure_hl::{SurfacePattern, SurfaceFormat};
use core::nonzero::NonZero;
use cssparser::RGBA;
use euclid::matrix2d::Matrix2D;
use euclid::point::Point2D;
@ -33,11 +34,10 @@ use euclid::rect::Rect;
use euclid::size::Size2D;
use gfx_traits::color;
use ipc_channel::ipc::{IpcSender, IpcSharedMemory};
use std::sync::mpsc::Sender;
use layers::platform::surface::NativeSurface;
use offscreen_gl_context::GLContextAttributes;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use core::nonzero::NonZero;
use std::sync::mpsc::Sender;
use util::mem::HeapSizeOf;
#[derive(Clone, Deserialize, Serialize)]

View file

@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use surface_map::SurfaceMap;
use compositor_layer::{CompositorData, CompositorLayer, WantsScrollEventsFlag};
use compositor_task::{CompositorEventListener, CompositorProxy, CompositorReceiver, Msg};
use constellation::SendableFrameTree;
use pipeline::CompositionPipeline;
use scrolling::ScrollingTimerProxy;
use surface_map::SurfaceMap;
use windowing;
use windowing::{MouseWindowEvent, WindowEvent, WindowMethods, WindowNavigateMsg};
@ -16,17 +16,17 @@ use euclid::point::{Point2D, TypedPoint2D};
use euclid::rect::{Rect, TypedRect};
use euclid::scale_factor::ScaleFactor;
use euclid::size::{Size2D, TypedSize2D};
use gfx_traits::color;
use gfx::paint_task::{ChromeToPaintMsg, PaintRequest};
use gleam::gl::types::{GLint, GLsizei};
use gfx_traits::color;
use gleam::gl;
use gleam::gl::types::{GLint, GLsizei};
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
use layers::geometry::{DevicePixel, LayerPixel};
use layers::layers::{BufferRequest, Layer, LayerBuffer, LayerBufferSet};
use layers::platform::surface::NativeDisplay;
use layers::rendergl::RenderContext;
use layers::rendergl;
use layers::rendergl::RenderContext;
use layers::scene::Scene;
use layout_traits::LayoutControlChan;
use msg::compositor_msg::{Epoch, FrameTreeId, LayerId, LayerKind};

View file

@ -8,15 +8,15 @@ use windowing::{MouseWindowEvent, WindowMethods};
use azure::azure_hl;
use euclid::length::Length;
use euclid::point::{Point2D, TypedPoint2D};
use euclid::size::TypedSize2D;
use euclid::rect::Rect;
use euclid::size::TypedSize2D;
use layers::color::Color;
use layers::geometry::LayerPixel;
use layers::layers::{Layer, LayerBufferSet};
use script_traits::CompositorEvent::{ClickEvent, MouseDownEvent, MouseMoveEvent, MouseUpEvent};
use script_traits::ConstellationControlMsg;
use msg::compositor_msg::{Epoch, LayerId, LayerProperties, ScrollPolicy};
use msg::constellation_msg::PipelineId;
use script_traits::CompositorEvent::{ClickEvent, MouseDownEvent, MouseMoveEvent, MouseUpEvent};
use script_traits::ConstellationControlMsg;
use std::rc::Rc;
#[derive(Debug)]

View file

@ -14,18 +14,18 @@ use windowing::{WindowEvent, WindowMethods};
use euclid::point::Point2D;
use euclid::rect::Rect;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use layers::platform::surface::{NativeDisplay, NativeSurface};
use layers::layers::{BufferRequest, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
use msg::compositor_msg::{Epoch, LayerId, LayerProperties, FrameTreeId};
use msg::compositor_msg::{PaintListener, ScriptToCompositorMsg};
use msg::constellation_msg::{AnimationState, ConstellationChan, PipelineId};
use msg::constellation_msg::{Key, KeyState, KeyModifiers};
use png;
use profile_traits::mem;
use profile_traits::time;
use png;
use std::sync::mpsc::{channel, Sender, Receiver};
use std::fmt::{Error, Formatter, Debug};
use std::rc::Rc;
use std::sync::mpsc::{channel, Sender, Receiver};
use style::viewport::ViewportConstraints;
use url::Url;
use util::cursor::Cursor;

View file

@ -14,29 +14,30 @@ use pipeline::{Pipeline, CompositionPipeline};
use canvas::canvas_paint_task::CanvasPaintTask;
use canvas::webgl_paint_task::WebGLPaintTask;
use canvas_traits::CanvasMsg;
use clipboard::ClipboardContext;
use compositor_task::CompositorProxy;
use compositor_task::Msg as CompositorMsg;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
use euclid::point::Point2D;
use euclid::rect::{Rect, TypedRect};
use euclid::size::Size2D;
use euclid::scale_factor::ScaleFactor;
use euclid::size::Size2D;
use gfx::font_cache_task::FontCacheTask;
use ipc_channel::ipc::{self, IpcSender};
use layout_traits::{LayoutControlChan, LayoutTaskFactory};
use msg::compositor_msg::{Epoch, LayerId};
use msg::constellation_msg::AnimationState;
use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::WebDriverCommandMsg;
use msg::constellation_msg::{FrameId, PipelineExitType, PipelineId};
use msg::constellation_msg::{IFrameSandboxState, MozBrowserEvent, NavigationDirection};
use msg::constellation_msg::{Key, KeyState, KeyModifiers, LoadData};
use msg::constellation_msg::{SubpageId, WindowSizeData};
use msg::constellation_msg::{self, ConstellationChan, Failure};
use msg::constellation_msg::WebDriverCommandMsg;
use msg::webdriver_msg;
use net_traits::{self, ResourceTask};
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 profile_traits::mem;
use profile_traits::time;
@ -55,7 +56,6 @@ use util::cursor::Cursor;
use util::geometry::PagePx;
use util::opts;
use util::task::spawn_named;
use clipboard::ClipboardContext;
/// Maintains the pipelines and navigation context and grants permission to composite.
///

View file

@ -11,18 +11,18 @@ use compositor_task;
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
use euclid::rect::{TypedRect};
use euclid::scale_factor::ScaleFactor;
use gfx::paint_task::{ChromeToPaintMsg, LayoutToPaintMsg, PaintTask};
use gfx::font_cache_task::FontCacheTask;
use gfx::paint_task::{ChromeToPaintMsg, LayoutToPaintMsg, PaintTask};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layers::geometry::DevicePixel;
use msg::constellation_msg::{ConstellationChan, Failure, FrameId, PipelineId, SubpageId};
use msg::constellation_msg::{LoadData, WindowSizeData, PipelineExitType, MozBrowserEvent};
use profile_traits::mem as profile_mem;
use profile_traits::time;
use net_traits::ResourceTask;
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 std::any::Any;
use std::mem;
use std::sync::mpsc::{Receiver, Sender, channel};

View file

@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use euclid::size::Size2D;
use layers::platform::surface::{NativeDisplay, NativeSurface};
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::hash::{Hash, Hasher};
/// This is a struct used to store surfaces when they are not in use.

View file

@ -14,11 +14,11 @@ use layers::platform::surface::NativeDisplay;
use msg::constellation_msg::{Key, KeyState, KeyModifiers};
use net_traits::net_error_list::NetError;
use script_traits::MouseButton;
use std::fmt::{Error, Formatter, Debug};
use std::rc::Rc;
use url::Url;
use util::cursor::Cursor;
use util::geometry::ScreenPx;
use std::fmt::{Error, Formatter, Debug};
use std::rc::Rc;
#[derive(Clone)]
pub enum MouseWindowEvent {

View file

@ -7,8 +7,8 @@
use devtools_traits::PreciseTime;
use rustc_serialize::json;
use std::any::{Any, TypeId};
use std::collections::HashMap;
use std::cell::{Cell, RefCell};
use std::collections::HashMap;
use std::marker::Reflect;
use std::mem::{replace, transmute};
use std::net::TcpStream;

View file

@ -11,16 +11,16 @@ 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 devtools_traits::CachedConsoleMessage;
use msg::constellation_msg::PipelineId;
use std::collections::BTreeMap;
use core::cell::RefCell;
use ipc_channel::ipc::{self, IpcSender};
use rustc_serialize::json::{self, Json, ToJson};
use std::collections::BTreeMap;
use std::net::TcpStream;
use std::sync::mpsc::channel;

View file

@ -8,10 +8,10 @@ use std::mem;
use std::net::TcpStream;
use time::precise_time_ns;
use msg::constellation_msg::PipelineId;
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::timeline::HighResolutionStamp;
use devtools_traits::DevtoolScriptControlMsg;
use msg::constellation_msg::PipelineId;
pub struct FramerateActor {
name: String,

View file

@ -5,18 +5,18 @@
//! Liberally derived from the [Firefox JS implementation]
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
use devtools_traits::{DevtoolScriptControlMsg, NodeInfo, ComputedNodeLayout};
use devtools_traits::DevtoolScriptControlMsg::{GetRootNode, GetDocumentElement, GetChildren};
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 std::collections::BTreeMap;
use msg::constellation_msg::PipelineId;
use rustc_serialize::json::{self, Json, ToJson};
use std::cell::RefCell;
use std::collections::BTreeMap;
use std::net::TcpStream;
use std::sync::mpsc::channel;

View file

@ -9,13 +9,13 @@
extern crate hyper;
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use hyper::header::Headers;
use hyper::http::RawStatus;
use hyper::method::Method;
use protocol::JsonPacketStream;
use rustc_serialize::json;
use std::net::TcpStream;
use url::Url;
use hyper::header::Headers;
use hyper::http::RawStatus;
use hyper::method::Method;
struct HttpRequest {
url: String,

View file

@ -9,13 +9,13 @@ use std::cell::RefCell;
use std::collections::{HashMap, VecDeque};
use std::mem;
use std::net::TcpStream;
use std::thread::sleep_ms;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
use std::thread::sleep_ms;
use actor::{Actor, ActorRegistry, ActorMessageStatus};
use actors::memory::{MemoryActor, TimelineMemoryReply};
use actors::framerate::FramerateActor;
use actors::memory::{MemoryActor, TimelineMemoryReply};
use devtools_traits::DevtoolScriptControlMsg;
use devtools_traits::DevtoolScriptControlMsg::{SetTimelineMarkers, DropTimelineMarkers};
use devtools_traits::{PreciseTime, TimelineMarker, TracingMetadata, TimelineMarkerType};

View file

@ -38,9 +38,9 @@ extern crate url;
use actor::{Actor, ActorRegistry};
use actors::console::ConsoleActor;
use actors::network_event::{NetworkEventActor, EventActor, ResponseStartMsg};
use actors::framerate::FramerateActor;
use actors::inspector::InspectorActor;
use actors::network_event::{NetworkEventActor, EventActor, ResponseStartMsg};
use actors::performance::PerformanceActor;
use actors::profiler::ProfilerActor;
use actors::root::RootActor;
@ -61,8 +61,8 @@ use std::cell::RefCell;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::error::Error;
use std::sync::mpsc::{channel, Receiver, Sender, RecvError};
use std::net::{TcpListener, TcpStream, Shutdown};
use std::sync::mpsc::{channel, Receiver, Sender, RecvError};
use std::sync::{Arc, Mutex};
use time::precise_time_ns;

View file

@ -6,9 +6,9 @@
//! [JSON packets]
//! (https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport#JSON_Packets).
use rustc_serialize::{json, Encodable};
use rustc_serialize::json::Json;
use rustc_serialize::json::ParserError::{IoError, SyntaxError};
use rustc_serialize::{json, Encodable};
use std::error::Error;
use std::io::{Read, Write};
use std::net::TcpStream;

View file

@ -27,10 +27,10 @@ extern crate hyper;
extern crate util;
extern crate time;
use rustc_serialize::{Decodable, Decoder};
use msg::constellation_msg::{PipelineId, WorkerId};
use util::str::DOMString;
use rustc_serialize::{Decodable, Decoder};
use url::Url;
use util::str::DOMString;
use hyper::header::Headers;
use hyper::http::RawStatus;

View file

@ -20,8 +20,8 @@ use display_list::optimizer::DisplayListOptimizer;
use paint_context::PaintContext;
use self::DisplayItem::*;
use self::DisplayItemIterator::*;
use text::glyph::CharIndex;
use text::TextRun;
use text::glyph::CharIndex;
use azure::azure::AzFloat;
use azure::azure_hl::Color;

View file

@ -6,11 +6,11 @@
use display_list::{DisplayItem, DisplayList, StackingContext};
use std::collections::linked_list::LinkedList;
use euclid::rect::Rect;
use euclid::{Matrix2D, Matrix4};
use util::geometry::{self, Au};
use std::collections::linked_list::LinkedList;
use std::sync::Arc;
use util::geometry::{self, Au};
/// Transforms a display list to produce a visually-equivalent, but cheaper-to-paint, one.
pub struct DisplayListOptimizer {

View file

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

View file

@ -5,23 +5,23 @@
use euclid::{Point2D, Rect, Size2D};
use smallvec::SmallVec;
use std::borrow::ToOwned;
use std::mem;
use std::slice;
use std::rc::Rc;
use std::cell::RefCell;
use util::cache::HashCache;
use std::mem;
use std::rc::Rc;
use std::slice;
use std::sync::Arc;
use style::computed_values::{font_stretch, font_variant, font_weight};
use style::properties::style_structs::Font as FontStyle;
use std::sync::Arc;
use util::cache::HashCache;
use platform::font_context::FontContextHandle;
use font_template::FontTemplateDescriptor;
use platform::font::{FontHandle, FontTable};
use util::geometry::Au;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use text::Shaper;
use text::glyph::{GlyphStore, GlyphId};
use text::shaping::ShaperMethods;
use text::Shaper;
use font_template::FontTemplateDescriptor;
use platform::font_template::FontTemplateData;
use util::geometry::Au;
// FontHandle encapsulates access to the platform's font API,
// e.g. quartz, FreeType. It provides access to metrics and tables

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use platform::font_context::FontContextHandle;
use platform::font_list::get_available_families;
use platform::font_list::get_last_resort_font_families;
use platform::font_list::get_system_default_family;
use platform::font_list::get_variations_for_family;
use platform::font_list::get_last_resort_font_families;
use platform::font_context::FontContextHandle;
use font_template::{FontTemplate, FontTemplateDescriptor};
use net_traits::{ResourceTask, load_whole_resource};

View file

@ -2,15 +2,15 @@
* 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::{Font, FontGroup};
use font::SpecifiedFontStyle;
use font::{Font, FontGroup};
use platform::font_context::FontContextHandle;
use style::computed_values::{font_style, font_variant};
use fnv::FnvHasher;
use font::FontHandleMethods;
use font_cache_task::FontCacheTask;
use font_template::FontTemplateDescriptor;
use fnv::FnvHasher;
use platform::font::FontHandle;
use platform::font_template::FontTemplateData;
use smallvec::SmallVec;

View file

@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use font::FontHandleMethods;
use platform::font_context::FontContextHandle;
use platform::font::FontHandle;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use string_cache::Atom;

View file

@ -4,12 +4,12 @@
//! Painting of display lists using Moz2D/Azure.
use gfx_traits::color;
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;

View file

@ -9,37 +9,37 @@ use font_cache_task::FontCacheTask;
use font_context::FontContext;
use paint_context::PaintContext;
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
use azure::AzFloat;
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
use canvas_traits::CanvasMsg;
use euclid::Matrix4;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::size::Size2D;
use ipc_channel::ipc::IpcSender;
use layers::platform::surface::{NativeDisplay, NativeSurface};
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
use msg::compositor_msg::{Epoch, FrameTreeId, LayerId, LayerKind};
use msg::compositor_msg::{LayerProperties, PaintListener, ScrollPolicy};
use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use msg::constellation_msg::PipelineExitType;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use profile_traits::mem::{self, ReportsChan};
use profile_traits::time::{self, profile};
use rand::{self, Rng};
use smallvec::SmallVec;
use skia::gl_context::GLContext;
use smallvec::SmallVec;
use std::borrow::ToOwned;
use std::collections::HashMap;
use std::mem as std_mem;
use std::sync::Arc;
use std::sync::mpsc::{Receiver, Select, Sender, channel};
use std::collections::HashMap;
use url::Url;
use util::geometry::{Au, ZERO_POINT};
use util::opts;
use util::task::spawn_named;
use util::task::spawn_named_with_send_on_failure;
use util::task_state;
use util::task::spawn_named;
/// Information about a hardware graphics layer that layout sends to the painting task.
#[derive(Clone, Deserialize, Serialize)]

View file

@ -6,21 +6,21 @@ extern crate freetype;
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel};
use util::geometry::Au;
use util::str::c_str_to_string;
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 style::computed_values::{font_stretch, font_weight};
use platform::font_template::FontTemplateData;
use util::geometry::Au;
use util::str::c_str_to_string;
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size};
use freetype::freetype::{FT_Get_Kerning, FT_Get_Sfnt_Table};
use freetype::freetype::{FT_New_Memory_Face, FT_Done_Face};
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};
use freetype::freetype::{FT_GlyphSlot, FT_Library, FT_Long, FT_ULong};
use freetype::freetype::{FT_KERNING_DEFAULT, FT_STYLE_FLAG_ITALIC, FT_STYLE_FLAG_BOLD};
use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size};
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;

View file

@ -10,9 +10,9 @@ extern crate fontconfig;
use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem};
use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute};
use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString};
use fontconfig::fontconfig::{FcPatternDestroy, FcFontSetDestroy, FcMatchPattern, FcPatternCreate};
use fontconfig::fontconfig::{FcPatternAddString, FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy};
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;

View file

@ -8,14 +8,14 @@ extern crate core_foundation;
extern crate core_graphics;
extern crate core_text;
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::FontTableTag;
use font::FractionalPixel;
use util::geometry::{Au, px_to_pt};
use platform::macos::font_context::FontContextHandle;
use text::glyph::GlyphId;
use style::computed_values::{font_stretch, font_weight};
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;

View file

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

View file

@ -4,8 +4,8 @@
use core_graphics::data_provider::CGDataProvider;
use core_graphics::font::CGFont;
use core_text::font::CTFont;
use core_text;
use core_text::font::CTFont;
use serde::de::{Error, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serializer};

View file

@ -14,37 +14,37 @@ 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::{hb_blob_t};
use harfbuzz::{hb_bool_t};
use harfbuzz::{RUST_hb_buffer_add_utf8};
use harfbuzz::{RUST_hb_buffer_destroy};
use harfbuzz::{RUST_hb_buffer_get_glyph_positions};
use harfbuzz::{RUST_hb_buffer_get_length};
use harfbuzz::{RUST_hb_buffer_set_direction};
use harfbuzz::{RUST_hb_face_destroy};
use harfbuzz::{hb_face_t, hb_font_t};
use harfbuzz::{hb_feature_t};
use harfbuzz::{RUST_hb_font_create};
use harfbuzz::{RUST_hb_font_destroy, RUST_hb_buffer_create};
use harfbuzz::{RUST_hb_font_funcs_create};
use harfbuzz::{RUST_hb_font_funcs_set_glyph_func};
use harfbuzz::{RUST_hb_font_funcs_set_glyph_h_advance_func};
use harfbuzz::{RUST_hb_font_funcs_set_glyph_h_kerning_func};
use harfbuzz::{hb_font_funcs_t, hb_buffer_t, hb_codepoint_t};
use harfbuzz::{RUST_hb_font_set_funcs};
use harfbuzz::{RUST_hb_font_set_ppem};
use harfbuzz::{RUST_hb_font_set_scale};
use harfbuzz::{RUST_hb_shape, RUST_hb_buffer_get_glyph_infos};
use harfbuzz::{hb_blob_t};
use harfbuzz::{hb_bool_t};
use harfbuzz::{hb_face_t, hb_font_t};
use harfbuzz::{hb_feature_t};
use harfbuzz::{hb_font_funcs_t, hb_buffer_t, hb_codepoint_t};
use harfbuzz::{hb_glyph_info_t};
use harfbuzz::{hb_glyph_position_t};
use harfbuzz::{hb_position_t, hb_tag_t};
use harfbuzz::{RUST_hb_shape, RUST_hb_buffer_get_glyph_infos};
use libc::{c_uint, c_int, c_void, c_char};
use std::char;
use std::cmp;
use std::mem;
use std::ptr;
use util::geometry::Au;
use util::range::Range;
use std::char;
use std::mem;
use std::cmp;
use std::ptr;
macro_rules! hb_tag {
($t1:expr, $t2:expr, $t3:expr, $t4:expr) => (

View file

@ -31,14 +31,14 @@ use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use display_list_builder::{FragmentDisplayListBuilding};
use floats::{ClearType, FloatKind, Floats, PlacementInfo};
use flow::{self, AbsolutePositionInfo, BaseFlow, ForceNonfloatedFlag, FlowClass, Flow};
use flow::{ImmutableFlowUtils, MutableFlowUtils, OpaqueFlow, PreorderFlowTraversal};
use flow::{PostorderFlowTraversal, mut_base};
use flow::{BLOCK_POSITION_IS_STATIC, HAS_LEFT_FLOATED_DESCENDANTS, HAS_RIGHT_FLOATED_DESCENDANTS};
use flow::{IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS, INLINE_POSITION_IS_STATIC};
use flow::{LAYERS_NEEDED_FOR_DESCENDANTS, NEEDS_LAYER};
use flow::{IS_ABSOLUTELY_POSITIONED};
use flow::{CLEARS_LEFT, CLEARS_RIGHT};
use flow::{IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS, INLINE_POSITION_IS_STATIC};
use flow::{IS_ABSOLUTELY_POSITIONED};
use flow::{ImmutableFlowUtils, MutableFlowUtils, OpaqueFlow, PreorderFlowTraversal};
use flow::{LAYERS_NEEDED_FOR_DESCENDANTS, NEEDS_LAYER};
use flow::{PostorderFlowTraversal, mut_base};
use flow::{self, AbsolutePositionInfo, BaseFlow, ForceNonfloatedFlag, FlowClass, Flow};
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW};
use layout_debug;
@ -56,8 +56,8 @@ use std::sync::Arc;
use style::computed_values::{border_collapse, box_sizing, display, float, overflow_x, overflow_y};
use style::computed_values::{transform, transform_style, position, text_align};
use style::properties::ComputedValues;
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::{LengthOrNone, LengthOrPercentageOrNone};
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;

View file

@ -17,11 +17,11 @@ use block::BlockFlow;
use context::LayoutContext;
use data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataWrapper};
use floats::FloatKind;
use flow::{self, AbsoluteDescendants, Flow, ImmutableFlowUtils, IS_ABSOLUTELY_POSITIONED};
use flow::{MutableFlowUtils, MutableOwnedFlowUtils};
use flow::{self, AbsoluteDescendants, Flow, ImmutableFlowUtils, IS_ABSOLUTELY_POSITIONED};
use flow_ref::FlowRef;
use fragment::{Fragment, GeneratedContentInfo, IframeFragmentInfo};
use fragment::{CanvasFragmentInfo, ImageFragmentInfo, InlineAbsoluteFragmentInfo};
use fragment::{Fragment, GeneratedContentInfo, IframeFragmentInfo};
use fragment::{InlineAbsoluteHypotheticalFragmentInfo, TableColumnFragmentInfo};
use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use fragment::{WhitespaceStrippingResult};
@ -1729,8 +1729,8 @@ pub fn strip_ignorable_whitespace_from_end(this: &mut LinkedList<Fragment>) {
/// If the 'unicode-bidi' property has a value other than 'normal', return the bidi control codes
/// to inject before and after the text content of the element.
fn bidi_control_chars(style: &Arc<ComputedValues>) -> Option<(&'static str, &'static str)> {
use style::computed_values::unicode_bidi::T::*;
use style::computed_values::direction::T::*;
use style::computed_values::unicode_bidi::T::*;
let unicode_bidi = style.get_text().unicode_bidi;
let direction = style.get_inheritedbox().direction;

View file

@ -9,13 +9,13 @@
use css::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
use canvas_traits::CanvasMsg;
use msg::compositor_msg::LayerId;
use fnv::FnvHasher;
use euclid::{Rect, Size2D};
use fnv::FnvHasher;
use gfx::display_list::OpaqueNode;
use gfx::font_cache_task::FontCacheTask;
use gfx::font_context::FontContext;
use ipc_channel::ipc::{self, IpcSender};
use msg::compositor_msg::LayerId;
use msg::constellation_msg::ConstellationChan;
use net_traits::image::base::Image;
use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask, ImageResponse, ImageState};

View file

@ -16,11 +16,11 @@ use wrapper::{LayoutElement, LayoutNode};
use script::dom::characterdata::CharacterDataTypeId;
use script::dom::node::NodeTypeId;
use script::layout_interface::Animation;
use selectors::{Element};
use selectors::bloom::BloomFilter;
use selectors::matching::{CommonStyleAffectingAttributeMode, CommonStyleAffectingAttributes};
use selectors::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
use selectors::parser::PseudoElement;
use selectors::{Element};
use std::borrow::ToOwned;
use std::hash::{Hash, Hasher};
use std::mem;

View file

@ -22,9 +22,8 @@ use model::{self, MaybeAuto, ToGfxMatrix};
use table_cell::CollapsedBordersForCell;
use canvas_traits::{CanvasMsg, FromLayoutMsg};
use euclid::{Point2D, Point3D, Rect, Size2D, SideOffsets2D};
use euclid::Matrix4;
use gfx_traits::color;
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};
@ -33,17 +32,18 @@ use gfx::display_list::{GradientStop, ImageDisplayItem, LineDisplayItem};
use gfx::display_list::{OpaqueNode, SolidColorDisplayItem};
use gfx::display_list::{StackingContext, TextDisplayItem, TextOrientation};
use gfx::paint_task::{PaintLayer, THREAD_TINT_COLORS};
use gfx_traits::color;
use ipc_channel::ipc::{self, IpcSharedMemory};
use msg::compositor_msg::{ScrollPolicy, LayerId};
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
use net_traits::image_cache_task::UsePlaceholder;
use net_traits::image::base::{Image, PixelFormat};
use net_traits::image_cache_task::UsePlaceholder;
use std::cmp;
use std::default::Default;
use std::f32;
use std::sync::Arc;
use std::sync::mpsc::channel;
use std::f32;
use style::computed_values::filter::Filter;
use style::computed_values::{background_attachment, background_clip, background_origin};
use style::computed_values::{background_repeat, background_size};

View file

@ -2,14 +2,14 @@
* 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 std::cmp::{max, min};
use std::fmt;
use std::i32;
use style::computed_values::float;
use util::geometry::Au;
use util::logical_geometry::WritingMode;
use util::logical_geometry::{LogicalRect, LogicalSize};
use util::persistent_list::PersistentList;
use std::cmp::{max, min};
use std::i32;
use std::fmt;
use style::computed_values::float;
/// The kind of float: left or right.
#[derive(Clone, RustcEncodable, Debug, Copy)]

View file

@ -35,6 +35,7 @@ use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
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;
@ -43,7 +44,6 @@ use table_colgroup::TableColGroupFlow;
use table_row::TableRowFlow;
use table_rowgroup::TableRowGroupFlow;
use table_wrapper::TableWrapperFlow;
use multicol::MulticolFlow;
use wrapper::{PseudoElementType, ThreadSafeLayoutNode};
use euclid::{Point2D, Rect, Size2D};

View file

@ -10,8 +10,8 @@
#![allow(unsafe_code)]
use flow::{Flow, BaseFlow};
use flow;
use flow::{Flow, BaseFlow};
use std::mem;
use std::ops::{Deref, DerefMut};

View file

@ -20,10 +20,10 @@ 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 gfx;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{ConstellationChan, Msg, PipelineId, SubpageId};
use net_traits::image::base::Image;
@ -44,11 +44,11 @@ use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::{LengthOrPercentageOrNone};
use text::TextRunScanner;
use url::Url;
use util;
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 util;
/// 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

@ -9,8 +9,8 @@
//! as possible.
use context::LayoutContext;
use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, ImmutableFlowUtils};
use flow::{InorderFlowTraversal};
use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, ImmutableFlowUtils};
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use incremental::{self, RESOLVE_GENERATED_CONTENT};
use smallvec::SmallVec;

View file

@ -8,8 +8,8 @@ use block::{AbsoluteAssignBSizesTraversal, AbsoluteStoreOverflowTraversal};
use context::LayoutContext;
use display_list_builder::{FragmentDisplayListBuilding, InlineFlowDisplayListBuilding};
use floats::{FloatKind, Floats, PlacementInfo};
use flow::{self, BaseFlow, FlowClass, Flow, ForceNonfloatedFlag, IS_ABSOLUTELY_POSITIONED};
use flow::{MutableFlowUtils, OpaqueFlow};
use flow::{self, BaseFlow, FlowClass, Flow, ForceNonfloatedFlag, IS_ABSOLUTELY_POSITIONED};
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW, RESOLVE_GENERATED_CONTENT};
use layout_debug;
@ -24,17 +24,17 @@ use gfx::font_context::FontContext;
use std::cmp::max;
use std::collections::VecDeque;
use std::fmt;
use std::isize;
use std::mem;
use std::sync::Arc;
use std::isize;
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 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 util;
// From gfxFontConstants.h in Firefox
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;

View file

@ -7,14 +7,14 @@
#![macro_use]
use flow_ref::FlowRef;
use flow;
use flow_ref::FlowRef;
use rustc_serialize::json;
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::io::Write;
use std::fs::File;
use std::io::Write;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None));

View file

@ -29,17 +29,17 @@ use azure::azure::AzColor;
use canvas_traits::CanvasMsg;
use encoding::EncodingRef;
use encoding::all::UTF_8;
use fnv::FnvHasher;
use euclid::Matrix4;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::scale_factor::ScaleFactor;
use euclid::size::Size2D;
use gfx_traits::color;
use gfx::display_list::{ClippingRegion, DisplayList, OpaqueNode};
use fnv::FnvHasher;
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 ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layout_traits::LayoutTaskFactory;
@ -47,19 +47,19 @@ use log;
use msg::compositor_msg::{Epoch, ScrollPolicy, LayerId};
use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineExitType, PipelineId};
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
use profile_traits::time::{self, ProfilerMetadata, profile};
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
use net_traits::{load_bytes_iter, PendingAsyncLoad};
use net_traits::image_cache_task::{ImageCacheTask, ImageCacheResult, ImageCacheChan};
use net_traits::{load_bytes_iter, PendingAsyncLoad};
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
use profile_traits::time::{self, ProfilerMetadata, profile};
use script::dom::bindings::js::LayoutJS;
use script::dom::node::{LayoutData, Node};
use script::layout_interface::Animation;
use script::layout_interface::{LayoutChan, LayoutRPC, OffsetParentResponse};
use script::layout_interface::{NewLayoutTaskInfo, Msg, Reflow, ReflowGoal, ReflowQueryType};
use script::layout_interface::{ScriptLayoutChan, ScriptReflow, TrustedNodeAddress};
use script_traits::{ConstellationControlMsg, LayoutControlMsg, OpaqueScriptLayoutChannel};
use script_traits::StylesheetLoadResponder;
use script_traits::{ConstellationControlMsg, LayoutControlMsg, OpaqueScriptLayoutChannel};
use selectors::parser::PseudoElement;
use serde_json;
use std::borrow::ToOwned;
@ -73,8 +73,8 @@ use std::sync::{Arc, Mutex, MutexGuard};
use string_cache::Atom;
use style::computed_values::{self, filter, mix_blend_mode};
use style::media_queries::{MediaType, MediaQueryList, Device};
use style::properties::style_structs;
use style::properties::longhands::{display, position};
use style::properties::style_structs;
use style::selector_matching::Stylist;
use style::stylesheets::{Origin, Stylesheet, CSSRuleIteratorExt};
use url::Url;

View file

@ -20,12 +20,12 @@ 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 util::geometry::Au;
use util::logical_geometry::LogicalSize;
use util::opts;
use style::properties::ComputedValues;
use style::computed_values::{list_style_type, position};
use std::sync::Arc;
/// A block with the CSS `display` property equal to `list-item`.
#[derive(Debug)]

View file

@ -13,11 +13,11 @@ use flow::{FlowClass, Flow, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use euclid::{Point2D, Rect};
use std::fmt;
use std::sync::Arc;
use style::properties::ComputedValues;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;
use std::fmt;
use style::properties::ComputedValues;
use std::sync::Arc;
pub struct MulticolFlow {
pub block_flow: BlockFlow,

View file

@ -9,16 +9,16 @@
#![allow(unsafe_code)]
use context::{LayoutContext, SharedLayoutContext};
use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal};
use flow;
use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal};
use flow_ref::FlowRef;
use traversal::{PreorderDomTraversal, PostorderDomTraversal};
use traversal::PostorderNodeMutTraversal;
use traversal::{BubbleISizes, AssignISizes, AssignBSizesAndStoreOverflow};
use traversal::{ComputeAbsolutePositions, BuildDisplayList};
use traversal::{PreorderDomTraversal, PostorderDomTraversal};
use traversal::{RecalcStyleForNode, ConstructFlows};
use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode};
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;

View file

@ -11,8 +11,8 @@ use euclid::rect::Rect;
use flow_ref::FlowRef;
use fragment::{Fragment, FragmentBorderBoxIterator};
use gfx::display_list::{DisplayItemMetadata, OpaqueNode};
use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
use opaque_node::OpaqueNodeMethods;
use script::layout_interface::{ContentBoxResponse, ContentBoxesResponse, NodeGeometryResponse};
use script::layout_interface::{HitTestResponse, LayoutRPC, MouseOverResponse, OffsetParentResponse};
@ -20,8 +20,8 @@ use script::layout_interface::{ResolvedStyleResponse, ScriptLayoutChan, TrustedN
use sequential;
use std::sync::{Arc, Mutex};
use util::geometry::Au;
use util::cursor::Cursor;
use util::geometry::Au;
use util::logical_geometry::WritingMode;
pub struct LayoutRPCImpl(pub Arc<Mutex<LayoutTaskData>>);

View file

@ -5,16 +5,16 @@
//! Implements sequential traversals over the DOM and flow trees.
use context::{LayoutContext, SharedLayoutContext};
use flow::{self, Flow, ImmutableFlowUtils, InorderFlowTraversal, MutableFlowUtils};
use flow::{PostorderFlowTraversal, PreorderFlowTraversal};
use flow::{self, Flow, ImmutableFlowUtils, InorderFlowTraversal, MutableFlowUtils};
use flow_ref::FlowRef;
use fragment::FragmentBorderBoxIterator;
use generated_content::ResolveGeneratedContent;
use traversal::{PreorderDomTraversal, PostorderDomTraversal};
use traversal::PostorderNodeMutTraversal;
use traversal::{BubbleISizes, RecalcStyleForNode, ConstructFlows};
use traversal::{AssignBSizesAndStoreOverflow, AssignISizes};
use traversal::{BubbleISizes, RecalcStyleForNode, ConstructFlows};
use traversal::{ComputeAbsolutePositions, BuildDisplayList};
use traversal::{PreorderDomTraversal, PostorderDomTraversal};
use wrapper::LayoutNode;
use euclid::point::Point2D;

View file

@ -6,18 +6,18 @@
#![deny(unsafe_code)]
use block::{self, BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
use block::{ISizeConstraintInput, ISizeConstraintSolution};
use block::{self, BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use flow::{self, Flow, FlowClass, IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS};
use flow::{ImmutableFlowUtils, OpaqueFlow};
use flow::{self, Flow, FlowClass, IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS};
use fragment::{Fragment, FragmentBorderBoxIterator};
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW};
use layout_debug;
use model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use table_row::{TableRowFlow};
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
use table_wrapper::TableLayout;
use euclid::{Point2D, Rect};

View file

@ -12,11 +12,11 @@ use flow::{FlowClass, Flow, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use euclid::{Point2D, Rect};
use std::fmt;
use std::sync::Arc;
use style::properties::ComputedValues;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;
use std::fmt;
use style::properties::ComputedValues;
use std::sync::Arc;
/// A table formatting context.
pub struct TableCaptionFlow {

View file

@ -11,8 +11,8 @@ use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use flow::{Flow, FlowClass, OpaqueFlow};
use fragment::{Fragment, FragmentBorderBoxIterator};
use model::MaybeAuto;
use layout_debug;
use model::MaybeAuto;
use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
use wrapper::ThreadSafeLayoutNode;

View file

@ -12,12 +12,12 @@ use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use layout_debug;
use euclid::{Point2D, Rect};
use util::geometry::{Au, ZERO_RECT};
use std::cmp::max;
use std::fmt;
use style::values::computed::LengthOrPercentageOrAuto;
use style::properties::ComputedValues;
use std::sync::Arc;
use style::properties::ComputedValues;
use style::values::computed::LengthOrPercentageOrAuto;
use util::geometry::{Au, ZERO_RECT};
use util::logical_geometry::LogicalSize;
/// A table formatting context.

View file

@ -13,9 +13,9 @@ use flow::{self, FlowClass, Flow, ImmutableFlowUtils, OpaqueFlow};
use flow_list::MutFlowListIterator;
use fragment::{Fragment, FragmentBorderBoxIterator};
use layout_debug;
use model::MaybeAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use table_cell::{CollapsedBordersForCell, TableCellFlow};
use model::MaybeAuto;
use cssparser::{Color, RGBA};
use euclid::{Point2D, Rect};

View file

@ -25,8 +25,6 @@ use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
use table_row;
use euclid::{Point2D, Rect};
use util::geometry::Au;
use util::logical_geometry::LogicalSize;
use std::cmp::{max, min};
use std::fmt;
use std::ops::Add;
@ -35,6 +33,8 @@ use style::computed_values::{border_collapse, table_layout};
use style::properties::ComputedValues;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use util::geometry::Au;
use util::logical_geometry::LogicalSize;
#[derive(Copy, Clone, RustcEncodable, Debug)]
pub enum TableLayout {

View file

@ -4,15 +4,15 @@
//! Traversals over the DOM and flow trees, running the layout computations.
use css::matching::{ApplicableDeclarations, MatchMethods, StyleSharingResult};
use construct::FlowConstructor;
use context::LayoutContext;
use flow::{self, Flow};
use css::matching::{ApplicableDeclarations, MatchMethods, StyleSharingResult};
use flow::{PreorderFlowTraversal, PostorderFlowTraversal};
use flow::{self, Flow};
use incremental::{self, BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage};
use script::layout_interface::ReflowGoal;
use wrapper::{layout_node_to_unsafe_layout_node, LayoutNode};
use wrapper::{ThreadSafeLayoutNode, UnsafeLayoutNode};
use wrapper::{layout_node_to_unsafe_layout_node, LayoutNode};
use selectors::bloom::BloomFilter;
use util::opts;

View file

@ -32,12 +32,13 @@
use canvas_traits::CanvasMsg;
use context::SharedLayoutContext;
use incremental::RestyleDamage;
use data::{LayoutDataFlags, LayoutDataWrapper, PrivateLayoutData};
use incremental::RestyleDamage;
use opaque_node::OpaqueNodeMethods;
use gfx::display_list::OpaqueNode;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{PipelineId, SubpageId};
use script::dom::attr::AttrValue;
use script::dom::bindings::codegen::InheritTypes::{CharacterDataCast, ElementCast};
use script::dom::bindings::codegen::InheritTypes::{HTMLIFrameElementCast, HTMLCanvasElementCast};
@ -47,18 +48,18 @@ use script::dom::bindings::js::LayoutJS;
use script::dom::characterdata::{CharacterDataTypeId, LayoutCharacterDataHelpers};
use script::dom::element::{Element, ElementTypeId};
use script::dom::element::{LayoutElementHelpers, RawLayoutElementHelpers};
use script::dom::htmlelement::HTMLElementTypeId;
use script::dom::htmlcanvaselement::LayoutHTMLCanvasElementHelpers;
use script::dom::htmlelement::HTMLElementTypeId;
use script::dom::htmlimageelement::LayoutHTMLImageElementHelpers;
use script::dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
use script::dom::htmltextareaelement::LayoutHTMLTextAreaElementHelpers;
use script::dom::node::{Node, NodeTypeId};
use script::dom::node::{LayoutNodeHelpers, SharedLayoutData};
use script::dom::node::{HAS_CHANGED, IS_DIRTY, HAS_DIRTY_SIBLINGS, HAS_DIRTY_DESCENDANTS};
use script::dom::node::{LayoutNodeHelpers, SharedLayoutData};
use script::dom::node::{Node, NodeTypeId};
use script::dom::text::Text;
use selectors::matching::DeclarationBlock;
use selectors::parser::{NamespaceConstraint, AttrSelector};
use smallvec::VecLike;
use msg::constellation_msg::{PipelineId, SubpageId};
use util::str::is_whitespace;
use std::borrow::ToOwned;
use std::cell::{Ref, RefMut};
use std::marker::PhantomData;
@ -67,13 +68,12 @@ use std::sync::Arc;
use string_cache::{Atom, Namespace};
use style::computed_values::content::ContentItem;
use style::computed_values::{content, display, white_space};
use selectors::matching::DeclarationBlock;
use selectors::parser::{NamespaceConstraint, AttrSelector};
use style::legacy::UnsignedIntegerAttribute;
use style::node::TElementAttributes;
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
use style::properties::ComputedValues;
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
use url::Url;
use util::str::is_whitespace;
/// A wrapper so that layout can access only the methods that it should have access to. Layout must
/// only ever see these and must never see instances of `LayoutJS`.

View file

@ -25,9 +25,9 @@ use gfx::font_cache_task::FontCacheTask;
use gfx::paint_task::LayoutToPaintMsg;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use net_traits::image_cache_task::ImageCacheTask;
use profile_traits::mem;
use profile_traits::time;
use net_traits::image_cache_task::ImageCacheTask;
use script_traits::{LayoutControlMsg, ConstellationControlMsg, OpaqueScriptLayoutChannel};
use std::sync::mpsc::Sender;
use url::Url;

View file

@ -4,13 +4,13 @@
use azure::azure_hl::Color;
use constellation_msg::{Key, KeyState, KeyModifiers};
use euclid::Matrix4;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::Matrix4;
use layers::platform::surface::NativeDisplay;
use layers::layers::{BufferRequest, LayerBufferSet};
use std::fmt::{Formatter, Debug};
use layers::platform::surface::NativeDisplay;
use std::fmt;
use std::fmt::{Formatter, Debug};
use constellation_msg::PipelineId;

View file

@ -9,21 +9,21 @@ use compositor_msg::Epoch;
use canvas_traits::CanvasMsg;
use euclid::rect::Rect;
use euclid::size::{Size2D, TypedSize2D};
use euclid::scale_factor::ScaleFactor;
use euclid::size::{Size2D, TypedSize2D};
use hyper::header::Headers;
use hyper::method::Method;
use ipc_channel::ipc::IpcSender;
use layers::geometry::DevicePixel;
use offscreen_gl_context::GLContextAttributes;
use png::Image;
use util::cursor::Cursor;
use util::geometry::{PagePx, ViewportPx};
use util::mem::HeapSizeOf;
use std::collections::HashMap;
use std::sync::mpsc::{channel, Sender, Receiver};
use style::viewport::ViewportConstraints;
use url::Url;
use util::cursor::Cursor;
use util::geometry::{PagePx, ViewportPx};
use util::mem::HeapSizeOf;
use webdriver_msg::{WebDriverScriptCommand, LoadStatus};
#[derive(Clone)]

View file

@ -2,16 +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 net_traits::{LoadData, Metadata, LoadConsumer};
use net_traits::ProgressMsg::Done;
use mime_classifier::MIMEClassifier;
use resource_task::start_sending;
use file_loader;
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::Done;
use net_traits::{LoadData, Metadata, LoadConsumer};
use resource_task::start_sending;
use url::Url;
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;

View file

@ -9,10 +9,10 @@ use net_traits::CookieSource;
use pub_domains::PUB_DOMAINS;
use cookie_rs;
use time::{Tm, now, at, Duration};
use url::Url;
use std::borrow::ToOwned;
use std::net::{Ipv4Addr, Ipv6Addr};
use time::{Tm, now, at, Duration};
use url::Url;
/// A stored cookie that wraps the definition in cookie-rs. This is used to implement
/// various behaviours defined in the spec that rely on an associated request URL,

View file

@ -5,10 +5,10 @@
//! Implementation of cookie storage as specified in
//! http://tools.ietf.org/html/rfc6265
use net_traits::CookieSource;
use url::Url;
use cookie::Cookie;
use net_traits::CookieSource;
use std::cmp::Ordering;
use url::Url;
pub struct CookieStorage {
cookies: Vec<Cookie>

View file

@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use net_traits::{LoadData, Metadata, LoadConsumer};
use net_traits::ProgressMsg::{Payload, Done};
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::percent_encoding::percent_decode;
use url::SchemeData;
use url::percent_encoding::percent_decode;
pub fn factory(load_data: LoadData, senders: LoadConsumer, _classifier: Arc<MIMEClassifier>) {
// NB: we don't spawn a new task.

View file

@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use url::Url;
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
use hyper::header::{Header, Headers, ContentType, IfModifiedSince, IfNoneMatch};
use hyper::header::{Accept, IfUnmodifiedSince, IfMatch, IfRange, Location};
use hyper::header::{HeaderView, AcceptLanguage, ContentLanguage};
use hyper::header::{QualityItem, qitem, q};
use hyper::status::StatusCode;
use fetch::cors_cache::{CORSCache, CacheRequestDetails};
use fetch::response::{Response, ResponseType};
use hyper::header::{Accept, IfUnmodifiedSince, IfMatch, IfRange, Location};
use hyper::header::{Header, Headers, ContentType, IfModifiedSince, IfNoneMatch};
use hyper::header::{HeaderView, AcceptLanguage, ContentLanguage};
use hyper::header::{QualityItem, qitem, q};
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
use hyper::status::StatusCode;
use std::ascii::AsciiExt;
use std::str::FromStr;
use url::Url;
/// A [request context](https://fetch.spec.whatwg.org/#concept-request-context)
#[derive(Copy, Clone, PartialEq)]

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use url::Url;
use hyper::status::StatusCode;
use hyper::header::Headers;
use hyper::status::StatusCode;
use std::ascii::AsciiExt;
use std::sync::mpsc::Receiver;
use url::Url;
/// [Response type](https://fetch.spec.whatwg.org/#concept-response-type)
#[derive(Clone, PartialEq, Copy)]

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use net_traits::{LoadData, Metadata, LoadConsumer};
use net_traits::ProgressMsg::{Payload, Done};
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;

View file

@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use net_traits::{IncludeSubdomains, IPV4_REGEX, IPV6_REGEX};
use rustc_serialize::json::{decode};
use time;
use url::Url;
use net_traits::{IncludeSubdomains, IPV4_REGEX, IPV6_REGEX};
use std::str::{from_utf8};

View file

@ -2,41 +2,41 @@
* 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 net_traits::{ControlMsg, CookieSource, LoadData, Metadata, LoadConsumer, IncludeSubdomains};
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent};
use hsts::{HSTSList, secure_url};
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::{Payload, Done};
use net_traits::hosts::replace_hosts;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent};
use mime_classifier::MIMEClassifier;
use net_traits::{ControlMsg, CookieSource, LoadData, Metadata, LoadConsumer, IncludeSubdomains};
use resource_task::{start_sending_opt, start_sending_sniffed_opt};
use hsts::{HSTSList, secure_url};
use ipc_channel::ipc::{self, IpcSender};
use log;
use std::collections::HashSet;
use file_loader;
use flate2::read::{DeflateDecoder, GzDecoder};
use hyper::client::Request;
use hyper::header::{AcceptEncoding, Accept, ContentLength, ContentType, Host, Location, qitem, Quality, QualityItem};
use hyper::header::StrictTransportSecurity;
use hyper::Error as HttpError;
use hyper::client::Request;
use hyper::header::StrictTransportSecurity;
use hyper::header::{AcceptEncoding, Accept, ContentLength, ContentType, Host, Location, qitem, Quality, QualityItem};
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper::net::{HttpConnector, HttpsConnector, Openssl};
use hyper::status::{StatusCode, StatusClass};
use std::error::Error;
use ipc_channel::ipc::{self, IpcSender};
use log;
use openssl::ssl::{SslContext, SslMethod, SSL_VERIFY_PEER};
use std::collections::HashSet;
use std::error::Error;
use std::io::{self, Read, Write};
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::mpsc::{Sender, channel};
use util::task::spawn_named;
use util::resource_files::resources_dir_path;
use util::opts;
use url::{Url, UrlParser};
use util::opts;
use util::resource_files::resources_dir_path;
use util::task::spawn_named;
use uuid;
use std::borrow::ToOwned;
use std::boxed::FnBox;
use uuid;
pub fn factory(resource_mgr_chan: IpcSender<ControlMsg>,
devtools_chan: Option<Sender<DevtoolsControlMsg>>,

View file

@ -5,21 +5,21 @@
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
use net_traits::image::base::{Image, load_from_memory};
use net_traits::image_cache_task::{ImageState, ImageCacheTask, ImageCacheChan, ImageCacheCommand};
use net_traits::image_cache_task::ImageResponder;
use net_traits::image_cache_task::{ImageCacheResult, ImageResponse, UsePlaceholder};
use net_traits::image_cache_task::{ImageState, ImageCacheTask, ImageCacheChan, ImageCacheCommand};
use net_traits::load_whole_resource;
use net_traits::{AsyncResponseTarget, ControlMsg, LoadData, ResponseAction, ResourceTask, LoadConsumer};
use std::borrow::ToOwned;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::mem;
use std::sync::Arc;
use std::sync::mpsc::{channel, Sender, Receiver, Select};
use url::Url;
use util::resource_files::resources_dir_path;
use util::task::spawn_named;
use util::taskpool::TaskPool;
use url::Url;
use net_traits::{AsyncResponseTarget, ControlMsg, LoadData, ResponseAction, ResourceTask, LoadConsumer};
use net_traits::image_cache_task::ImageResponder;
///
/// TODO(gw): Remaining work on image cache:

View file

@ -5,19 +5,19 @@
//! A task that takes a URL and streams back the binary data.
use about_loader;
use cookie;
use cookie_storage::CookieStorage;
use data_loader;
use file_loader;
use http_loader;
use cookie_storage::CookieStorage;
use cookie;
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::Done;
use net_traits::{ControlMsg, LoadData, LoadResponse, LoadConsumer, CookieSource};
use net_traits::{Metadata, ProgressMsg, ResourceTask, AsyncResponseTarget, ResponseAction};
use net_traits::ProgressMsg::Done;
use url::Url;
use util::opts;
use util::task::spawn_named;
use url::Url;
use hsts::{HSTSList, HSTSEntry, preload_hsts_domains};

View file

@ -4,8 +4,8 @@
use image::base::Image;
use ipc_channel::ipc::{self, IpcSender};
use url::Url;
use std::sync::Arc;
use url::Url;
use util::mem::HeapSizeOf;
/// This is optionally passed to the image cache when requesting

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::ast;
use syntax::codemap::Span;
use syntax::ext::base;
use syntax::ext::base::ExtCtxt;
use syntax::ext::build::AstBuilder;
use syntax::codemap::Span;
use syntax::ast;
use syntax::ext::base;
use syntax::parse::token;
pub fn expand_lower<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])

View file

@ -13,13 +13,13 @@
//! be ignored in this calculation. Providing a reason is compulsory.
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::codemap::Span;
use syntax::ptr::P;
use syntax::ast::*;
use syntax::attr::AttrMetaMethods;
use syntax::codemap::Span;
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::ext::build::AstBuilder;
use syntax::ext::deriving::generic::*;
use syntax::ptr::P;
pub fn expand_heap_size(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem,
item: &Annotatable, push: &mut FnMut(Annotatable)) {

View file

@ -2,14 +2,14 @@
* 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 syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::codemap::Span;
use syntax::ptr::P;
use syntax::ast::{MetaItem, Expr};
use syntax::ast;
use syntax::ast::{MetaItem, Expr};
use syntax::codemap::Span;
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::ext::build::AstBuilder;
use syntax::ext::deriving::generic::{combine_substructure, EnumMatching, FieldInfo, MethodDef};
use syntax::ext::deriving::generic::{Struct, Substructure, TraitDef, ty};
use syntax::ext::deriving::generic::{combine_substructure, EnumMatching, FieldInfo, MethodDef};
use syntax::ptr::P;
pub fn expand_dom_struct(cx: &mut ExtCtxt, sp: Span, _: &MetaItem, anno: Annotatable) -> Annotatable {
if let Annotatable::Item(item) = anno {

View file

@ -28,8 +28,8 @@ use rustc::lint::LintPassObject;
use rustc::plugin::Registry;
use syntax::ext::base::*;
use syntax::parse::token::intern;
use syntax::feature_gate::AttributeType::Whitelisted;
use syntax::parse::token::intern;
// Public for documentation to show up
/// Handles the auto-deriving for `#[derive(JSTraceable)]`

View file

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::ast;
use rustc::lint::{Context, LintPass, LintArray};
use syntax::ast;
use utils::match_ty_unwrap;
declare_lint!(BANNED_TYPE, Deny,

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::{ast, ast_util};
use rustc::lint::{Context, LintPass, LintArray, Level};
use rustc::middle::def;
use syntax::{ast, ast_util};
use utils::match_lang_ty;

View file

@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::{ast, ast_util};
use rustc::lint::{Context, LintPass, LintArray};
use syntax::ast::Public;
use syntax::attr::AttrMetaMethods;
use rustc::lint::{Context, LintPass, LintArray};
use syntax::{ast, ast_util};
declare_lint!(PRIVATIZE, Deny,
"Allows to enforce private fields for struct definitions");

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::ast;
use rustc::lint::{Context, LintPass, LintArray};
use rustc::middle::ty;
use syntax::ast;
declare_lint!(STR_TO_STRING, Deny,
"Warn when a String could use to_owned() instead of to_string()");

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use rustc::lint::{Context, LintPass, LintArray};
use syntax::ast;
use syntax::attr::AttrMetaMethods;
use rustc::lint::{Context, LintPass, LintArray};
declare_lint!(TRANSMUTE_TYPE_LINT, Allow,
"Warn and report types being transmuted");

View file

@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::{ast, codemap, visit};
use syntax::attr::AttrMetaMethods;
use rustc::ast_map;
use rustc::lint::{Context, LintPass, LintArray};
use rustc::middle::ty;
use rustc::middle::astconv_util::ast_ty_to_prim_ty;
use rustc::middle::ty;
use syntax::attr::AttrMetaMethods;
use syntax::{ast, codemap, visit};
use utils::{match_def_path, unsafe_context};
declare_lint!(UNROOTED_MUST_ROOT, Deny,

View file

@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::codemap::Span;
use syntax::ast::MetaItem;
use syntax::ast;
use syntax::ast::MetaItem;
use syntax::codemap::Span;
use syntax::ext::base::{Annotatable, ExtCtxt};
use utils::match_ty_unwrap;

View file

@ -6,10 +6,10 @@ use rustc::ast_map;
use rustc::lint::Context;
use rustc::middle::def;
use syntax::ptr::P;
use syntax::ast;
use syntax::ast::{TyPath, Path, AngleBracketedParameters, PathSegment, Ty};
use syntax::attr::mark_used;
use syntax::ptr::P;
/// Matches a type with a provided string, and returns its type parameters if successful

View file

@ -6,8 +6,8 @@
use ipc_channel::ipc::{self, IpcReceiver};
use ipc_channel::router::ROUTER;
use profile_traits::mem::{ProfilerChan, ProfilerMsg, Reporter, ReporterRequest, ReportKind};
use profile_traits::mem::ReportsChan;
use profile_traits::mem::{ProfilerChan, ProfilerMsg, Reporter, ReporterRequest, ReportKind};
use std::borrow::ToOwned;
use std::cmp::Ordering;
use std::collections::HashMap;

View file

@ -9,8 +9,8 @@
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
use std::sync::mpsc::Sender;
use std::marker::Send;
use std::sync::mpsc::Sender;
/// A trait to abstract away the various kinds of message senders we use.
pub trait OpaqueSender<T> {

View file

@ -9,9 +9,9 @@
//! 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 net_traits::{AsyncResponseListener, ResponseAction, Metadata};
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
@ -20,14 +20,14 @@ use std::sync::{Arc, Mutex};
use time;
use time::{now, Timespec};
use hyper::header::{AccessControlRequestMethod, AccessControlAllowMethods};
use hyper::client::Request;
use hyper::header::{AccessControlMaxAge, AccessControlAllowOrigin};
use hyper::header::{AccessControlRequestHeaders, AccessControlAllowHeaders};
use hyper::header::{Headers, HeaderView};
use hyper::client::Request;
use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper::header::{AccessControlRequestMethod, AccessControlAllowMethods};
use hyper::header::{ContentType, Host};
use hyper::header::{Headers, HeaderView};
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper::status::StatusClass::Success;
use unicase::UniCase;

View file

@ -3,25 +3,25 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{CachedConsoleMessage, CachedConsoleMessageTypes, PAGE_ERROR, CONSOLE_API};
use devtools_traits::{EvaluateJSReply, NodeInfo, Modification, TimelineMarker, TimelineMarkerType};
use devtools_traits::{ConsoleAPI, PageError, ScriptToDevtoolsControlMsg, ComputedNodeLayout};
use dom::bindings::conversions::jsstring_to_str;
use dom::bindings::conversions::FromJSValConvertible;
use dom::bindings::js::Root;
use dom::bindings::codegen::InheritTypes::{NodeCast, ElementCast};
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
use devtools_traits::{EvaluateJSReply, NodeInfo, Modification, TimelineMarker, TimelineMarkerType};
use dom::bindings::codegen::Bindings::DOMRectBinding::{DOMRectMethods};
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
use dom::bindings::codegen::Bindings::ElementBinding::{ElementMethods};
use dom::bindings::codegen::InheritTypes::{NodeCast, ElementCast};
use dom::bindings::conversions::FromJSValConvertible;
use dom::bindings::conversions::jsstring_to_str;
use dom::bindings::global::GlobalRef;
use dom::bindings::js::Root;
use dom::document::DocumentHelpers;
use dom::node::{Node, NodeHelpers};
use dom::window::{WindowHelpers, ScriptHelpers};
use dom::document::DocumentHelpers;
use page::{IterablePage, Page};
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId;
use script_task::{get_page, ScriptTask};
use js::jsapi::{ObjectClassName, RootedObject, RootedValue};
use js::jsval::UndefinedValue;
use msg::constellation_msg::PipelineId;
use page::{IterablePage, Page};
use script_task::{get_page, ScriptTask};
use std::ffi::CStr;
use std::rc::Rc;
use std::str;

View file

@ -5,10 +5,10 @@
//! Tracking of pending loads in a document.
//! https://html.spec.whatwg.org/multipage/#the-end
use script_task::MainThreadScriptMsg;
use msg::constellation_msg::{PipelineId};
use net_traits::{Metadata, load_whole_resource, ResourceTask, PendingAsyncLoad};
use net_traits::AsyncResponseTarget;
use net_traits::{Metadata, load_whole_resource, ResourceTask, PendingAsyncLoad};
use script_task::MainThreadScriptMsg;
use std::sync::Arc;
use std::sync::mpsc::Sender;
use url::Url;

View file

@ -10,8 +10,8 @@ use dom::bindings::js::{JS, MutNullableHeap};
use dom::bindings::js::{Root, RootedReference, LayoutJS};
use dom::bindings::utils::{Reflector, reflect_dom_object};
use dom::element::{Element, AttributeHandlers};
use dom::window::Window;
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};

View file

@ -7,21 +7,21 @@
use dom::bindings::error::{Fallible, Error};
use dom::bindings::global::global_object_for_js_object;
use dom::bindings::utils::Reflectable;
use js::jsapi::{JSContext, JSObject, JS_WrapObject, IsCallable};
use js::jsapi::{JS_GetProperty, JS_IsExceptionPending, JS_ReportPendingException};
use js::jsapi::{RootedObject, RootedValue, MutableHandleObject, Heap};
use js::jsapi::GetGlobalForObjectCrossCompartment;
use js::jsapi::{JSAutoCompartment};
use js::jsapi::{JSContext, JSObject, JS_WrapObject, IsCallable};
use js::jsapi::{JS_BeginRequest, JS_EndRequest};
use js::jsapi::{JS_EnterCompartment, JS_LeaveCompartment, JSCompartment};
use js::jsapi::GetGlobalForObjectCrossCompartment;
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;
use std::ptr;
use std::rc::Rc;
use std::intrinsics::return_address;
use std::default::Default;
/// The exception handling used for a call.
#[derive(Copy, Clone, PartialEq)]

View file

@ -43,26 +43,26 @@ 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};
use js::rust::{ToUint64, ToInt64};
use js::rust::{ToUint32, ToInt32};
use js::rust::{ToUint16, ToNumber, ToBoolean, ToString};
use js::jsapi::{HandleId, HandleObject, HandleValue, JS_GetClass};
use js::jsapi::{JSClass, JSContext, JSObject, JSString, MutableHandleValue};
use js::jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetReservedSlot};
use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_NewStringCopyN};
use js::jsapi::{JS_NewUCStringCopyN, JS_StringHasLatin1Chars, JS_WrapValue};
use js::jsapi::{JSClass, JSContext, JSObject, JSString, MutableHandleValue};
use js::jsval::JSVal;
use js::jsval::{UndefinedValue, NullValue, BooleanValue, Int32Value, UInt32Value};
use js::jsval::{StringValue, ObjectValue, ObjectOrNullValue};
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};
use std::borrow::ToOwned;
use std::slice;
use std::ptr;
use std::rc::Rc;
use core::nonzero::NonZero;
use std::slice;
trait As<O>: Copy {
fn cast(self) -> O;

View file

@ -12,17 +12,17 @@ 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::jsapi::JSAutoCompartment;
use js::jsval::UndefinedValue;
use libc;
use std::ffi::CString;
use std::ptr;
use std::mem;
use std::ptr;
/// DOM exceptions that can be thrown by a native DOM method.
#[derive(Debug, Clone, HeapSizeOf)]

View file

@ -7,14 +7,14 @@
//! This module contains smart pointers to global scopes, to simplify writing
//! code that works in workers as well as window scopes.
use devtools_traits::ScriptToDevtoolsControlMsg;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::conversions::native_from_reflector_jsmanaged;
use dom::bindings::js::{JS, Root};
use dom::bindings::utils::{Reflectable, Reflector};
use dom::document::DocumentHelpers;
use dom::workerglobalscope::{WorkerGlobalScope, WorkerGlobalScopeHelpers};
use dom::window::{self, WindowHelpers, ScriptHelpers};
use devtools_traits::ScriptToDevtoolsControlMsg;
use dom::workerglobalscope::{WorkerGlobalScope, WorkerGlobalScopeHelpers};
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
@ -22,9 +22,9 @@ use net_traits::ResourceTask;
use profile_traits::mem;
use ipc_channel::ipc::IpcSender;
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
use js::jsapi::{GetGlobalForObjectCrossCompartment};
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
use url::Url;
use util::mem::HeapSizeOf;

View file

@ -8,17 +8,17 @@
use dom::bindings::conversions::is_dom_proxy;
use dom::bindings::utils::delete_property_by_id;
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
use js::jsapi::{JS_GetPropertyDescriptorById};
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
use js::glue::GetProxyExtra;
use js::glue::InvokeGetOwnPropertyDescriptor;
use js::glue::{SetProxyExtra, GetProxyHandler};
use js::jsapi::AutoIdVector;
use js::jsapi::GetObjectProto;
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
use js::jsapi::{JS_GetPropertyDescriptorById};
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
use js::jsval::ObjectValue;
use js::glue::GetProxyExtra;
use js::glue::{SetProxyExtra, GetProxyHandler};
use js::glue::InvokeGetOwnPropertyDescriptor;
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY};
use js::{JSTrue, JSFalse};

View file

@ -23,25 +23,25 @@
//! is removed.
use dom::bindings::js::Root;
use dom::bindings::utils::{Reflector, Reflectable};
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 std::cell::RefCell;
use std::collections::hash_map::HashMap;
use std::collections::hash_map::Entry::{Vacant, Occupied};
use std::collections::hash_map::HashMap;
use std::marker::PhantomData;
use std::sync::{Arc, Mutex};
use core::nonzero::NonZero;
#[allow(missing_docs)] // FIXME
mod dummy { // Attributes dont apply through the macro.
use std::rc::Rc;
use std::cell::RefCell;
use std::rc::Rc;
use super::LiveDOMReferences;
thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> =
Rc::new(RefCell::new(None)));

View file

@ -5,15 +5,15 @@
//! This module implements structured cloning, as defined by [HTML]
//! (https://html.spec.whatwg.org/multipage/#safe-passing-of-structured-data).
use dom::bindings::error::Fallible;
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_WriteStructuredClone, JS_ClearPendingException};
use js::jsapi::JS_ReadStructuredClone;
use js::jsapi::{HandleValue, MutableHandleValue};
use js::jsapi::{JS_WriteStructuredClone, JS_ClearPendingException};
use libc::size_t;
use std::ptr;

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