mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
style: Remove some redundant use statements.
This commit is contained in:
parent
c106fb1231
commit
b268ef6aed
7 changed files with 4 additions and 20 deletions
|
@ -418,10 +418,8 @@ impl nsStyleImage {
|
|||
use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE;
|
||||
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER;
|
||||
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE;
|
||||
use crate::values::computed::image::LineDirection;
|
||||
use crate::values::computed::position::Position;
|
||||
use crate::values::computed::Length;
|
||||
use crate::values::generics::image::{Circle, ColorStop, CompatMode, Ellipse};
|
||||
use crate::values::generics::image::{Circle, ColorStop, Ellipse};
|
||||
use crate::values::generics::image::{EndingShape, GradientKind, ShapeExtent};
|
||||
|
||||
let gecko_gradient = bindings::Gecko_GetGradientImageValue(self)
|
||||
|
@ -834,8 +832,7 @@ impl TrackSize<LengthPercentage> {
|
|||
/// Return TrackSize from given two nsStyleCoord
|
||||
pub fn from_gecko_style_coords<T: CoordData>(gecko_min: &T, gecko_max: &T) -> Self {
|
||||
use crate::gecko_bindings::structs::root::nsStyleUnit;
|
||||
use crate::values::computed::length::LengthPercentage;
|
||||
use crate::values::generics::grid::{TrackBreadth, TrackSize};
|
||||
use crate::values::generics::grid::TrackBreadth;
|
||||
|
||||
if gecko_min.unit() == nsStyleUnit::eStyleUnit_None {
|
||||
debug_assert!(
|
||||
|
@ -862,8 +859,6 @@ impl TrackSize<LengthPercentage> {
|
|||
|
||||
/// Save TrackSize to given gecko fields.
|
||||
pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) {
|
||||
use crate::values::generics::grid::TrackSize;
|
||||
|
||||
match *self {
|
||||
TrackSize::FitContent(ref lop) => {
|
||||
// Gecko sets min value to None and max value to the actual value in fit-content
|
||||
|
@ -893,8 +888,6 @@ impl TrackListValue<LengthPercentage, Integer> {
|
|||
|
||||
/// Save TrackSize to given gecko fields.
|
||||
pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) {
|
||||
use crate::values::generics::grid::TrackListValue;
|
||||
|
||||
match *self {
|
||||
TrackListValue::TrackSize(ref size) => size.to_gecko_style_coords(gecko_min, gecko_max),
|
||||
_ => unreachable!("Should only transform from track-size computed values"),
|
||||
|
@ -918,8 +911,6 @@ where
|
|||
pub fn from_gecko_rect(
|
||||
sides: &crate::gecko_bindings::structs::nsStyleSides,
|
||||
) -> Option<crate::values::generics::rect::Rect<T>> {
|
||||
use crate::values::generics::rect::Rect;
|
||||
|
||||
Some(Rect::new(
|
||||
T::from_gecko_style_coord(&sides.data_at(0)).expect("coord[0] cound not convert"),
|
||||
T::from_gecko_style_coord(&sides.data_at(1)).expect("coord[1] cound not convert"),
|
||||
|
|
|
@ -317,7 +317,6 @@ impl GeckoStyleCoordConvertible for ScrollSnapPoint<LengthPercentage> {
|
|||
|
||||
fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
|
||||
use crate::gecko_bindings::structs::root::nsStyleUnit;
|
||||
use crate::values::generics::gecko::ScrollSnapPoint;
|
||||
|
||||
Some(match coord.unit() {
|
||||
nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None,
|
||||
|
|
|
@ -986,7 +986,6 @@ fn get_animation_rule(
|
|||
element: &GeckoElement,
|
||||
cascade_level: CascadeLevel,
|
||||
) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
||||
use crate::gecko_bindings::sugar::ownership::HasSimpleFFI;
|
||||
use crate::properties::longhands::ANIMATABLE_PROPERTY_COUNT;
|
||||
|
||||
// There's a very rough correlation between the number of effects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue