aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-10-09 20:27:38 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-10-09 22:01:38 +0200
commitf287691f2eb13e7f014529ec4d677e9b92cd16ea (patch)
tree606e0c1ce607fc853162c0a0e49daff57fa494f0
parent912d65a3928db83463c9f37cd757e149ff004a5b (diff)
downloadservo-f287691f2eb13e7f014529ec4d677e9b92cd16ea.tar.gz
servo-f287691f2eb13e7f014529ec4d677e9b92cd16ea.zip
style: fix tidy issues and update test expectations.
-rw-r--r--components/style/font_face.rs2
-rw-r--r--components/style/gecko/conversions.rs2
-rw-r--r--components/style/gecko/url.rs2
-rw-r--r--tests/wpt/metadata/css/css-images/gradient/color-stops-parsing.html.ini47
-rw-r--r--tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-images/multiple-position-color-stop-radial.html.ini2
7 files changed, 3 insertions, 56 deletions
diff --git a/components/style/font_face.rs b/components/style/font_face.rs
index 987ddb829b6..b78947dd400 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 bc0894c58d6..846f2113f77 100644
--- a/components/style/gecko/conversions.rs
+++ b/components/style/gecko/conversions.rs
@@ -110,8 +110,8 @@ impl From<nsStyleCoord_CalcValue> for LengthOrPercentageOrAuto {
// disappear as we move more stuff to cbindgen.
impl From<nsStyleCoord_CalcValue> 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 24bd9b66f97..8390196c523 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<W>(
url_value_data: &URLValueData,
dest: &mut CssWriter<W>,
- 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 621329fc00d..5349947628e 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 5c6ef248505..00000000000
--- 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 b3e0af9f675..00000000000
--- 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 1d178cb5280..00000000000
--- 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