style: Undo the optimization for grabbing animation rules from the style data.

This is unfortunate, but for now it complicates things, I would like not needing
a ElementData to get the style of an Element in order to fix all the
getDefaultComputedStyle bugs.

MozReview-Commit-ID: LZvsdFEqrDE
This commit is contained in:
Emilio Cobos Álvarez 2017-07-09 21:01:00 +02:00
parent 95a2ac51c4
commit cc94a8b7cb
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 51 additions and 86 deletions

View file

@ -28,10 +28,10 @@ use values::computed::Context;
///
/// The first one is for Animation cascade level, and the second one is for
/// Transition cascade level.
pub struct AnimationRules<'a>(pub Option<&'a Arc<Locked<PropertyDeclarationBlock>>>,
pub Option<&'a Arc<Locked<PropertyDeclarationBlock>>>);
pub struct AnimationRules(pub Option<Arc<Locked<PropertyDeclarationBlock>>>,
pub Option<Arc<Locked<PropertyDeclarationBlock>>>);
impl<'a> AnimationRules<'a> {
impl AnimationRules {
/// Returns whether these animation rules represents an actual rule or not.
pub fn is_empty(&self) -> bool {
self.0.is_none() && self.1.is_none()