[Web Animations] Tests using the new animation engine may crash under WebCore::FrameV...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 May 2018 18:19:30 +0000 (18:19 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 May 2018 18:19:30 +0000 (18:19 +0000)
commitdd053e6b2b06d89b05c93bd77b45ba6aae1249b1
treef116e704404f9fa5ed60b5c5fe33138cff6660e5
parent54420598e5d0ffd24cd7d9c5245c03e343bf868b
[Web Animations] Tests using the new animation engine may crash under WebCore::FrameView::didDestroyRenderTree when using internals methods
https://bugs.webkit.org/show_bug.cgi?id=185612
<rdar://problem/39579344>

Reviewed by Dean Jackson.

Source/WebCore:

Add a new internals.pseudoElement() method to obtain a pseudo element matching a given pseudo-id. This is necessary to be able to move off
internals.pauseTransitionAtTimeOnPseudoElement() and internals.pauseAnimationAtTimeOnPseudoElement() for Web Animations testing.

* testing/Internals.cpp:
(WebCore::Internals::pseudoElement):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Some tests that were opting into the new animation engine were using internals methods (pauseAnimationAtTimeOnElement, pauseTransitionAtTimeOnElement, etc.)
that enforce the creation of animations in the old animation engine. Meanwhile, the code that toggles the animation engine used based on HTML comments is run
prior to teardown of the previous test and so a test running with the new engine would run with the legacy engine during teardown. These two factors would
cause `ASSERT(!frame().animation().hasAnimations())` to fail under FrameView::didDestroyRenderTree().

We update tests that use these internals method to use the Web Animations API instead and opt into the new animation engine if they didn't already do that.

* animations/animation-hit-test-transform.html:
* animations/keyframes-dynamic-expected.txt:
* animations/keyframes-dynamic.html:
* animations/missing-from-to-expected.txt:
* animations/missing-from-to-transforms-expected.txt:
* animations/missing-from-to-transforms.html:
* animations/missing-from-to.html:
* fast/css-generated-content/pseudo-animation.html:
* transitions/transition-hit-test-transform.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/animation-hit-test-transform.html
LayoutTests/animations/keyframes-dynamic-expected.txt
LayoutTests/animations/keyframes-dynamic.html
LayoutTests/animations/missing-from-to-expected.txt
LayoutTests/animations/missing-from-to-transforms-expected.txt
LayoutTests/animations/missing-from-to-transforms.html
LayoutTests/animations/missing-from-to.html
LayoutTests/fast/css-generated-content/pseudo-animation.html
LayoutTests/transitions/transition-hit-test-transform.html
Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl