Skip to content

Commit

Permalink
style: Fix Servo build.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Nov 4, 2019
1 parent a44515c commit 0f512b4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 6 additions & 2 deletions components/style/media_queries/media_feature_expression.rs
Expand Up @@ -242,9 +242,13 @@ fn consume_operation_or_colon(input: &mut Parser) -> Result<Option<Operator>, ()
}))
}

#[allow(unused_variables)]
fn disabled_by_pref(feature: &Atom) -> bool {
if *feature == atom!("-moz-touch-enabled") {
return !static_prefs::pref!("layout.css.moz-touch-enabled.enabled");
#[cfg(feature = "gecko")]
{
if *feature == atom!("-moz-touch-enabled") {
return !static_prefs::pref!("layout.css.moz-touch-enabled.enabled");
}
}
false
}
Expand Down
11 changes: 7 additions & 4 deletions components/style/properties/properties.mako.rs
Expand Up @@ -1877,10 +1877,13 @@ impl PropertyId {
return Ok(match *id {
StaticId::Longhand(id) => PropertyId::Longhand(id),
StaticId::Shorthand(id) => {
// We want to count `zoom` even if disabled.
if matches!(id, ShorthandId::Zoom) {
if let Some(counters) = use_counters {
counters.non_custom_properties.record(id.into());
#[cfg(feature = "gecko")]
{
// We want to count `zoom` even if disabled.
if matches!(id, ShorthandId::Zoom) {
if let Some(counters) = use_counters {
counters.non_custom_properties.record(id.into());
}
}
}

Expand Down
1 change: 0 additions & 1 deletion components/style/values/computed/length.rs
Expand Up @@ -607,7 +607,6 @@ impl Size {
}

/// The computed `<length>` value.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[derive(
Animate,
Clone,
Expand Down

0 comments on commit 0f512b4

Please sign in to comment.