style: Drop frames() timing function.

frames() timing function was removed from the spec, so we drop it.
Besides, some devtool tests are removed because they use frame(). I will
add them back by using new step function later.

Differential Revision: https://phabricator.services.mozilla.com/D9309
This commit is contained in:
Boris Chiou 2018-10-26 18:03:24 +00:00 committed by Emilio Cobos Álvarez
parent 990f2c6bb9
commit 3a536f463c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 4 additions and 71 deletions

View file

@ -350,19 +350,6 @@ impl<S> OriginComponent<S> {
}
}
#[cfg(feature = "gecko")]
#[inline]
fn allow_frames_timing() -> bool {
use gecko_bindings::structs::mozilla;
unsafe { mozilla::StaticPrefs_sVarCache_layout_css_frames_timing_enabled }
}
#[cfg(feature = "servo")]
#[inline]
fn allow_frames_timing() -> bool {
true
}
impl Parse for TimingFunction {
fn parse<'i, 't>(
context: &ParserContext,
@ -406,14 +393,6 @@ impl Parse for TimingFunction {
}).unwrap_or(StepPosition::End);
Ok(generic::TimingFunction::Steps(steps, position))
},
"frames" => {
if allow_frames_timing() {
let frames = Integer::parse_with_minimum(context, i, 2)?;
Ok(generic::TimingFunction::Frames(frames))
} else {
Err(())
}
},
_ => Err(()),
}).map_err(|()| {
location.new_custom_error(StyleParseErrorKind::UnexpectedFunction(function.clone()))
@ -440,9 +419,6 @@ impl ToComputedValue for TimingFunction {
generic::TimingFunction::Steps(steps, position) => {
generic::TimingFunction::Steps(steps.to_computed_value(context) as u32, position)
},
generic::TimingFunction::Frames(frames) => {
generic::TimingFunction::Frames(frames.to_computed_value(context) as u32)
},
}
}
@ -465,9 +441,6 @@ impl ToComputedValue for TimingFunction {
Integer::from_computed_value(&(steps as i32)),
position,
),
generic::TimingFunction::Frames(frames) => {
generic::TimingFunction::Frames(Integer::from_computed_value(&(frames as i32)))
},
}
}
}