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
This commit is contained in:
Boris Chiou 2021-12-08 01:16:30 +00:00
Родитель fcbeb1d2b0
Коммит 61b1cac7bb
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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");