style: Update animations when a pseudo-element had animations but no longer has, and has been re-framed in the meantime.

This is the easy fix.

The hard fix (outlined in the comment) would be nice, but I don't think this bug
alone justifies it.

Differential Revision: https://phabricator.services.mozilla.com/D38184
This commit is contained in:
Emilio Cobos Álvarez 2019-07-16 15:42:08 +00:00
parent 59cf10d1b0
commit 137044a3db
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 26 additions and 6 deletions

View file

@ -117,9 +117,14 @@ impl ComputedValues {
).to_outer(None)
}
#[inline]
pub fn is_pseudo_style(&self) -> bool {
self.0.mPseudoType != PseudoStyleType::NotPseudo
}
#[inline]
pub fn pseudo(&self) -> Option<PseudoElement> {
if self.0.mPseudoType == PseudoStyleType::NotPseudo {
if !self.is_pseudo_style() {
return None;
}
PseudoElement::from_pseudo_type(self.0.mPseudoType)