remove extern crate (#30311)

* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Samson 2023-09-08 14:11:31 +02:00 committed by GitHub
parent a0cff6a085
commit 711dbbd4af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
274 changed files with 415 additions and 429 deletions

View file

@ -2,6 +2,8 @@
* 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 serde::Serialize;
use crate::cell::ArcRefCell;
use crate::formatting_contexts::IndependentFormattingContext;
use crate::positioned::AbsolutelyPositionedBox;

View file

@ -16,6 +16,7 @@ use crate::positioned::PositioningContext;
use crate::style_ext::{ComputedValuesExt, DisplayInside, PaddingBorderMargin};
use crate::ContainingBlock;
use euclid::num::Zero;
use serde::Serialize;
use servo_arc::Arc;
use std::collections::VecDeque;
use std::fmt::{Debug, Formatter, Result as FmtResult};

View file

@ -27,6 +27,7 @@ use app_units::Au;
use atomic_refcell::AtomicRef;
use gfx::text::glyph::GlyphStore;
use gfx::text::text_run::GlyphRun;
use serde::Serialize;
use servo_arc::Arc;
use std::cell::OnceCell;
use style::computed_values::white_space::T as WhiteSpace;

View file

@ -23,6 +23,7 @@ use crate::sizing::{self, ContentSizes};
use crate::style_ext::{ComputedValuesExt, PaddingBorderMargin};
use crate::ContainingBlock;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use serde::Serialize;
use servo_arc::Arc;
use style::computed_values::clear::T as Clear;
use style::computed_values::float::T as Float;

View file

@ -23,6 +23,7 @@ use crate::DefiniteContainingBlock;
use atomic_refcell::AtomicRef;
use script_layout_interface::wrapper_traits::LayoutNode;
use script_layout_interface::{LayoutElementType, LayoutNodeType};
use serde::Serialize;
use servo_arc::Arc;
use style::dom::OpaqueNode;
use style::properties::ComputedValues;

View file

@ -13,6 +13,7 @@ use crate::replaced::ReplacedContent;
use crate::sizing::{self, ContentSizes};
use crate::style_ext::DisplayInside;
use crate::ContainingBlock;
use serde::Serialize;
use servo_arc::Arc;
use std::convert::TryInto;
use style::logical_geometry::WritingMode;

View file

@ -5,6 +5,7 @@
use crate::layout_debug::DebugId;
use bitflags::bitflags;
use gfx_traits::{combine_id_with_fragment_type, FragmentType};
use serde::Serialize;
use style::dom::OpaqueNode;
use style::selector_parser::PseudoElement;

View file

@ -7,6 +7,7 @@ use crate::cell::ArcRefCell;
use crate::geom::flow_relative::{Rect, Sides};
use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize};
use gfx_traits::print_tree::PrintTree;
use serde::Serialize;
use servo_arc::Arc as ServoArc;
use style::computed_values::overflow_x::T as ComputedOverflow;
use style::computed_values::position::T as ComputedPosition;

View file

@ -11,6 +11,7 @@ use gfx::font::FontMetrics as GfxFontMetrics;
use gfx::text::glyph::GlyphStore;
use gfx_traits::print_tree::PrintTree;
use msg::constellation_msg::{BrowsingContextId, PipelineId};
use serde::Serialize;
use servo_arc::Arc as ServoArc;
use std::sync::Arc;
use style::logical_geometry::WritingMode;

View file

@ -11,6 +11,7 @@ use app_units::Au;
use euclid::default::{Point2D, Rect, Size2D};
use fxhash::FxHashSet;
use gfx_traits::print_tree::PrintTree;
use serde::Serialize;
use style::animation::AnimationSetKey;
use style::dom::OpaqueNode;
use style::values::computed::Length;

View file

@ -4,6 +4,7 @@
use super::Fragment;
use crate::{cell::ArcRefCell, geom::flow_relative::Vec2};
use serde::Serialize;
use style::values::computed::{Length, LengthPercentage};
/// A reference to a Fragment which is shared between `HoistedAbsolutelyPositionedBox`

View file

@ -20,6 +20,8 @@ pub type LengthOrAuto = AutoOr<Length>;
pub type LengthPercentageOrAuto<'a> = AutoOr<&'a LengthPercentage>;
pub mod flow_relative {
use serde::Serialize;
#[derive(Clone, Serialize)]
pub struct Vec2<T> {
pub inline: T,

View file

@ -8,7 +8,8 @@
use crate::flow::BoxTree;
use crate::fragment_tree::FragmentTree;
#[cfg(not(debug_assertions))]
use serde::ser::{Serialize, Serializer};
use serde::ser::Serializer;
use serde::Serialize;
use serde_json::{to_string, to_value, Value};
use std::cell::RefCell;
use std::fs;

View file

@ -5,11 +5,6 @@
#![deny(unsafe_code)]
#![feature(once_cell)]
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde;
mod cell;
pub mod context;
pub mod display_list;

View file

@ -16,6 +16,7 @@ use crate::style_ext::{ComputedValuesExt, DisplayInside};
use crate::{ContainingBlock, DefiniteContainingBlock};
use rayon::iter::IntoParallelRefMutIterator;
use rayon::prelude::{IndexedParallelIterator, ParallelIterator};
use serde::Serialize;
use style::computed_values::position::T as Position;
use style::properties::ComputedValues;
use style::values::computed::{CSSPixelLength, Length};

View file

@ -9,6 +9,7 @@ use app_units::Au;
use euclid::default::{Point2D, Rect};
use euclid::Size2D;
use euclid::Vector2D;
use log::warn;
use msg::constellation_msg::PipelineId;
use script_layout_interface::rpc::TextIndexResponse;
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};

View file

@ -15,6 +15,7 @@ use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::{BrowsingContextId, PipelineId};
use net_traits::image::base::Image;
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
use serde::Serialize;
use servo_arc::Arc as ServoArc;
use std::fmt;
use std::sync::{Arc, Mutex};

View file

@ -5,6 +5,7 @@
//! https://drafts.csswg.org/css-sizing/
use crate::style_ext::ComputedValuesExt;
use serde::Serialize;
use style::logical_geometry::WritingMode;
use style::properties::longhands::box_sizing::computed_value::T as BoxSizing;
use style::properties::ComputedValues;

View file

@ -4,8 +4,7 @@
//! Property-based randomized testing for the core float layout algorithm.
#[macro_use]
extern crate lazy_static;
use lazy_static::lazy_static;
use euclid::num::Zero;
use layout_2020::flow::float::{ContainingBlockPositionInfo, FloatSide, PlacementInfo};