Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for multiple import blocks separated by whitespace #7662

Merged
merged 2 commits into from Sep 19, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix reported test-tidy errors for unmerged import blocks

This merges import blocks that were reported by tidy as unmerged.
  • Loading branch information
nerith committed Sep 19, 2015
commit de3547e401a0ace8b6bfb4b488ed0be9d5b3d79c
@@ -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
@@ -8,16 +8,14 @@ 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::task::spawn_named;
use util::vec::byte_swap;

pub struct WebGLPaintTask {
@@ -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,21 +31,26 @@ 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;
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;

@@ -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 {
@@ -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-
@@ -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};
@@ -4,15 +4,14 @@

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;
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.
///
@@ -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,13 +12,16 @@ 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;
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};
@@ -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;
@@ -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;
@@ -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;
@@ -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,
@@ -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;
@@ -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,
@@ -4,7 +4,6 @@

use actor::{Actor, ActorRegistry, ActorMessageStatus};
use protocol::JsonPacketStream;

use rustc_serialize::json;
use std::net::TcpStream;

@@ -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;

@@ -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;

@@ -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;

@@ -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 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 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 protocol::JsonPacketStream;
use util::task;

pub struct TimelineActor {
@@ -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/
@@ -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.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.