mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
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:
parent
1e1eca07ed
commit
8040c8bfec
3 changed files with 830 additions and 576 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue