зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); r=jdm
Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [X ] `./mach build -d` does not report any errors - [X ] `./mach test-tidy --faster` does not report any errors - [X ] These changes fix #11320 (github issue number if applicable). Either: - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. Source-Repo: https://github.com/servo/servo Source-Revision: 2f9796fa696e9514280777398467696dd4f004b3
This commit is contained in:
Родитель
ddcb9dabdb
Коммит
2bd22f97ce
|
@ -40,7 +40,7 @@ extern crate webrender_traits;
|
|||
pub use compositor_thread::{CompositorEventListener, CompositorProxy, CompositorThread};
|
||||
use euclid::size::TypedSize2D;
|
||||
use gfx::paint_thread::ChromeToPaintMsg;
|
||||
use ipc_channel::ipc::{IpcSender};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layout_traits::LayoutControlChan;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_traits::ConstellationControlMsg;
|
||||
|
|
|
@ -31,7 +31,7 @@ use std::mem as std_mem;
|
|||
use std::sync::Arc;
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use url::Url;
|
||||
use util::geometry::{ExpandToPixelBoundaries};
|
||||
use util::geometry::ExpandToPixelBoundaries;
|
||||
use util::opts;
|
||||
use util::thread;
|
||||
use util::thread_state;
|
||||
|
|
|
@ -7,6 +7,7 @@ extern crate freetype;
|
|||
use app_units::Au;
|
||||
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
|
||||
use font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN};
|
||||
use freetype::freetype::ft_sfnt_os2;
|
||||
use freetype::freetype::{FTErrorMethods, FT_F26Dot6, FT_Face, FT_FaceRec};
|
||||
use freetype::freetype::{FT_Done_Face, FT_New_Memory_Face};
|
||||
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
|
||||
|
@ -15,7 +16,6 @@ use freetype::freetype::{FT_GlyphSlot, FT_Library, FT_Long, FT_ULong};
|
|||
use freetype::freetype::{FT_KERNING_DEFAULT, FT_STYLE_FLAG_BOLD, FT_STYLE_FLAG_ITALIC};
|
||||
use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size};
|
||||
use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, struct_FT_Vector_};
|
||||
use freetype::freetype::{ft_sfnt_os2};
|
||||
use freetype::tt_os2::TT_OS2;
|
||||
use libc::c_char;
|
||||
use platform::font_context::FontContextHandle;
|
||||
|
|
|
@ -16,8 +16,8 @@ use core_foundation::string::UniChar;
|
|||
use core_graphics::font::CGGlyph;
|
||||
use core_graphics::geometry::CGRect;
|
||||
use core_text::font::CTFont;
|
||||
use core_text::font_descriptor::kCTFontDefaultOrientation;
|
||||
use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors};
|
||||
use core_text::font_descriptor::{kCTFontDefaultOrientation};
|
||||
use font::{FontHandleMethods, FontMetrics, FontTableTag, FontTableMethods, FractionalPixel};
|
||||
use font::{GPOS, GSUB, KERN};
|
||||
use platform::font_template::FontTemplateData;
|
||||
|
|
|
@ -6,31 +6,31 @@ use app_units::Au;
|
|||
use euclid::Point2D;
|
||||
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag};
|
||||
use font::{IGNORE_LIGATURES_SHAPING_FLAG, KERN, RTL_FLAG, ShapingOptions};
|
||||
use harfbuzz::hb_blob_t;
|
||||
use harfbuzz::hb_bool_t;
|
||||
use harfbuzz::hb_buffer_add_utf8;
|
||||
use harfbuzz::hb_buffer_destroy;
|
||||
use harfbuzz::hb_buffer_get_glyph_positions;
|
||||
use harfbuzz::hb_buffer_get_length;
|
||||
use harfbuzz::hb_face_destroy;
|
||||
use harfbuzz::hb_feature_t;
|
||||
use harfbuzz::hb_font_create;
|
||||
use harfbuzz::hb_font_funcs_create;
|
||||
use harfbuzz::hb_font_funcs_set_glyph_func;
|
||||
use harfbuzz::hb_font_funcs_set_glyph_h_advance_func;
|
||||
use harfbuzz::hb_font_funcs_set_glyph_h_kerning_func;
|
||||
use harfbuzz::hb_font_set_funcs;
|
||||
use harfbuzz::hb_font_set_ppem;
|
||||
use harfbuzz::hb_font_set_scale;
|
||||
use harfbuzz::hb_glyph_info_t;
|
||||
use harfbuzz::hb_glyph_position_t;
|
||||
use harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
|
||||
use harfbuzz::{hb_blob_create, hb_face_create_for_tables};
|
||||
use harfbuzz::{hb_blob_t};
|
||||
use harfbuzz::{hb_bool_t};
|
||||
use harfbuzz::{hb_buffer_add_utf8};
|
||||
use harfbuzz::{hb_buffer_create, hb_font_destroy};
|
||||
use harfbuzz::{hb_buffer_destroy};
|
||||
use harfbuzz::{hb_buffer_get_glyph_infos, hb_shape};
|
||||
use harfbuzz::{hb_buffer_get_glyph_positions};
|
||||
use harfbuzz::{hb_buffer_get_length};
|
||||
use harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script};
|
||||
use harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
|
||||
use harfbuzz::{hb_face_destroy};
|
||||
use harfbuzz::{hb_face_t, hb_font_t};
|
||||
use harfbuzz::{hb_feature_t};
|
||||
use harfbuzz::{hb_font_create};
|
||||
use harfbuzz::{hb_font_funcs_create};
|
||||
use harfbuzz::{hb_font_funcs_set_glyph_func};
|
||||
use harfbuzz::{hb_font_funcs_set_glyph_h_advance_func};
|
||||
use harfbuzz::{hb_font_funcs_set_glyph_h_kerning_func};
|
||||
use harfbuzz::{hb_font_set_funcs};
|
||||
use harfbuzz::{hb_font_set_ppem};
|
||||
use harfbuzz::{hb_font_set_scale};
|
||||
use harfbuzz::{hb_glyph_info_t};
|
||||
use harfbuzz::{hb_glyph_position_t};
|
||||
use harfbuzz::{hb_position_t, hb_tag_t};
|
||||
use libc::{c_char, c_int, c_uint, c_void};
|
||||
use platform::font::FontTable;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use font::ShapingOptions;
|
||||
use font::{Font, FontHandleMethods, FontMetrics, IS_WHITESPACE_SHAPING_FLAG, RunMetrics};
|
||||
use font::{ShapingOptions};
|
||||
use platform::font_template::FontTemplateData;
|
||||
use range::Range;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -24,7 +24,7 @@ pub use paint_listener::PaintListener;
|
|||
use azure::azure_hl::Color;
|
||||
use euclid::Matrix4D;
|
||||
use euclid::rect::Rect;
|
||||
use msg::constellation_msg::{PipelineId};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
|
|
|
@ -33,16 +33,16 @@ use display_list_builder::BlockFlowDisplayListBuilding;
|
|||
use display_list_builder::{BorderPaintingMode, DisplayListBuildState, FragmentDisplayListBuilding};
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use floats::{ClearType, FloatKind, Floats, PlacementInfo};
|
||||
use flow::IS_ABSOLUTELY_POSITIONED;
|
||||
use flow::{BLOCK_POSITION_IS_STATIC, CLEARS_LEFT, CLEARS_RIGHT};
|
||||
use flow::{CONTAINS_TEXT_OR_REPLACED_FRAGMENTS, INLINE_POSITION_IS_STATIC};
|
||||
use flow::{IS_ABSOLUTELY_POSITIONED};
|
||||
use flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, MutableFlowUtils, OpaqueFlow};
|
||||
use flow::{NEEDS_LAYER, PreorderFlowTraversal, FragmentationContext};
|
||||
use flow::{self, BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag};
|
||||
use flow_list::FlowList;
|
||||
use flow_ref::FlowRef;
|
||||
use fragment::SpecificFragmentInfo;
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, HAS_LAYER, Overflow};
|
||||
use fragment::{SpecificFragmentInfo};
|
||||
use gfx::display_list::{ClippingRegion, StackingContext, StackingContextId};
|
||||
use gfx_traits::LayerId;
|
||||
use incremental::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT};
|
||||
|
|
|
@ -22,11 +22,11 @@ use floats::FloatKind;
|
|||
use flow::{MutableFlowUtils, MutableOwnedFlowUtils, CAN_BE_FRAGMENTED};
|
||||
use flow::{self, AbsoluteDescendants, IS_ABSOLUTELY_POSITIONED, ImmutableFlowUtils};
|
||||
use flow_ref::{self, FlowRef};
|
||||
use fragment::WhitespaceStrippingResult;
|
||||
use fragment::{CanvasFragmentInfo, ImageFragmentInfo, InlineAbsoluteFragmentInfo};
|
||||
use fragment::{Fragment, GeneratedContentInfo, IframeFragmentInfo};
|
||||
use fragment::{InlineAbsoluteHypotheticalFragmentInfo, TableColumnFragmentInfo};
|
||||
use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use fragment::{WhitespaceStrippingResult};
|
||||
use gfx::display_list::OpaqueNode;
|
||||
use incremental::{BUBBLE_ISIZES, RECONSTRUCT_FLOW, RestyleDamage};
|
||||
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, InlineFragmentNodeFlags};
|
||||
|
@ -44,8 +44,8 @@ use std::mem;
|
|||
use std::sync::Arc;
|
||||
use std::sync::atomic::Ordering;
|
||||
use style::computed_values::content::ContentItem;
|
||||
use style::computed_values::position;
|
||||
use style::computed_values::{caption_side, display, empty_cells, float, list_style_position};
|
||||
use style::computed_values::{position};
|
||||
use style::properties::{self, ComputedValues, ServoComputedValues};
|
||||
use style::servo::SharedStyleContext;
|
||||
use table::TableFlow;
|
||||
|
|
|
@ -19,12 +19,12 @@ use euclid::{Matrix4D, Point2D, Point3D, Rect, SideOffsets2D, Size2D};
|
|||
use flex::FlexFlow;
|
||||
use flow::{BaseFlow, Flow, IS_ABSOLUTELY_POSITIONED};
|
||||
use flow_ref;
|
||||
use fragment::SpecificFragmentInfo;
|
||||
use fragment::{CoordinateSystem, Fragment, HAS_LAYER, ImageFragmentInfo, ScannedTextFragmentInfo};
|
||||
use fragment::{SpecificFragmentInfo};
|
||||
use gfx::display_list::GradientDisplayItem;
|
||||
use gfx::display_list::{BLUR_INFLATION_FACTOR, BaseDisplayItem, BorderDisplayItem};
|
||||
use gfx::display_list::{BorderRadii, BoxShadowClipMode, BoxShadowDisplayItem, ClippingRegion};
|
||||
use gfx::display_list::{DisplayItem, DisplayItemMetadata, DisplayListSection};
|
||||
use gfx::display_list::{GradientDisplayItem};
|
||||
use gfx::display_list::{GradientStop, IframeDisplayItem, ImageDisplayItem, WebGLDisplayItem, LayeredItem, LayerInfo};
|
||||
use gfx::display_list::{LineDisplayItem, OpaqueNode, SolidColorDisplayItem};
|
||||
use gfx::display_list::{StackingContext, StackingContextId, StackingContextType};
|
||||
|
@ -33,7 +33,7 @@ use gfx::paint_thread::THREAD_TINT_COLORS;
|
|||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx_traits::{color, ScrollPolicy};
|
||||
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, LAST_FRAGMENT_OF_ELEMENT};
|
||||
use ipc_channel::ipc::{self};
|
||||
use ipc_channel::ipc;
|
||||
use list_item::ListItemFlow;
|
||||
use model::{self, MaybeAuto, ToGfxMatrix};
|
||||
use net_traits::image::base::PixelFormat;
|
||||
|
|
|
@ -42,8 +42,8 @@ use style::computed_values::{vertical_align, white_space, word_break, z_index};
|
|||
use style::dom::TRestyleDamage;
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
use style::properties::{ComputedValues, ServoComputedValues};
|
||||
use style::values::computed::LengthOrPercentageOrNone;
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use style::values::computed::{LengthOrPercentageOrNone};
|
||||
use text;
|
||||
use text::TextRunScanner;
|
||||
use url::Url;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//! as possible.
|
||||
|
||||
use context::LayoutContext;
|
||||
use flow::{InorderFlowTraversal};
|
||||
use flow::InorderFlowTraversal;
|
||||
use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, ImmutableFlowUtils};
|
||||
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use gfx::display_list::OpaqueNode;
|
||||
|
|
|
@ -11,12 +11,12 @@ use display_list_builder::DisplayListBuildState;
|
|||
use display_list_builder::{FragmentDisplayListBuilding, InlineFlowDisplayListBuilding};
|
||||
use euclid::{Point2D, Size2D};
|
||||
use floats::{FloatKind, Floats, PlacementInfo};
|
||||
use flow::OpaqueFlow;
|
||||
use flow::{CONTAINS_TEXT_OR_REPLACED_FRAGMENTS, EarlyAbsolutePositionInfo, MutableFlowUtils};
|
||||
use flow::{OpaqueFlow};
|
||||
use flow::{self, BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, IS_ABSOLUTELY_POSITIONED};
|
||||
use flow_ref;
|
||||
use fragment::SpecificFragmentInfo;
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use fragment::{SpecificFragmentInfo};
|
||||
use gfx::display_list::{OpaqueNode, StackingContext, StackingContextId};
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx::font_context::FontContext;
|
||||
|
|
|
@ -21,16 +21,16 @@ use euclid::size::Size2D;
|
|||
use flow::{self, Flow, ImmutableFlowUtils, MutableOwnedFlowUtils};
|
||||
use flow_ref::{self, FlowRef};
|
||||
use fnv::FnvHasher;
|
||||
use gfx::display_list::WebRenderImageInfo;
|
||||
use gfx::display_list::{ClippingRegion, DisplayItemMetadata, DisplayList, LayerInfo};
|
||||
use gfx::display_list::{OpaqueNode, StackingContext, StackingContextId, StackingContextType};
|
||||
use gfx::display_list::{WebRenderImageInfo};
|
||||
use gfx::font;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context;
|
||||
use gfx::paint_thread::LayoutToPaintMsg;
|
||||
use gfx_traits::{color, Epoch, LayerId, ScrollPolicy};
|
||||
use heapsize::HeapSizeOf;
|
||||
use incremental::{LayoutDamageComputation};
|
||||
use incremental::LayoutDamageComputation;
|
||||
use incremental::{REPAINT, STORE_OVERFLOW, REFLOW_OUT_OF_FLOW, REFLOW, REFLOW_ENTIRE_DOCUMENT};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -38,16 +38,16 @@ use layout_debug;
|
|||
use layout_traits::{ConvertPipelineIdToWebRender, LayoutThreadFactory};
|
||||
use log;
|
||||
use msg::constellation_msg::{PanicMsg, PipelineId};
|
||||
use net_traits::image_cache_thread::UsePlaceholder;
|
||||
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheResult, ImageCacheThread};
|
||||
use net_traits::image_cache_thread::{UsePlaceholder};
|
||||
use parallel;
|
||||
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
|
||||
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use query::process_offset_parent_query;
|
||||
use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request};
|
||||
use query::{process_node_geometry_request, process_node_layer_id_request, process_node_scroll_area_request};
|
||||
use query::{process_node_overflow_request, process_resolved_style_request, process_margin_style_query};
|
||||
use query::{process_offset_parent_query};
|
||||
use script::dom::node::OpaqueStyleAndLayoutData;
|
||||
use script::layout_interface::{LayoutRPC, OffsetParentResponse, NodeOverflowResponse, MarginStyleResponse};
|
||||
use script::layout_interface::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType, ScriptReflow};
|
||||
|
@ -65,7 +65,7 @@ use std::sync::mpsc::{channel, Sender, Receiver};
|
|||
use std::sync::{Arc, Mutex, MutexGuard, RwLock};
|
||||
use style::animation::Animation;
|
||||
use style::computed_values::{filter, mix_blend_mode};
|
||||
use style::context::{ReflowGoal};
|
||||
use style::context::ReflowGoal;
|
||||
use style::dom::{TDocument, TElement, TNode};
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
use style::logical_geometry::LogicalPoint;
|
||||
|
|
|
@ -14,8 +14,8 @@ use display_list_builder::{DisplayListBuildState, ListItemFlowDisplayListBuildin
|
|||
use euclid::Point2D;
|
||||
use floats::FloatKind;
|
||||
use flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use fragment::Overflow;
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
|
||||
use fragment::{Overflow};
|
||||
use generated_content;
|
||||
use gfx::display_list::{StackingContext, StackingContextId};
|
||||
use incremental::RESOLVE_GENERATED_CONTENT;
|
||||
|
|
|
@ -8,7 +8,7 @@ use gfx::display_list::OpaqueNode;
|
|||
use libc::{c_void, uintptr_t};
|
||||
use script::dom::bindings::js::LayoutJS;
|
||||
use script::dom::node::Node;
|
||||
use script::layout_interface::{TrustedNodeAddress};
|
||||
use script::layout_interface::TrustedNodeAddress;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
|
||||
pub trait OpaqueNodeMethods {
|
||||
|
|
|
@ -15,8 +15,8 @@ use profile_traits::time::{self, TimerMetadata, profile};
|
|||
use std::mem;
|
||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||
use style::dom::UnsafeNode;
|
||||
use style::parallel::run_queue_with_custom_work_data_type;
|
||||
use style::parallel::{CHUNK_SIZE, WorkQueueData};
|
||||
use style::parallel::{run_queue_with_custom_work_data_type};
|
||||
use traversal::AssignBSizes;
|
||||
use traversal::{AssignISizes, BubbleISizes};
|
||||
use util::opts;
|
||||
|
|
|
@ -13,7 +13,7 @@ use flow;
|
|||
use flow_ref::FlowRef;
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
|
||||
use gfx::display_list::OpaqueNode;
|
||||
use gfx_traits::{LayerId};
|
||||
use gfx_traits::LayerId;
|
||||
use layout_thread::LayoutThreadData;
|
||||
use opaque_node::OpaqueNodeMethods;
|
||||
use script::layout_interface::{ContentBoxResponse, NodeOverflowResponse, ContentBoxesResponse, NodeGeometryResponse};
|
||||
|
|
|
@ -12,8 +12,8 @@ use block::{ISizeConstraintInput, ISizeConstraintSolution};
|
|||
use context::LayoutContext;
|
||||
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode, DisplayListBuildState};
|
||||
use euclid::Point2D;
|
||||
use flow;
|
||||
use flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, OpaqueFlow};
|
||||
use flow::{self};
|
||||
use flow_list::MutFlowListIterator;
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx::display_list::{StackingContext, StackingContextId};
|
||||
|
@ -28,7 +28,7 @@ use style::logical_geometry::LogicalSize;
|
|||
use style::properties::{ComputedValues, ServoComputedValues};
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use table_row::{TableRowFlow};
|
||||
use table_row::TableRowFlow;
|
||||
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
|
||||
use table_wrapper::TableLayout;
|
||||
use util::print_tree::PrintTree;
|
||||
|
|
|
@ -26,7 +26,7 @@ use style::properties::{ComputedValues, ServoComputedValues};
|
|||
use table::InternalTable;
|
||||
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
use util::print_tree::PrintTree;
|
||||
use wrapper::{ThreadSafeLayoutNode};
|
||||
use wrapper::ThreadSafeLayoutNode;
|
||||
|
||||
/// A table formatting context.
|
||||
#[derive(RustcEncodable)]
|
||||
|
|
|
@ -21,8 +21,8 @@ use std::borrow::ToOwned;
|
|||
use std::collections::LinkedList;
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::white_space;
|
||||
use style::computed_values::{line_height, text_orientation, text_rendering, text_transform};
|
||||
use style::computed_values::{white_space};
|
||||
use style::logical_geometry::{LogicalSize, WritingMode};
|
||||
use style::properties::style_structs::ServoFont;
|
||||
use style::properties::{ComputedValues, ServoComputedValues};
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use net_traits::IncludeSubdomains;
|
||||
use rustc_serialize::json::{decode};
|
||||
use rustc_serialize::json::decode;
|
||||
use std::net::{Ipv4Addr, Ipv6Addr};
|
||||
use std::str::{from_utf8};
|
||||
use std::str::from_utf8;
|
||||
use time;
|
||||
use url::Url;
|
||||
use util::resource_files::read_resource_file;
|
||||
|
|
|
@ -9,7 +9,7 @@ use connector::{Connector, create_http_connector};
|
|||
use cookie;
|
||||
use cookie_storage::CookieStorage;
|
||||
use data_loader;
|
||||
use devtools_traits::{DevtoolsControlMsg};
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
use file_loader;
|
||||
use filemanager_thread::FileManagerThreadFactory;
|
||||
use hsts::HstsList;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//! A module for writing time profiler traces out to a self contained HTML file.
|
||||
|
||||
use profile_traits::time::{ProfilerCategory, TimerMetadata};
|
||||
use serde_json::{self};
|
||||
use serde_json;
|
||||
use std::fs;
|
||||
use std::io::Write;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ use dom::bindings::trace::trace_object;
|
|||
use dom::browsingcontext;
|
||||
use heapsize::HeapSizeOf;
|
||||
use js;
|
||||
use js::JS_CALLEE;
|
||||
use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper};
|
||||
use js::glue::{GetCrossCompartmentWrapper, WrapperNew};
|
||||
use js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO, RUST_JSID_IS_INT, RUST_JSID_IS_STRING};
|
||||
|
@ -32,7 +33,6 @@ use js::jsapi::{JS_SetReservedSlot, JS_StringHasLatin1Chars, MutableHandleValue,
|
|||
use js::jsapi::{OnNewGlobalHookOption, RootedObject, RootedValue};
|
||||
use js::jsval::{JSVal, ObjectValue, PrivateValue, UndefinedValue};
|
||||
use js::rust::{GCMethods, ToString};
|
||||
use js::{JS_CALLEE};
|
||||
use libc;
|
||||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
|
|
|
@ -100,7 +100,7 @@ use net_traits::CookieSource::NonHTTP;
|
|||
use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
||||
use net_traits::response::HttpsState;
|
||||
use net_traits::{AsyncResponseTarget, PendingAsyncLoad, IpcSend};
|
||||
use num_traits::{ToPrimitive};
|
||||
use num_traits::ToPrimitive;
|
||||
use origin::Origin;
|
||||
use parse::{ParserRoot, ParserRef, MutNullableParserField};
|
||||
use script_thread::{MainThreadScriptMsg, Runnable};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods};
|
||||
use dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods, Wrap};
|
||||
use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{DOMRectInit};
|
||||
use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectInit;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{Root, JS};
|
||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::ForceTouchEventBinding::ForceTouchEventMet
|
|||
use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{Root};
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::num::Finite;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::bindings::str::DOMString;
|
||||
|
|
|
@ -13,7 +13,7 @@ use dom::bindings::codegen::Bindings::BrowserElementBinding::BrowserShowModalPro
|
|||
use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::conversions::{ToJSValConvertible};
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::error::{Error, ErrorResult};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
|
|
@ -9,8 +9,7 @@ use dom::bindings::cell::DOMRefCell;
|
|||
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root};
|
||||
use dom::bindings::js::{RootedReference};
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root, RootedReference};
|
||||
use dom::bindings::refcounted::Trusted;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::MimeTypeBinding::MimeTypeMethods;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector};
|
||||
use dom::bindings::reflector::Reflector;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::plugin::Plugin;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::PluginBinding::PluginMethods;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector};
|
||||
use dom::bindings::reflector::Reflector;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::mimetype::MimeType;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
use dom::bindings::codegen::Bindings::StorageEventBinding;
|
||||
use dom::bindings::codegen::Bindings::StorageEventBinding::{StorageEventMethods};
|
||||
use dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use dom::bindings::codegen::Bindings::StyleSheetBinding;
|
||||
use dom::bindings::codegen::Bindings::StyleSheetBinding::StyleSheetMethods;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{Root};
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::window::Window;
|
||||
|
|
|
@ -29,7 +29,7 @@ use js::jsval::{JSVal, NullValue};
|
|||
use std::borrow::ToOwned;
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use util::prefs::{get_pref};
|
||||
use util::prefs::get_pref;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct TestBinding {
|
||||
|
|
|
@ -11,7 +11,7 @@ use dom::bindings::error::{Error, Fallible};
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::js::{RootedReference};
|
||||
use dom::bindings::js::RootedReference;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::document::Document;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{RootedReference};
|
||||
use dom::bindings::js::RootedReference;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::htmlheadelement::HTMLHeadElement;
|
||||
use dom::node::Node;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::{CanvasMsg};
|
||||
use canvas_traits::CanvasMsg;
|
||||
use dom::bindings::codegen::Bindings::WebGLFramebufferBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use canvas_traits::{CanvasCommonMsg, CanvasMsg};
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{WebGLRenderingContextMethods};
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
|
||||
use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
|
||||
use dom::bindings::conversions::{ToJSValConvertible, array_buffer_view_data, array_buffer_view_data_checked};
|
||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
|||
use dom::bindings::codegen::Bindings::WebSocketBinding;
|
||||
use dom::bindings::codegen::Bindings::WebSocketBinding::{BinaryType, WebSocketMethods};
|
||||
use dom::bindings::codegen::UnionTypes::StringOrStringSequence;
|
||||
use dom::bindings::conversions::{ToJSValConvertible};
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::error::{Error, Fallible, ErrorResult};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
|
|
@ -78,7 +78,7 @@ use std::sync::{Arc, Mutex};
|
|||
use string_cache::Atom;
|
||||
use style::context::ReflowGoal;
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
use style::properties::longhands::{overflow_x};
|
||||
use style::properties::longhands::overflow_x;
|
||||
use style::selector_impl::PseudoElement;
|
||||
use task_source::TaskSource;
|
||||
use task_source::dom_manipulation::{DOMManipulationTaskSource, DOMManipulationTask};
|
||||
|
|
|
@ -13,7 +13,7 @@ use dom::bindings::codegen::Bindings::XMLHttpRequestBinding;
|
|||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
|
||||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods;
|
||||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType;
|
||||
use dom::bindings::conversions::{ToJSValConvertible};
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use dom::bindings::global::{GlobalRef, GlobalRoot};
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
|
|
@ -15,8 +15,8 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
|||
use msg::constellation_msg::{PanicMsg, PipelineId, WindowSizeData};
|
||||
use net_traits::image_cache_thread::ImageCacheThread;
|
||||
use profile_traits::mem::ReportsChan;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::{UntrustedNodeAddress};
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use string_cache::Atom;
|
||||
|
|
|
@ -57,7 +57,7 @@ use js::jsapi::{DOMProxyShadowsResult, HandleId, HandleObject, RootedValue};
|
|||
use js::jsapi::{JSContext, JS_SetWrapObjectCallbacks, JSTracer, SetWindowProxyClass};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::Runtime;
|
||||
use layout_interface::{ReflowQueryType};
|
||||
use layout_interface::ReflowQueryType;
|
||||
use layout_interface::{self, LayoutChan, NewLayoutThreadInfo};
|
||||
use mem::heap_size_of_self_and_children;
|
||||
use msg::constellation_msg::{LoadData, PanicMsg, PipelineId, PipelineNamespace};
|
||||
|
|
|
@ -19,8 +19,8 @@ use properties::longhands::transform::computed_value::ComputedOperation as Trans
|
|||
use properties::longhands::transform::computed_value::T as TransformList;
|
||||
use properties::longhands::transition_property;
|
||||
use properties::longhands::transition_property::computed_value::TransitionProperty;
|
||||
use properties::longhands::transition_timing_function::computed_value::{StartEnd};
|
||||
use properties::longhands::transition_timing_function::computed_value::{TransitionTimingFunction};
|
||||
use properties::longhands::transition_timing_function::computed_value::StartEnd;
|
||||
use properties::longhands::transition_timing_function::computed_value::TransitionTimingFunction;
|
||||
use properties::longhands::vertical_align::computed_value::T as VerticalAlign;
|
||||
use properties::longhands::visibility::computed_value::T as Visibility;
|
||||
use properties::longhands::z_index::computed_value::T as ZIndex;
|
||||
|
|
|
@ -12,7 +12,7 @@ use string_cache::{Atom, Namespace};
|
|||
use url::Url;
|
||||
use util::str::{LengthOrPercentageOrAuto, HTML_SPACE_CHARACTERS};
|
||||
use util::str::{read_exponent, read_fraction, read_numbers, split_commas, split_html_space_chars};
|
||||
use values::specified::{Length};
|
||||
use values::specified::Length;
|
||||
|
||||
// Duplicated from script::dom::values.
|
||||
const UNSIGNED_LONG_MAX: u32 = 2147483647;
|
||||
|
|
|
@ -53,7 +53,7 @@ use webdriver::command::{TimeoutsParameters, WindowSizeParameters};
|
|||
use webdriver::command::{WebDriverCommand, WebDriverExtensionCommand, WebDriverMessage};
|
||||
use webdriver::common::{LocatorStrategy, WebElement};
|
||||
use webdriver::error::{ErrorStatus, WebDriverError, WebDriverResult};
|
||||
use webdriver::httpapi::{WebDriverExtensionRoute};
|
||||
use webdriver::httpapi::WebDriverExtensionRoute;
|
||||
use webdriver::response::{ElementRectResponse, NewSessionResponse, ValueResponse};
|
||||
use webdriver::response::{WebDriverResponse, WindowSizeResponse};
|
||||
use webdriver::server::{self, Session, WebDriverHandler};
|
||||
|
|
|
@ -21,7 +21,7 @@ use std::ptr;
|
|||
use std::slice;
|
||||
use std::str::from_utf8_unchecked;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use style::context::{ReflowGoal};
|
||||
use style::context::ReflowGoal;
|
||||
use style::dom::{TDocument, TElement, TNode};
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::parallel;
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use gecko_bindings::bindings::{Gecko_ChildrenCount};
|
||||
use gecko_bindings::bindings::{Gecko_ClassOrClassList};
|
||||
use gecko_bindings::bindings::Gecko_ChildrenCount;
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_GetElementId;
|
||||
use gecko_bindings::bindings::Gecko_GetNodeData;
|
||||
use gecko_bindings::bindings::ServoNodeData;
|
||||
use gecko_bindings::bindings::nsIAtom;
|
||||
use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetAttrAsUTF8, Gecko_GetDocumentElement};
|
||||
use gecko_bindings::bindings::{Gecko_GetElementId};
|
||||
use gecko_bindings::bindings::{Gecko_GetFirstChild, Gecko_GetFirstChildElement};
|
||||
use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetLastChildElement};
|
||||
use gecko_bindings::bindings::{Gecko_GetNextSibling, Gecko_GetNextSiblingElement};
|
||||
use gecko_bindings::bindings::{Gecko_GetNodeData};
|
||||
use gecko_bindings::bindings::{Gecko_GetParentElement, Gecko_GetParentNode};
|
||||
use gecko_bindings::bindings::{Gecko_GetPrevSibling, Gecko_GetPrevSiblingElement};
|
||||
use gecko_bindings::bindings::{Gecko_IsHTMLElementInHTMLDocument, Gecko_IsLink, Gecko_IsRootElement, Gecko_IsTextNode};
|
||||
|
@ -19,8 +21,6 @@ use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink};
|
|||
#[allow(unused_imports)] // Used in commented-out code.
|
||||
use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData};
|
||||
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::bindings::{ServoNodeData};
|
||||
use gecko_bindings::bindings::{nsIAtom};
|
||||
use libc::uintptr_t;
|
||||
use properties::GeckoComputedValues;
|
||||
use selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PrivateStyleData};
|
||||
|
@ -42,9 +42,9 @@ use style::element_state::ElementState;
|
|||
#[allow(unused_imports)] // Used in commented-out code.
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
||||
#[allow(unused_imports)] // Used in commented-out code.
|
||||
use style::properties::{parse_style_attribute};
|
||||
use style::properties::parse_style_attribute;
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::restyle_hints::ElementSnapshot;
|
||||
use style::selector_impl::ElementExt;
|
||||
#[allow(unused_imports)] // Used in commented-out code.
|
||||
|
|
|
@ -14,10 +14,10 @@ use euclid::{Size2D, Point2D};
|
|||
#[cfg(target_os = "windows")] use gdi32;
|
||||
use gleam::gl;
|
||||
use glutin;
|
||||
use glutin::TouchPhase;
|
||||
#[cfg(target_os = "macos")]
|
||||
use glutin::os::macos::{ActivationPolicy, WindowBuilderExt};
|
||||
use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta};
|
||||
use glutin::{TouchPhase};
|
||||
use layers::geometry::DevicePixel;
|
||||
use layers::platform::surface::NativeDisplay;
|
||||
use msg::constellation_msg::{KeyState, NONE, CONTROL, SHIFT, ALT, SUPER};
|
||||
|
|
|
@ -390,6 +390,8 @@ def check_rust(file_name, lines):
|
|||
# No benefit over using &str
|
||||
(r": &String", "use &str instead of &String", no_filter),
|
||||
(r"^&&", "operators should go at the end of the first line", no_filter),
|
||||
(r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import",
|
||||
lambda match, line: line.startswith('use ')),
|
||||
]
|
||||
|
||||
for pattern, message, filter_func in regex_rules:
|
||||
|
|
|
@ -7,6 +7,7 @@ use azure::azure_hl::{AntialiasMode, Color,
|
|||
ColorPattern, CompositionOp};
|
||||
use euclid::size::Size2D;
|
||||
use azure::azure::AzIntSize;
|
||||
use azure::azure::{AzIntSize};
|
||||
|
||||
use std;
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ class CheckTidiness(unittest.TestCase):
|
|||
self.assertEqual('use statement spans multiple lines', errors.next()[2])
|
||||
self.assertEqual('missing space before }', errors.next()[2])
|
||||
self.assertTrue('use statement is not in alphabetical order' in errors.next()[2])
|
||||
self.assertEqual('use statement contains braces for single import', errors.next()[2])
|
||||
self.assertEqual('encountered whitespace following a use statement', errors.next()[2])
|
||||
self.assertTrue('mod declaration is not in alphabetical order' in errors.next()[2])
|
||||
self.assertEqual('mod declaration spans multiple lines', errors.next()[2])
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use script::dom::blob::{DataSlice};
|
||||
use script::dom::blob::DataSlice;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use app_units::Au;
|
||||
use style::attr::{AttrValue, parse_length};
|
||||
use util::str::{LengthOrPercentageOrAuto};
|
||||
use util::str::LengthOrPercentageOrAuto;
|
||||
|
||||
#[test]
|
||||
fn test_parse_double() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче