зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1234403 - Part 2: Implement document.getAnimations. r=birtles
This commit is contained in:
Родитель
1c9da6a517
Коммит
277bbf98a5
|
@ -3141,13 +3141,6 @@ nsDocument::GetAnimations(nsTArray<RefPtr<Animation>>& aAnimations)
|
|||
{
|
||||
FlushPendingNotifications(Flush_Style);
|
||||
|
||||
// Bug 1174575: Until we implement a suitable PseudoElement interface we
|
||||
// don't have anything to return for the |target| attribute of
|
||||
// KeyframeEffect(ReadOnly) objects that refer to pseudo-elements.
|
||||
// Rather than return some half-baked version of these objects (e.g.
|
||||
// we a null effect attribute) we simply don't provide access to animations
|
||||
// whose effect refers to a pseudo-element until we can support them
|
||||
// properly.
|
||||
for (nsIContent* node = nsINode::GetFirstChild();
|
||||
node;
|
||||
node = node->GetNextNode(this)) {
|
||||
|
@ -3155,8 +3148,12 @@ nsDocument::GetAnimations(nsTArray<RefPtr<Animation>>& aAnimations)
|
|||
continue;
|
||||
}
|
||||
|
||||
Element::GetAnimationsUnsorted(node->AsElement(),
|
||||
CSSPseudoElementType::NotPseudo,
|
||||
Element* element = node->AsElement();
|
||||
Element::GetAnimationsUnsorted(element, CSSPseudoElementType::NotPseudo,
|
||||
aAnimations);
|
||||
Element::GetAnimationsUnsorted(element, CSSPseudoElementType::before,
|
||||
aAnimations);
|
||||
Element::GetAnimationsUnsorted(element, CSSPseudoElementType::after,
|
||||
aAnimations);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче