Commit 61b1cac7 authored by Boris Chiou's avatar Boris Chiou
Browse files

Bug 1676791 - Part 6: Prevent getAnimations() from returning scroll-linked animations. r=hiro

So we don't expose scroll-linked animations to script.

Differential Revision: https://phabricator.services.mozilla.com/D129102
parent fcbeb1d2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3618,6 +3618,13 @@ void Element::GetAnimationsUnsorted(Element* aElement,
               "added to an element's effect set");
    Animation* animation = effect->GetAnimation();

    // FIXME: Bug 1676795: Don't expose scroll-linked animations because we are
    // not ready.
    if (animation->GetTimeline() &&
        animation->GetTimeline()->IsScrollTimeline()) {
      continue;
    }

    MOZ_ASSERT(animation->IsRelevant(),
               "Only relevant animations should be added to an element's "
               "effect set");