From f287691f2eb13e7f014529ec4d677e9b92cd16ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 9 Oct 2018 20:27:38 +0200 Subject: [PATCH] style: fix tidy issues and update test expectations. --- components/style/font_face.rs | 2 +- components/style/gecko/conversions.rs | 2 +- components/style/gecko/url.rs | 2 +- .../gradient/color-stops-parsing.html.ini | 47 ------------------- ...iple-position-color-stop-linear-2.html.ini | 2 - ...ltiple-position-color-stop-linear.html.ini | 2 - ...ltiple-position-color-stop-radial.html.ini | 2 - 7 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini delete mode 100644 tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear.html.ini delete mode 100644 tests/wpt/metadata/css/css-images/multiple-position-color-stop-radial.html.ini diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 987ddb829b65..b78947dd4008 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -161,7 +161,7 @@ impl FontWeightRange { /// The font-stretch descriptor: /// /// https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-stretch -#[derive(Clone, Debug, PartialEq,)] +#[derive(Clone, Debug, PartialEq)] pub struct FontStretchRange(pub FontStretch, pub FontStretch); impl_range!(FontStretchRange, FontStretch); diff --git a/components/style/gecko/conversions.rs b/components/style/gecko/conversions.rs index bc0894c58d61..846f2113f777 100644 --- a/components/style/gecko/conversions.rs +++ b/components/style/gecko/conversions.rs @@ -110,8 +110,8 @@ impl From for LengthOrPercentageOrAuto { // disappear as we move more stuff to cbindgen. impl From for NonNegativeLengthOrPercentageOrAuto { fn from(other: nsStyleCoord_CalcValue) -> Self { - use values::generics::NonNegative; use style_traits::values::specified::AllowedNumericType; + use values::generics::NonNegative; NonNegative(if other.mLength < 0 || other.mPercent < 0. { LengthOrPercentageOrAuto::Calc( CalcLengthOrPercentage::with_clamping_mode( diff --git a/components/style/gecko/url.rs b/components/style/gecko/url.rs index 24bd9b66f97a..8390196c5238 100644 --- a/components/style/gecko/url.rs +++ b/components/style/gecko/url.rs @@ -276,7 +276,7 @@ impl ToComputedValue for SpecifiedImageUrl { fn serialize_computed_url( url_value_data: &URLValueData, dest: &mut CssWriter, - get_url: unsafe extern "C" fn(*const URLValueData, *mut nsCString) -> (), + get_url: unsafe extern "C" fn(*const URLValueData, *mut nsCString), ) -> fmt::Result where W: Write, diff --git a/tests/wpt/metadata/css/css-images/gradient/color-stops-parsing.html.ini b/tests/wpt/metadata/css/css-images/gradient/color-stops-parsing.html.ini index 621329fc00d9..5349947628e8 100644 --- a/tests/wpt/metadata/css/css-images/gradient/color-stops-parsing.html.ini +++ b/tests/wpt/metadata/css/css-images/gradient/color-stops-parsing.html.ini @@ -1,51 +1,4 @@ [color-stops-parsing.html] - [linear-gradient(black 0% 50%, white) [ parsable \]] - expected: FAIL - - [linear-gradient(black 0% 50%, white 50% 100%) [ parsable \]] - expected: FAIL - - [linear-gradient(black 0% 50%, green 25% 75%, white 50% 100%) [ parsable \]] - expected: FAIL - - [linear-gradient(black 0% calc(100% / 5), 25%, green 30% 60%, calc(100% * 3 / 4), white calc(100% - 20%) 100%) [ parsable \]] - expected: FAIL - - [repeating-linear-gradient(black 0% 50%, white) [ parsable \]] - expected: FAIL - - [repeating-linear-gradient(black 0% 50%, white 50% 100%) [ parsable \]] - expected: FAIL - - [repeating-linear-gradient(black 0% 50%, green 25% 75%, white 50% 100%) [ parsable \]] - expected: FAIL - - [repeating-linear-gradient(black 0% calc(100% / 5), 25%, green 30% 60%, calc(100% * 3 / 4), white calc(100% - 20%) 100%) [ parsable \]] - expected: FAIL - - [radial-gradient(black 0% 50%, white) [ parsable \]] - expected: FAIL - - [radial-gradient(black 0% 50%, white 50% 100%) [ parsable \]] - expected: FAIL - - [radial-gradient(black 0% 50%, green 25% 75%, white 50% 100%) [ parsable \]] - expected: FAIL - - [radial-gradient(black 0% calc(100% / 5), 25%, green 30% 60%, calc(100% * 3 / 4), white calc(100% - 20%) 100%) [ parsable \]] - expected: FAIL - - [repeating-radial-gradient(black 0% 50%, white) [ parsable \]] - expected: FAIL - - [repeating-radial-gradient(black 0% 50%, white 50% 100%) [ parsable \]] - expected: FAIL - - [repeating-radial-gradient(black 0% 50%, green 25% 75%, white 50% 100%) [ parsable \]] - expected: FAIL - - [repeating-radial-gradient(black 0% calc(100% / 5), 25%, green 30% 60%, calc(100% * 3 / 4), white calc(100% - 20%) 100%) [ parsable \]] - expected: FAIL [conic-gradient(black, white) [ parsable \]] expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini b/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini deleted file mode 100644 index 5c6ef248505b..000000000000 --- a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[multiple-position-color-stop-linear-2.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear.html.ini b/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear.html.ini deleted file mode 100644 index b3e0af9f675f..000000000000 --- a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[multiple-position-color-stop-linear.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-radial.html.ini b/tests/wpt/metadata/css/css-images/multiple-position-color-stop-radial.html.ini deleted file mode 100644 index 1d178cb52804..000000000000 --- a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-radial.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[multiple-position-color-stop-radial.html] - expected: FAIL