Skip to content

Commit

Permalink
Use NormalDeclarationIterator for AnimationValueIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroyuki Ikezoe committed Oct 2, 2017
1 parent e13f5a6 commit c8c02aa
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions components/style/properties/declaration_block.rs
Expand Up @@ -148,7 +148,7 @@ impl<'a> Iterator for NormalDeclarationIterator<'a> {

/// Iterator for AnimationValue to be generated from PropertyDeclarationBlock.
pub struct AnimationValueIterator<'a, 'cx, 'cx_a:'cx> {
iter: DeclarationImportanceIterator<'a>,
iter: NormalDeclarationIterator<'a>,
context: &'cx mut Context<'cx_a>,
default_values: &'a ComputedValues,
/// Custom properties in a keyframe if exists.
Expand All @@ -163,7 +163,7 @@ impl<'a, 'cx, 'cx_a:'cx> AnimationValueIterator<'a, 'cx, 'cx_a> {
extra_custom_properties: Option<&'a Arc<::custom_properties::CustomPropertiesMap>>,
) -> AnimationValueIterator<'a, 'cx, 'cx_a> {
AnimationValueIterator {
iter: declarations.declaration_importance_iter(),
iter: declarations.normal_declaration_iter(),
context,
default_values,
extra_custom_properties,
Expand All @@ -177,15 +177,11 @@ impl<'a, 'cx, 'cx_a:'cx> Iterator for AnimationValueIterator<'a, 'cx, 'cx_a> {
fn next(&mut self) -> Option<Self::Item> {
loop {
let next = self.iter.next();
let (decl, importance) = match next {
Some(decl_and_importance) => decl_and_importance,
let decl = match next {
Some(decl) => decl,
None => return None,
};

if importance.important() {
continue;
}

let animation = AnimationValue::from_declaration(
decl,
&mut self.context,
Expand Down

0 comments on commit c8c02aa

Please sign in to comment.