layout: Add a new cascading mode that inherits all properties, even

non-inheritable ones.

This works like the `modify_style_for_*` functions and will allow us to
easily migrate from them to real cascading.
This commit is contained in:
Patrick Walton 2016-10-24 18:00:06 -07:00
parent 93e41ba4aa
commit fb2d1e1020
6 changed files with 86 additions and 43 deletions

View file

@ -9,7 +9,7 @@ use context::SharedStyleContext;
use dom::{OpaqueNode, UnsafeNode};
use euclid::point::Point2D;
use keyframes::{KeyframesStep, KeyframesStepValue};
use properties::{self, ComputedValues, Importance};
use properties::{self, CascadeFlags, ComputedValues, Importance};
use properties::animated_properties::{AnimatedProperty, TransitionProperty};
use properties::longhands::animation_direction::computed_value::AnimationDirection;
use properties::longhands::animation_iteration_count::computed_value::AnimationIterationCount;
@ -397,11 +397,11 @@ fn compute_style_for_animation_step(context: &SharedStyleContext,
};
let (computed, _) = properties::cascade(context.viewport_size,
&[declaration_block],
false,
Some(previous_style),
None,
None,
context.error_reporter.clone());
context.error_reporter.clone(),
CascadeFlags::empty());
computed
}
}