style: Split apply_declarations into its own file, and without mako.

All that font code thrown out in the middle was making me mad.

There should be no change in behavior from this patch.

I ran rustfmt on the code but I corrected manually the following:

  https://github.com/rust-lang-nursery/rustfmt/issues/3025

Differential Revision: https://phabricator.services.mozilla.com/D5970
This commit is contained in:
Emilio Cobos Álvarez 2018-09-17 14:08:29 +00:00
parent 1e1eca07ed
commit 8040c8bfec
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 830 additions and 576 deletions

View file

@ -317,12 +317,12 @@ impl Color {
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError))
}
/// Returns false if the color is completely transparent, and
/// true otherwise.
pub fn is_non_transparent(&self) -> bool {
/// Returns true if the color is completely transparent, and false
/// otherwise.
pub fn is_transparent(&self) -> bool {
match *self {
Color::Numeric { ref parsed, .. } => parsed.alpha != 0,
_ => true,
Color::Numeric { ref parsed, .. } => parsed.alpha == 0,
_ => false,
}
}
}