mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
This commit is contained in:
parent
e924393be8
commit
de3547e401
213 changed files with 598 additions and 934 deletions
|
@ -16,15 +16,9 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use display_list::optimizer::DisplayListOptimizer;
|
||||
use paint_context::PaintContext;
|
||||
use self::DisplayItem::*;
|
||||
use self::DisplayItemIterator::*;
|
||||
use text::TextRun;
|
||||
use text::glyph::CharIndex;
|
||||
|
||||
use azure::azure::AzFloat;
|
||||
use azure::azure_hl::Color;
|
||||
use display_list::optimizer::DisplayListOptimizer;
|
||||
use euclid::approxeq::ApproxEq;
|
||||
use euclid::num::Zero;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
|
||||
|
@ -32,7 +26,10 @@ use gfx_traits::color;
|
|||
use libc::uintptr_t;
|
||||
use msg::compositor_msg::{LayerId, LayerKind, ScrollPolicy};
|
||||
use net_traits::image::base::Image;
|
||||
use paint_context::PaintContext;
|
||||
use paint_task::PaintLayer;
|
||||
use self::DisplayItem::*;
|
||||
use self::DisplayItemIterator::*;
|
||||
use smallvec::SmallVec;
|
||||
use std::collections::linked_list::{self, LinkedList};
|
||||
use std::fmt;
|
||||
|
@ -42,6 +39,8 @@ use std::sync::Arc;
|
|||
use style::computed_values::{border_style, cursor, filter, image_rendering, mix_blend_mode};
|
||||
use style::computed_values::{pointer_events};
|
||||
use style::properties::ComputedValues;
|
||||
use text::TextRun;
|
||||
use text::glyph::CharIndex;
|
||||
use util::cursor::Cursor;
|
||||
use util::geometry::{self, Au, MAX_RECT, ZERO_RECT};
|
||||
use util::linked_list::prepend_from;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
//! Transforms a display list to produce a visually-equivalent, but cheaper-to-paint, one.
|
||||
|
||||
use display_list::{DisplayItem, DisplayList, StackingContext};
|
||||
|
||||
use euclid::rect::Rect;
|
||||
use euclid::{Matrix2D, Matrix4};
|
||||
use std::collections::linked_list::LinkedList;
|
||||
|
|
|
@ -9,7 +9,6 @@ use azure::azure_hl::{ColorMatrixAttribute, ColorMatrixInput, CompositeInput, Dr
|
|||
use azure::azure_hl::{FilterNode, FilterType, LinearTransferAttribute, LinearTransferInput};
|
||||
use azure::azure_hl::{GaussianBlurAttribute, GaussianBlurInput};
|
||||
use azure::azure_hl::{Matrix5x4, TableTransferAttribute, TableTransferInput};
|
||||
|
||||
use style::computed_values::filter;
|
||||
use util::geometry::Au;
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use font_template::FontTemplateDescriptor;
|
||||
use platform::font::{FontHandle, FontTable};
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
|
@ -11,15 +15,10 @@ use std::str;
|
|||
use std::sync::Arc;
|
||||
use style::computed_values::{font_stretch, font_variant, font_weight};
|
||||
use style::properties::style_structs::Font as FontStyle;
|
||||
use util::cache::HashCache;
|
||||
|
||||
use font_template::FontTemplateDescriptor;
|
||||
use platform::font::{FontHandle, FontTable};
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use text::Shaper;
|
||||
use text::glyph::{GlyphStore, GlyphId};
|
||||
use text::shaping::ShaperMethods;
|
||||
use util::cache::HashCache;
|
||||
use util::geometry::Au;
|
||||
|
||||
// FontHandle encapsulates access to the platform's font API,
|
||||
|
|
|
@ -2,23 +2,20 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use font::SpecifiedFontStyle;
|
||||
use font::{Font, FontGroup};
|
||||
use platform::font_context::FontContextHandle;
|
||||
use style::computed_values::{font_style, font_variant};
|
||||
|
||||
use azure::azure_hl::BackendType;
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
use azure::scaled_font::FontInfo;
|
||||
use azure::scaled_font::ScaledFont;
|
||||
use fnv::FnvHasher;
|
||||
use font::FontHandleMethods;
|
||||
use font::SpecifiedFontStyle;
|
||||
use font::{Font, FontGroup};
|
||||
use font_cache_task::FontCacheTask;
|
||||
use font_template::FontTemplateDescriptor;
|
||||
use platform::font::FontHandle;
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use smallvec::SmallVec;
|
||||
use string_cache::Atom;
|
||||
use util::cache::HashCache;
|
||||
use util::geometry::Au;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
use std::borrow::{self, ToOwned};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
@ -27,12 +24,11 @@ use std::default::Default;
|
|||
use std::hash::{Hash, Hasher};
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use azure::azure_hl::BackendType;
|
||||
use azure::scaled_font::ScaledFont;
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
use azure::scaled_font::FontInfo;
|
||||
use string_cache::Atom;
|
||||
use style::computed_values::{font_style, font_variant};
|
||||
use util::cache::HashCache;
|
||||
use util::geometry::Au;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
|
||||
|
|
|
@ -6,9 +6,8 @@ use font::FontHandleMethods;
|
|||
use platform::font::FontHandle;
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::sync::{Arc, Weak};
|
||||
use string_cache::Atom;
|
||||
use style::computed_values::{font_stretch, font_weight};
|
||||
|
||||
/// Describes how to select a font from a given family. This is very basic at the moment and needs
|
||||
|
|
|
@ -4,15 +4,6 @@
|
|||
|
||||
//! Painting of display lists using Moz2D/Azure.
|
||||
|
||||
use display_list::TextOrientation::{SidewaysLeft, SidewaysRight, Upright};
|
||||
use display_list::{BLUR_INFLATION_FACTOR, BorderRadii, BoxShadowClipMode, ClippingRegion};
|
||||
use display_list::{TextDisplayItem};
|
||||
use filters;
|
||||
use font_context::FontContext;
|
||||
use gfx_traits::color;
|
||||
use text::TextRun;
|
||||
use text::glyph::CharIndex;
|
||||
|
||||
use azure::azure::AzIntSize;
|
||||
use azure::azure_hl::{AntialiasMode, Color, ColorPattern, CompositionOp};
|
||||
use azure::azure_hl::{DrawOptions, DrawSurfaceOptions, DrawTarget, ExtendMode, FilterType};
|
||||
|
@ -23,11 +14,17 @@ use azure::azure_hl::{Pattern, PatternRef, Path, PathBuilder, SurfacePattern};
|
|||
use azure::scaled_font::ScaledFont;
|
||||
use azure::{AzFloat, struct__AzDrawOptions, struct__AzGlyph};
|
||||
use azure::{struct__AzGlyphBuffer, struct__AzPoint, AzDrawTargetFillGlyphs};
|
||||
use display_list::TextOrientation::{SidewaysLeft, SidewaysRight, Upright};
|
||||
use display_list::{BLUR_INFLATION_FACTOR, BorderRadii, BoxShadowClipMode, ClippingRegion};
|
||||
use display_list::{TextDisplayItem};
|
||||
use euclid::matrix2d::Matrix2D;
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::side_offsets::SideOffsets2D;
|
||||
use euclid::size::Size2D;
|
||||
use filters;
|
||||
use font_context::FontContext;
|
||||
use gfx_traits::color;
|
||||
use libc::types::common::c99::uint32_t;
|
||||
use msg::compositor_msg::LayerKind;
|
||||
use net_traits::image::base::{Image, PixelFormat};
|
||||
|
@ -37,6 +34,8 @@ use std::mem;
|
|||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
|
||||
use text::TextRun;
|
||||
use text::glyph::CharIndex;
|
||||
use util::geometry::{self, Au, MAX_RECT, ZERO_RECT};
|
||||
use util::opts;
|
||||
use util::range::Range;
|
||||
|
|
|
@ -4,18 +4,16 @@
|
|||
|
||||
//! The task that handles all painting.
|
||||
|
||||
use display_list::{self, StackingContext};
|
||||
use font_cache_task::FontCacheTask;
|
||||
use font_context::FontContext;
|
||||
use paint_context::PaintContext;
|
||||
|
||||
use azure::AzFloat;
|
||||
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
|
||||
use canvas_traits::CanvasMsg;
|
||||
use display_list::{self, StackingContext};
|
||||
use euclid::Matrix4;
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::size::Size2D;
|
||||
use font_cache_task::FontCacheTask;
|
||||
use font_context::FontContext;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
|
||||
use layers::platform::surface::{NativeDisplay, NativeSurface};
|
||||
|
@ -24,6 +22,7 @@ use msg::compositor_msg::{LayerProperties, PaintListener};
|
|||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use msg::constellation_msg::PipelineExitType;
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
|
||||
use paint_context::PaintContext;
|
||||
use profile_traits::mem::{self, ReportsChan};
|
||||
use profile_traits::time::{self, profile};
|
||||
use rand::{self, Rng};
|
||||
|
|
|
@ -6,14 +6,6 @@ extern crate freetype;
|
|||
|
||||
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use font::{FontTableTag, FractionalPixel};
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use style::computed_values::{font_stretch, font_weight};
|
||||
use text::glyph::GlyphId;
|
||||
use text::util::{float_to_fixed, fixed_to_float};
|
||||
use util::geometry::Au;
|
||||
use util::str::c_str_to_string;
|
||||
|
||||
use freetype::freetype::{FTErrorMethods, FT_F26Dot6, FT_Face, FT_FaceRec};
|
||||
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
|
||||
use freetype::freetype::{FT_Get_Kerning, FT_Get_Sfnt_Table, FT_Load_Sfnt_Table};
|
||||
|
@ -24,11 +16,17 @@ use freetype::freetype::{FT_New_Memory_Face, FT_Done_Face};
|
|||
use freetype::freetype::{FT_SizeRec, FT_UInt, FT_Size_Metrics, struct_FT_Vector_};
|
||||
use freetype::freetype::{ft_sfnt_os2};
|
||||
use freetype::tt_os2::TT_OS2;
|
||||
|
||||
use libc::c_char;
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::{font_stretch, font_weight};
|
||||
use text::glyph::GlyphId;
|
||||
use text::util::{float_to_fixed, fixed_to_float};
|
||||
use util::geometry::Au;
|
||||
use util::str::c_str_to_string;
|
||||
|
||||
fn float_to_fixed_ft(f: f64) -> i32 {
|
||||
float_to_fixed(6, f)
|
||||
|
|
|
@ -9,14 +9,12 @@ use freetype::freetype::FT_Library;
|
|||
use freetype::freetype::FT_Memory;
|
||||
use freetype::freetype::FT_New_Library;
|
||||
use freetype::freetype::struct_FT_MemoryRec_;
|
||||
|
||||
use libc::{c_void, c_long};
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::rt::heap;
|
||||
use util::mem::{HeapSizeOf, heap_size_of};
|
||||
|
||||
use libc::{c_void, c_long};
|
||||
|
||||
// We pass a |User| struct -- via an opaque |void*| -- to FreeType each time a new instance is
|
||||
// created. FreeType passes it back to the ft_alloc/ft_realloc/ft_free callbacks. We use it to
|
||||
// record the memory usage of each FreeType instance.
|
||||
|
|
|
@ -13,14 +13,12 @@ use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPa
|
|||
use fontconfig::fontconfig::{FcObjectSetAdd, FcPatternGetInteger};
|
||||
use fontconfig::fontconfig::{FcPatternAddString, FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy};
|
||||
use fontconfig::fontconfig::{FcPatternDestroy, FcFontSetDestroy, FcMatchPattern, FcPatternCreate};
|
||||
|
||||
use util::str::c_str_to_string;
|
||||
|
||||
use libc;
|
||||
use libc::{c_int, c_char};
|
||||
use std::borrow::ToOwned;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use util::str::c_str_to_string;
|
||||
|
||||
static FC_FAMILY: &'static [u8] = b"family\0";
|
||||
static FC_FILE: &'static [u8] = b"file\0";
|
||||
|
|
|
@ -8,15 +8,6 @@ extern crate core_foundation;
|
|||
extern crate core_graphics;
|
||||
extern crate core_text;
|
||||
|
||||
use font::FontTableTag;
|
||||
use font::FractionalPixel;
|
||||
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use platform::font_template::FontTemplateData;
|
||||
use platform::macos::font_context::FontContextHandle;
|
||||
use style::computed_values::{font_stretch, font_weight};
|
||||
use text::glyph::GlyphId;
|
||||
use util::geometry::{Au, px_to_pt};
|
||||
|
||||
use core_foundation::base::CFIndex;
|
||||
use core_foundation::data::CFData;
|
||||
use core_foundation::string::UniChar;
|
||||
|
@ -25,9 +16,16 @@ use core_graphics::geometry::CGRect;
|
|||
use core_text::font::CTFont;
|
||||
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
|
||||
use core_text::font_descriptor::{kCTFontDefaultOrientation};
|
||||
|
||||
use font::FontTableTag;
|
||||
use font::FractionalPixel;
|
||||
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use platform::font_template::FontTemplateData;
|
||||
use platform::macos::font_context::FontContextHandle;
|
||||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::{font_stretch, font_weight};
|
||||
use text::glyph::GlyphId;
|
||||
use util::geometry::{Au, px_to_pt};
|
||||
|
||||
pub struct FontTable {
|
||||
data: CFData,
|
||||
|
|
|
@ -6,7 +6,6 @@ use core_foundation::base::TCFType;
|
|||
use core_foundation::string::{CFString, CFStringRef};
|
||||
use core_text;
|
||||
use core_text::font_descriptor::{CTFontDescriptor, CTFontDescriptorRef};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::mem;
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ use core_graphics::data_provider::CGDataProvider;
|
|||
use core_graphics::font::CGFont;
|
||||
use core_text;
|
||||
use core_text::font::CTFont;
|
||||
|
||||
use serde::de::{Error, Visitor};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::borrow::ToOwned;
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::point::Point2D;
|
||||
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
||||
use simd::u32x4;
|
||||
|
||||
use std::cmp::{Ordering, PartialOrd};
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
|
||||
extern crate harfbuzz;
|
||||
|
||||
use euclid::Point2D;
|
||||
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontHandleMethods, FontTableMethods, FontTableTag};
|
||||
use font::{IGNORE_LIGATURES_SHAPING_FLAG, RTL_FLAG, ShapingOptions};
|
||||
use platform::font::FontTable;
|
||||
use text::glyph::{CharIndex, GlyphStore, GlyphId, GlyphData};
|
||||
use text::shaping::ShaperMethods;
|
||||
use text::util::{float_to_fixed, fixed_to_float, is_bidi_control};
|
||||
|
||||
use euclid::Point2D;
|
||||
use harfbuzz::{HB_MEMORY_MODE_READONLY, HB_DIRECTION_LTR, HB_DIRECTION_RTL};
|
||||
use harfbuzz::{RUST_hb_blob_create, RUST_hb_face_create_for_tables};
|
||||
use harfbuzz::{RUST_hb_buffer_add_utf8};
|
||||
|
@ -39,9 +34,13 @@ use harfbuzz::{hb_glyph_info_t};
|
|||
use harfbuzz::{hb_glyph_position_t};
|
||||
use harfbuzz::{hb_position_t, hb_tag_t};
|
||||
use libc::{c_uint, c_int, c_void, c_char};
|
||||
use platform::font::FontTable;
|
||||
use std::char;
|
||||
use std::cmp;
|
||||
use std::ptr;
|
||||
use text::glyph::{CharIndex, GlyphStore, GlyphId, GlyphData};
|
||||
use text::shaping::ShaperMethods;
|
||||
use text::util::{float_to_fixed, fixed_to_float, is_bidi_control};
|
||||
use util::geometry::Au;
|
||||
use util::range::Range;
|
||||
|
||||
|
|
|
@ -5,15 +5,13 @@
|
|||
use font::{Font, FontHandleMethods, FontMetrics, IS_WHITESPACE_SHAPING_FLAG, RunMetrics};
|
||||
use font::{ShapingOptions};
|
||||
use platform::font_template::FontTemplateData;
|
||||
use text::glyph::{CharIndex, GlyphStore};
|
||||
|
||||
use util::geometry::Au;
|
||||
use util::range::Range;
|
||||
use util::vec::{Comparator, FullBinarySearchMethods};
|
||||
|
||||
use std::cmp::{Ordering, max};
|
||||
use std::slice::Iter;
|
||||
use std::sync::Arc;
|
||||
use text::glyph::{CharIndex, GlyphStore};
|
||||
use util::geometry::Au;
|
||||
use util::range::Range;
|
||||
use util::vec::{Comparator, FullBinarySearchMethods};
|
||||
|
||||
/// A single "paragraph" of text in one font size and style.
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue