style: fix tidy issues and update test expectations.

This commit is contained in:
Emilio Cobos Álvarez 2018-10-09 20:27:38 +02:00
parent 912d65a392
commit f287691f2e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 3 additions and 56 deletions

View file

@ -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);

View file

@ -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(

View file

@ -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,

View file

@ -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

View file

@ -1,2 +0,0 @@
[multiple-position-color-stop-linear-2.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[multiple-position-color-stop-linear.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[multiple-position-color-stop-radial.html]
expected: FAIL