mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Fix tidy
This commit is contained in:
parent
eb82cc25ef
commit
1e7973263f
4 changed files with 17 additions and 18 deletions
|
@ -7,10 +7,10 @@
|
|||
//!
|
||||
//! [basic-shape]: https://drafts.csswg.org/css-shapes/#typedef-basic-shape
|
||||
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
use values::computed::position::Position;
|
||||
use std::fmt;
|
||||
use cssparser::ToCss;
|
||||
use std::fmt;
|
||||
use values::computed::position::Position;
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
|
@ -86,8 +86,8 @@ pub struct Ellipse {
|
|||
|
||||
impl ToCss for Ellipse {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
if ShapeRadius::ClosestSide != self.semiaxis_a
|
||||
&& ShapeRadius::ClosestSide != self.semiaxis_b {
|
||||
if ShapeRadius::ClosestSide != self.semiaxis_a &&
|
||||
ShapeRadius::ClosestSide != self.semiaxis_b {
|
||||
try!(self.semiaxis_a.to_css(dest));
|
||||
try!(dest.write_str(" "));
|
||||
try!(self.semiaxis_b.to_css(dest));
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
//! [position]: https://drafts.csswg.org/css-backgrounds-3/#position
|
||||
|
||||
use cssparser::ToCss;
|
||||
use values::computed::LengthOrPercentage;
|
||||
use std::fmt;
|
||||
use values::computed::LengthOrPercentage;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Copy)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
//! [basic-shape]: https://drafts.csswg.org/css-shapes/#typedef-basic-shape
|
||||
|
||||
use app_units::Au;
|
||||
use std::fmt;
|
||||
use cssparser::{Parser, ToCss};
|
||||
use properties::shorthands::parse_four_sides;
|
||||
use values::specified::{BorderRadiusSize, Length, LengthOrPercentage};
|
||||
use values::specified::position::{Position, PositionComponent};
|
||||
use values::computed::{Context, ToComputedValue, ComputedValueAsSpecified};
|
||||
use std::fmt;
|
||||
use values::computed::basic_shape as computed_basic_shape;
|
||||
use values::computed::{Context, ToComputedValue, ComputedValueAsSpecified};
|
||||
use values::specified::position::{Position, PositionComponent};
|
||||
use values::specified::{BorderRadiusSize, Length, LengthOrPercentage};
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
|
@ -87,7 +87,7 @@ impl InsetRect {
|
|||
}
|
||||
}
|
||||
pub fn parse_function(input: &mut Parser) -> Result<InsetRect, ()> {
|
||||
let (t,r,b,l) = try!(parse_four_sides(input, LengthOrPercentage::parse));
|
||||
let (t, r, b, l) = try!(parse_four_sides(input, LengthOrPercentage::parse));
|
||||
let mut rect = InsetRect {
|
||||
top: t,
|
||||
right: r,
|
||||
|
@ -230,8 +230,8 @@ impl Ellipse {
|
|||
|
||||
impl ToCss for Ellipse {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
if ShapeRadius::ClosestSide != self.semiaxis_a
|
||||
&& ShapeRadius::ClosestSide != self.semiaxis_b {
|
||||
if ShapeRadius::ClosestSide != self.semiaxis_a &&
|
||||
ShapeRadius::ClosestSide != self.semiaxis_b {
|
||||
try!(self.semiaxis_a.to_css(dest));
|
||||
try!(dest.write_str(" "));
|
||||
try!(self.semiaxis_b.to_css(dest));
|
||||
|
|
|
@ -7,13 +7,12 @@
|
|||
//!
|
||||
//! [position]: https://drafts.csswg.org/css-backgrounds-3/#position
|
||||
|
||||
use std::fmt;
|
||||
use cssparser::{Parser, ToCss, Token};
|
||||
use std::fmt;
|
||||
use values::HasViewportPercentage;
|
||||
use values::specified::{LengthOrPercentage, Percentage};
|
||||
use values::computed::{Context, ToComputedValue};
|
||||
|
||||
use values::computed::position as computed_position;
|
||||
use values::computed::{Context, ToComputedValue};
|
||||
use values::specified::{LengthOrPercentage, Percentage};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Copy)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
|
@ -152,4 +151,4 @@ impl PositionComponent {
|
|||
PositionComponent::Bottom => LengthOrPercentage::Percentage(Percentage(1.0)),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue