mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
This commit is contained in:
parent
413da4ca69
commit
aad2dccc9c
802 changed files with 6861 additions and 6395 deletions
|
@ -2,13 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[cfg(feature = "gl")]
|
||||
use crate::gl;
|
||||
use crate::touch::{TouchAction, TouchHandler};
|
||||
use crate::windowing::{
|
||||
self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods,
|
||||
};
|
||||
use crate::InitialCompositorState;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::fs::{create_dir_all, File};
|
||||
use std::io::Write;
|
||||
use std::num::NonZeroU32;
|
||||
use std::rc::Rc;
|
||||
|
||||
use canvas::canvas_paint_thread::ImageUpdate;
|
||||
use compositing_traits::{
|
||||
CompositingReason, CompositionPipeline, CompositorMsg, CompositorReceiver, ConstellationMsg,
|
||||
|
@ -40,12 +40,6 @@ use script_traits::{
|
|||
WindowSizeData, WindowSizeType,
|
||||
};
|
||||
use servo_geometry::{DeviceIndependentPixel, FramebufferUintLength};
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::fs::{create_dir_all, File};
|
||||
use std::io::Write;
|
||||
use std::num::NonZeroU32;
|
||||
use std::rc::Rc;
|
||||
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
|
||||
use time::{now, precise_time_ns, precise_time_s};
|
||||
use webrender;
|
||||
|
@ -59,6 +53,14 @@ use webrender_api::{
|
|||
};
|
||||
use webrender_surfman::WebrenderSurfman;
|
||||
|
||||
#[cfg(feature = "gl")]
|
||||
use crate::gl;
|
||||
use crate::touch::{TouchAction, TouchHandler};
|
||||
use crate::windowing::{
|
||||
self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods,
|
||||
};
|
||||
use crate::InitialCompositorState;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
enum UnableToComposite {
|
||||
NotReadyToPaintImage(NotReadyToPaint),
|
||||
|
|
|
@ -4,18 +4,17 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
pub use crate::compositor::IOCompositor;
|
||||
pub use crate::compositor::ShutdownState;
|
||||
use std::rc::Rc;
|
||||
|
||||
use compositing_traits::{CompositorProxy, CompositorReceiver, ConstellationMsg};
|
||||
use crossbeam_channel::Sender;
|
||||
use profile_traits::mem;
|
||||
use profile_traits::time;
|
||||
use std::rc::Rc;
|
||||
use profile_traits::{mem, time};
|
||||
use webrender::RenderApi;
|
||||
use webrender_api::DocumentId;
|
||||
use webrender_surfman::WebrenderSurfman;
|
||||
|
||||
pub use crate::compositor::{IOCompositor, ShutdownState};
|
||||
|
||||
mod compositor;
|
||||
#[cfg(feature = "gl")]
|
||||
mod gl;
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use self::TouchState::*;
|
||||
use euclid::{Point2D, Scale, Vector2D};
|
||||
use log::warn;
|
||||
use script_traits::{EventResult, TouchId};
|
||||
use style_traits::DevicePixel;
|
||||
|
||||
use self::TouchState::*;
|
||||
|
||||
/// Minimum number of `DeviceIndependentPixel` to begin touch scrolling.
|
||||
const TOUCH_PAN_MIN_SCREEN_PX: f32 = 20.0;
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
//! Abstract windowing methods. The concrete implementations of these can be found in `platform/`.
|
||||
|
||||
use std::fmt::{Debug, Error, Formatter};
|
||||
use std::time::Duration;
|
||||
|
||||
use embedder_traits::{EmbedderProxy, EventLoopWaker};
|
||||
use euclid::Scale;
|
||||
use keyboard_types::KeyboardEvent;
|
||||
|
@ -12,10 +15,7 @@ use script_traits::{MediaSessionActionType, MouseButton, TouchEventType, TouchId
|
|||
use servo_geometry::DeviceIndependentPixel;
|
||||
use servo_media::player::context::{GlApi, GlContext, NativeDisplay};
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt::{Debug, Error, Formatter};
|
||||
use std::time::Duration;
|
||||
use style_traits::DevicePixel;
|
||||
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint};
|
||||
use webrender_api::ScrollLocation;
|
||||
use webrender_surfman::WebrenderSurfman;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue