haikuwebkit/LayoutTests/animations/animation-hit-test.html

96 lines
3.2 KiB
HTML
Raw Permalink Normal View History

[Web Animations] Turn Web Animations with CSS integration on https://bugs.webkit.org/show_bug.cgi?id=184819 <rdar://problem/39597337> Reviewed by Dean Jackson. LayoutTests/imported/mozilla: * css-animations/test_animation-cancel.html: * css-animations/test_animation-computed-timing.html: * css-animations/test_animation-currenttime.html: * css-animations/test_animation-finish.html: * css-animations/test_animation-finished.html: * css-animations/test_animation-id.html: * css-animations/test_animation-pausing.html: * css-animations/test_animation-playstate.html: * css-animations/test_animation-ready.html: * css-animations/test_animation-reverse.html: * css-animations/test_animation-starttime.html: * css-animations/test_animations-dynamic-changes.html: * css-animations/test_cssanimation-animationname.html: * css-animations/test_document-get-animations.html: * css-animations/test_effect-target.html: * css-animations/test_element-get-animations.html: * css-animations/test_event-dispatch.html: * css-animations/test_event-order.html: * css-animations/test_keyframeeffect-getkeyframes.html: * css-animations/test_pseudoElement-get-animations.html: * css-animations/test_setting-effect.html: * css-transitions/test_animation-cancel.html: * css-transitions/test_animation-computed-timing.html: * css-transitions/test_animation-currenttime.html: * css-transitions/test_animation-finished.html: * css-transitions/test_animation-pausing.html: * css-transitions/test_animation-ready.html: * css-transitions/test_animation-starttime.html: * css-transitions/test_csstransition-transitionproperty.html: * css-transitions/test_document-get-animations.html: * css-transitions/test_effect-target.html: * css-transitions/test_element-get-animations.html: * css-transitions/test_event-dispatch.html: * css-transitions/test_keyframeeffect-getkeyframes.html: * css-transitions/test_pseudoElement-get-animations.html: * css-transitions/test_setting-effect.html: LayoutTests/imported/w3c: * web-platform-tests/css-timing-1/frames-timing-functions-output.html: * web-platform-tests/css/css-logical/animation-003.tentative.html: * web-platform-tests/css/css-scoping/keyframes-001.html: * web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context.html: * web-platform-tests/web-animations/interfaces/Animatable/animate.html: * web-platform-tests/web-animations/timing-model/animations/current-time.html: Source/WebCore: * page/RuntimeEnabledFeatures.h: Source/WebKit: * Shared/WebPreferences.yaml: Source/WebKitLegacy/mac: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Source/WebKitLegacy/win: * WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): Tools: * DumpRenderTree/TestOptions.h: LayoutTests: * TestExpectations: * animations/3d/matrix-transform-type-animation.html: * animations/3d/replace-filling-transform.html: * animations/3d/transform-origin-vs-functions.html: * animations/3d/transform-perspective.html: * animations/additive-transform-animations.html: * animations/animation-border-overflow.html: * animations/animation-callback-timestamp.html: * animations/animation-controller-drt-api.html: * animations/animation-direction-alternate-reverse-expected.txt: * animations/animation-direction-alternate-reverse.html: * animations/animation-direction-reverse-fill-mode-hardware.html: * animations/animation-direction-reverse-hardware-opacity.html: * animations/animation-direction-reverse-hardware.html: * animations/animation-direction-reverse-non-hardware.html: * animations/animation-direction-reverse-timing-functions-hardware.html: * animations/animation-direction-reverse-timing-functions.html: * animations/animation-direction.html: * animations/animation-followed-by-transition.html: * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/animation-internals-api-expected.txt: Removed. * animations/animation-internals-api-multiple-keyframes-expected.txt: Removed. * animations/animation-internals-api-multiple-keyframes.html: Removed. * animations/animation-internals-api.html: Removed. * animations/animation-offscreen-to-onscreen.html: * animations/animation-playstate-paused-style-resolution.html: * animations/big-rotation-expected.txt: * animations/big-rotation.html: * animations/change-completed-animation-transform.html: * animations/change-keyframes.html: * animations/combo-transform-rotate+scale.html: * animations/cross-fade-background-image.html: * animations/cross-fade-border-image-source.html: * animations/cross-fade-list-style-image.html: * animations/cross-fade-webkit-mask-box-image.html: * animations/duplicate-keys-expected.html: * animations/duplicate-keys.html: * animations/duplicated-keyframes-name.html: * animations/fill-forwards-end-state.html: * animations/fill-mode-forwards-zero-duration-expected.txt: * animations/fill-mode-forwards-zero-duration.html: * animations/fill-mode-removed.html: * animations/font-variations/font-stretch.html: * animations/font-variations/font-style.html: * animations/font-variations/font-variation-settings-order.html: * animations/font-variations/font-variation-settings-unlike.html: * animations/font-variations/font-variation-settings.html: * animations/font-variations/font-weight.html: * animations/generic-from-to.html: * animations/import.html: * animations/keyframe-multiple-timing-functions-transform.html: * animations/keyframe-timing-functions-transform.html: * animations/keyframe-timing-functions.html: * animations/keyframe-timing-functions2.html: * animations/keyframes-comma-separated.html: * animations/keyframes-dynamic.html: * animations/keyframes-infinite-iterations.html: * animations/keyframes-invalid-keys.html: * animations/keyframes-out-of-order.html: * animations/keyframes.html: * animations/leak-document-with-css-animation.html: * animations/lineheight-animation.html: * animations/longhand-timing-function.html: * animations/matrix-anim.html: * animations/missing-from-to-transforms.html: * animations/missing-from-to.html: * animations/missing-keyframe-properties-repeating.html: * animations/missing-keyframe-properties-timing-function.html: * animations/missing-keyframe-properties.html: * animations/missing-values-first-keyframe.html: * animations/missing-values-last-keyframe.html: * animations/multiple-animations-timing-function.html: * animations/multiple-animations.html: * animations/multiple-keyframes.html: * animations/negative-delay.html: * animations/pause-crash.html: * animations/play-state-start-paused.html: * animations/resources/animation-leak-iframe.html: * animations/simultaneous-start-left.html: * animations/simultaneous-start-transform.html: * animations/spring-function.html: * animations/stacking-context-unchanged-while-running.html: * animations/stop-animation-on-suspend.html: * animations/suspend-resume-animation-events.html: * animations/timing-functions.html: * animations/transition-and-animation-1.html: * animations/transition-and-animation-2.html: * animations/transition-and-animation-3.html: * animations/trigger-container-scroll-boundaries.html: * animations/trigger-container-scroll-empty.html: * animations/trigger-container-scroll-simple.html: * animations/unanimated-style.html: * animations/unprefixed-keyframes.html: * animations/width-using-ems.html: * compositing/animation/animated-composited-inside-hidden.html: * compositing/animation/computed-style-during-delay.html: * compositing/animation/layer-for-filling-animation.html: * compositing/backing/backface-visibility-flip.html: * compositing/backing/transform-transition-from-outside-view.html: * compositing/contents-scale/animating.html: * compositing/layer-creation/animation-overlap-with-children.html: * compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html: * compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html: * compositing/layer-creation/mismatched-transform-transition-overlap.html: * compositing/layer-creation/multiple-keyframes-animation-overlap.html: * compositing/layer-creation/overlap-animation-clipping.html: * compositing/layer-creation/overlap-animation-container.html: * compositing/layer-creation/overlap-animation.html: * compositing/layer-creation/scale-rotation-animation-overlap.html: * compositing/layer-creation/scale-rotation-transition-overlap.html: * compositing/layer-creation/translate-animation-overlap.html: * compositing/layer-creation/translate-scale-animation-overlap.html: * compositing/layer-creation/translate-scale-transition-overlap.html: * compositing/layer-creation/translate-transition-overlap.html: * compositing/overflow/overflow-positioning.html: * compositing/reflections/animation-inside-reflection.html: * compositing/reflections/nested-reflection-animated.html: * compositing/reflections/nested-reflection-transition.html: * compositing/scrolling/touch-scroll-to-clip.html: * compositing/transitions/scale-transition-no-start.html: * compositing/transitions/singular-scale-transition.html: * compositing/visible-rect/animated-from-none.html: * compositing/visible-rect/animated.html: * css3/calc/transitions-dependent.html: * css3/calc/transitions.html: * css3/filters/backdrop/animation.html: * css3/filters/composited-during-animation.html: * css3/filters/filter-animation-from-none-hw.html: * css3/filters/filter-animation-from-none-multi-hw.html: * css3/filters/filter-animation-from-none-multi.html: * css3/filters/filter-animation-from-none.html: * css3/filters/filter-animation-hw.html: * css3/filters/filter-animation-multi-hw.html: * css3/filters/filter-animation-multi.html: * css3/filters/filter-animation.html: * css3/masking/clip-path-animation.html: * fast/animation/css-animation-resuming-when-visible-with-style-change.html: * fast/animation/css-animation-resuming-when-visible-with-style-change2.html: * fast/animation/css-animation-resuming-when-visible.html: * fast/animation/css-animation-throttling-lowPowerMode.html: * fast/animation/height-auto-transition-computed-value.html: * fast/css-generated-content/pseudo-animation.html: * fast/css-generated-content/pseudo-transition.html: * fast/filter-image/filter-image-animation.html: * fast/shapes/shape-outside-floats/shape-outside-animation.html: * fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html: * fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html: * http/wpt/css/css-animations/start-animation-001.html: * imported/blink/transitions/transition-not-interpolable.html: * imported/blink/transitions/unprefixed-transform.html: * platform/ios/TestExpectations: * platform/win/TestExpectations: * transitions/remove-transition-style.html: * transitions/transition-drt-api-delay-expected.txt: Removed. * transitions/transition-drt-api-delay.html: Removed. * transitions/transition-drt-api-expected.txt: Removed. * transitions/transition-drt-api.html: Removed. * transitions/zero-duration-with-non-zero-delay-end.html: Canonical link: https://commits.webkit.org/204981@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-27 09:49:52 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>Test hit testing of left property while animating</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
#target {
position: absolute;
left: 100px;
height: 200px;
width: 200px;
background-color: red;
-webkit-animation-duration: 4s;
-webkit-animation-timing-function: linear;
}
@-webkit-keyframes "anim" {
from { left: 100px; }
to { left: 300px; }
}
.dot {
width: 10px;
height: 10px;
top: 100px;
background-color: yellow;
position:absolute;
}
2009-08-03 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Make the DRT APIs to pause transitions and animations work for accelerated animations <https://bugs.webkit.org/show_bug.cgi?id=27627> <rdar://problem/6442932> Fix the 'pauseAnimationAtTimeOnElementWithId' and 'pauseTransitionAtTimeOnElementWithId' APIs available to LayoutTests to work with accelerated animations and transitions. Done by sending the pause time down to the GraphicsLayer, and using it to stop time on the layer. I also added an assertion to check that the animation has actually started when we try to pause it, to check that the pause time we compute is valid. This revealed a number of tests that tried to pause before animations started, required some amount of test fixing. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::freezeAtTime): * page/animation/AnimationBase.h: * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::pauseAnimationAtTime): (WebCore::CompositeAnimation::pauseTransitionAtTime): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::suspendAnimations): * platform/graphics/GraphicsLayer.h: * platform/graphics/mac/GraphicsLayerCA.h: * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::suspendAnimations): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::suspendAnimations): * rendering/RenderLayerBacking.h: Canonical link: https://commits.webkit.org/38333@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@46727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-03 19:40:12 +00:00
</style>
2011-04-25 Simon Fraser <simon.fraser@apple.com> Reviewed by Daniel Bates. Move animation-test-helpers.js into resources directory https://bugs.webkit.org/show_bug.cgi?id=59365 Move animation-test-helpers.js and fix the tests accordingly. * animations/3d/matrix-transform-type-animation.html: * animations/3d/transform-perspective.html: * animations/animation-direction.html: * animations/animation-drt-api-multiple-keyframes.html: * animations/animation-drt-api.html: * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/big-rotation.html: * animations/change-keyframes-name.html: * animations/change-keyframes.html: * animations/change-one-anim.html: * animations/combo-transform-rotate+scale.html: * animations/dynamic-stylesheet-loading.html: * animations/generic-from-to.html: * animations/import.html: * animations/keyframe-timing-functions-transform.html: * animations/keyframe-timing-functions.html: * animations/keyframe-timing-functions2.html: * animations/keyframes-comma-separated.html: * animations/keyframes-out-of-order.html: * animations/keyframes.html: * animations/lineheight-animation.html: * animations/longhand-timing-function.html: * animations/matrix-anim.html: * animations/missing-from-to-transforms.html: * animations/missing-from-to.html: * animations/missing-keyframe-properties-repeating.html: * animations/missing-keyframe-properties-timing-function.html: * animations/missing-keyframe-properties.html: * animations/missing-values-first-keyframe.html: * animations/missing-values-last-keyframe.html: * animations/multiple-animations.html: * animations/multiple-keyframes.html: * animations/negative-delay.html: * animations/opacity-transform-animation.html: * animations/play-state-suspend.html: * animations/play-state.html: * animations/resources/animation-test-helpers.js: (isCloseEnough): (matrixStringToArray): (checkExpectedValue): (endTest): (startTest): (runAnimationTest.else): (runAnimationTest): (waitForAnimationToStart): * animations/simultaneous-start-left.html: * animations/simultaneous-start-transform.html: * animations/stop-animation-on-suspend.html: * animations/suspend-resume-animation.html: * animations/timing-functions.html: * animations/transition-and-animation-1.html: * animations/transition-and-animation-2.html: * animations/transition-and-animation-3.html: * animations/unanimated-style.html: * animations/width-using-ems.html: Canonical link: https://commits.webkit.org/74594@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-04-26 03:16:31 +00:00
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function checkResult(pos, isIn)
{
var elt = document.elementFromPoint(pos, 150);
if (!elt)
return "Failed to find element at " + pos + ", 150";
var good = isIn ? "inside" : "outside";
var bad = isIn ? "outside" : "inside";
return (isIn == (elt.id == "target")) ?
"<span style='color:green'>PASS</span> - " + pos + "px was " + good + " as it should be" + "<br>" :
"<span style='color:red'>FAIL</span> - " + pos + "px was " + bad + " and should have been " + good + "<br>";
}
function checkResults()
{
// Test before (150), in (300) and after (450)
var result = "";
result += checkResult(150, false);
result += checkResult(300, true);
result += checkResult(450, false);
document.getElementById('result').innerHTML = result;
}
function doTest()
{
Use testRunner instead of layoutTestController in animations tests https://bugs.webkit.org/show_bug.cgi?id=88757 Reviewed by Tony Chang. * animations/3d/change-transform-in-end-event.html: * animations/3d/replace-filling-transform.html: * animations/3d/state-at-end-event-transform.html: * animations/3d/transform-origin-vs-functions.html: * animations/animation-add-events-in-handler.html: * animations/animation-border-overflow.html: * animations/animation-controller-drt-api.html: * animations/animation-direction-reverse-fill-mode-hardware.html: * animations/animation-direction-reverse-fill-mode.html: * animations/animation-drt-api-multiple-keyframes.html: * animations/animation-drt-api.html: * animations/animation-end-event-destroy-renderer.html: * animations/animation-end-event-short-iterations.html: * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/animation-iteration-event-destroy-renderer.html: * animations/animation-matrix-negative-scale-unmatrix.html: * animations/animation-on-inline-crash.html: * animations/animation-shorthand-overriding.html: * animations/animation-shorthand-removed.html: * animations/animation-shorthand.html: * animations/animation-start-event-destroy-renderer.html: * animations/animation-welcome-safari.html: * animations/body-removal-crash.html: * animations/change-keyframes-name.html: * animations/change-transform-style-during-animation.html: * animations/combo-transform-translate+scale.html: * animations/empty-keyframes.html: * animations/fill-mode-forwards.html: * animations/fill-mode-iteration-count-non-integer.html: * animations/fill-mode-missing-from-to-keyframes.html: * animations/fill-mode-multiple-keyframes.html: * animations/fill-mode-removed.html: * animations/fill-mode-reverse.html: * animations/fill-mode-transform.html: * animations/fill-mode.html: * animations/fill-unset-properties.html: * animations/font-size-using-ems.html-disabled: * animations/import-crash.html: * animations/keyframe-timing-functions-transform.html: * animations/keyframe-timing-functions2.html: * animations/keyframes-iteration-count-non-integer.html: * animations/longhand-timing-function.html: * animations/missing-from-to-transforms.html: * animations/missing-from-to.html: * animations/pause-crash.html: * animations/resources/animation-test-helpers.js: (checkExpectedValue): (endTest): * animations/state-at-end-event.html: * animations/suspend-resume-animation-events.html: * animations/suspend-transform-animation.html: * animations/transition-and-animation-3.html: * animations/unanimated-style.html: Canonical link: https://commits.webkit.org/106621@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-11 17:22:07 +00:00
if (window.testRunner) {
Move pauseAnimation/pauseTransition from TestRunner to Internals https://bugs.webkit.org/show_bug.cgi?id=109107 Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-02-07 Reviewed by Anders Carlsson. Source/WebCore: Tests: animations/animation-internals-api-multiple-keyframes.html animations/animation-internals-api.html * testing/Internals.cpp: (WebCore::Internals::pauseAnimationAtTimeOnElement): (WebCore): (WebCore::Internals::pauseTransitionAtTimeOnElement): * testing/Internals.h: (Internals): * testing/Internals.idl: Source/WebKit/efl: * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: * WebCoreSupport/DumpRenderTreeSupportEfl.h: Source/WebKit/gtk: * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: * WebCoreSupport/DumpRenderTreeSupportGtk.h: (DumpRenderTreeSupportGtk): Source/WebKit/mac: * WebView/WebFrame.mm: * WebView/WebFramePrivate.h: Source/WebKit/qt: * WebCoreSupport/DumpRenderTreeSupportQt.cpp: * WebCoreSupport/DumpRenderTreeSupportQt.h: Source/WebKit2: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebFrame.h: (WebFrame): Tools: * DumpRenderTree/TestRunner.cpp: (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: (WebTestRunner::TestRunner::TestRunner): * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: (TestRunner): * DumpRenderTree/efl/TestRunnerEfl.cpp: * DumpRenderTree/gtk/TestRunnerGtk.cpp: * DumpRenderTree/mac/TestRunnerMac.mm: * DumpRenderTree/qt/TestRunnerQt.cpp: * DumpRenderTree/qt/TestRunnerQt.h: (TestRunner): * DumpRenderTree/win/TestRunnerWin.cpp: * DumpRenderTree/wx/TestRunnerWx.cpp: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: LayoutTests: Change the tests with the following: -Use the methods on Internals instead of TestRunner. -Adapt the calls to pass a particular element instead of an ID. -Remove feature detection. Having Internals implies having the feature. * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/animation-internals-api-expected.txt: Renamed from LayoutTests/animations/animation-drt-api-expected.txt. * animations/animation-internals-api-multiple-keyframes-expected.txt: Renamed from LayoutTests/animations/animation-drt-api-multiple-keyframes-expected.txt. * animations/animation-internals-api-multiple-keyframes.html: Renamed from LayoutTests/animations/animation-drt-api-multiple-keyframes.html. * animations/animation-internals-api.html: Renamed from LayoutTests/animations/animation-drt-api.html. * animations/change-keyframes-name.html: * animations/change-transform-style-during-animation.html: * animations/missing-from-to-transforms.html: * animations/missing-from-to.html: * animations/resources/animation-test-helpers.js: (checkExpectedValue): (startTest): * css3/calc/transitions-dependent.html: * fast/dom/shadow/transition-on-shadow-host-with-distributed-node.html: * transitions/opacity-transition-zindex.html: * transitions/resources/transition-test-helpers.js: (expected): * transitions/transition-drt-api-delay.html: * transitions/transition-drt-api.html: * transitions/transition-hit-test-transform.html: * transitions/transition-hit-test.html: Canonical link: https://commits.webkit.org/127416@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-07 21:34:32 +00:00
var target = document.getElementById("target");
[Web Animations] Stop using internals.pauseAnimationAtTimeOnElement() in favor of Web Animations API for animations tests https://bugs.webkit.org/show_bug.cgi?id=184038 Reviewed by Dean Jackson. Source/WebCore: Expose a new method to indicate that the runtime flag for CSS Animations and CSS Transitions as Web Animations is enabled. * testing/InternalSettings.cpp: (WebCore::InternalSettings::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled): * testing/InternalSettings.h: * testing/InternalSettings.idl: LayoutTests: Make 48 tests opt into CSS Animations and CSS Transitions as Web Animations. These tests used the internals.pauseAnimationAtTimeOnElement() method, but this method should be going away since the Web Animations API allows seeking and pausing. To support this, we make animation-test-helpers.js use the Web Animations API instead of internals.pauseAnimationAtTimeOnElement() if the tests has opted into CSS Animations and CSS Transitions as Web Animations and we know it's safe to use these APIs. * animations/3d/matrix-transform-type-animation.html: * animations/3d/transform-perspective.html: * animations/animation-callback-timestamp.html: * animations/animation-direction-reverse-hardware-opacity.html: * animations/animation-direction-reverse-hardware.html: * animations/animation-direction-reverse-non-hardware.html: * animations/animation-direction-reverse-timing-functions-hardware.html: * animations/animation-direction-reverse-timing-functions.html: * animations/animation-direction.html: * animations/animation-hit-test.html: * animations/animation-offscreen-to-onscreen.html: * animations/change-keyframes-expected.txt: * animations/change-keyframes.html: * animations/cross-fade-background-image.html: * animations/cross-fade-border-image-source.html: * animations/cross-fade-list-style-image.html: * animations/cross-fade-webkit-mask-box-image.html: * animations/duplicate-keys-expected.html: * animations/duplicate-keys.html: * animations/font-variations/font-stretch.html: * animations/font-variations/font-style.html: * animations/font-variations/font-variation-settings-order.html: * animations/font-variations/font-variation-settings-unlike.html: * animations/font-variations/font-variation-settings.html: * animations/font-variations/font-weight.html: * animations/generic-from-to.html: * animations/import.html: * animations/keyframe-multiple-timing-functions-transform.html: * animations/keyframes-comma-separated.html: * animations/keyframes-infinite-iterations.html: * animations/keyframes-invalid-keys.html: * animations/keyframes-out-of-order.html: * animations/keyframes.html: * animations/longhand-timing-function.html: * animations/matrix-anim.html: * animations/missing-keyframe-properties-repeating.html: * animations/missing-keyframe-properties.html: * animations/missing-values-first-keyframe.html: * animations/missing-values-last-keyframe.html: * animations/multiple-animations-timing-function.html: * animations/multiple-animations.html: * animations/multiple-keyframes.html: * animations/negative-delay.html: * animations/pause-crash.html: * animations/resources/animation-test-helpers.js: (checkExpectedValue): (pauseAnimationAtTimeOnElement): (startTest): (runAnimationTest): * animations/simultaneous-start-left.html: * animations/spring-function.html: * animations/stacking-context-unchanged-while-running.html: * animations/timing-functions.html: * animations/unanimated-style.html: * animations/unprefixed-keyframes.html: Canonical link: https://commits.webkit.org/199632@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-27 19:19:46 +00:00
if (!pauseAnimationAtTimeOnElement("anim", 2.0, target)) {
document.getElementById('result').innerHTML = "FAIL: Failed to pause animation"
testRunner.notifyDone();
return;
}
checkResults();
Use testRunner instead of layoutTestController in animations tests https://bugs.webkit.org/show_bug.cgi?id=88757 Reviewed by Tony Chang. * animations/3d/change-transform-in-end-event.html: * animations/3d/replace-filling-transform.html: * animations/3d/state-at-end-event-transform.html: * animations/3d/transform-origin-vs-functions.html: * animations/animation-add-events-in-handler.html: * animations/animation-border-overflow.html: * animations/animation-controller-drt-api.html: * animations/animation-direction-reverse-fill-mode-hardware.html: * animations/animation-direction-reverse-fill-mode.html: * animations/animation-drt-api-multiple-keyframes.html: * animations/animation-drt-api.html: * animations/animation-end-event-destroy-renderer.html: * animations/animation-end-event-short-iterations.html: * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/animation-iteration-event-destroy-renderer.html: * animations/animation-matrix-negative-scale-unmatrix.html: * animations/animation-on-inline-crash.html: * animations/animation-shorthand-overriding.html: * animations/animation-shorthand-removed.html: * animations/animation-shorthand.html: * animations/animation-start-event-destroy-renderer.html: * animations/animation-welcome-safari.html: * animations/body-removal-crash.html: * animations/change-keyframes-name.html: * animations/change-transform-style-during-animation.html: * animations/combo-transform-translate+scale.html: * animations/empty-keyframes.html: * animations/fill-mode-forwards.html: * animations/fill-mode-iteration-count-non-integer.html: * animations/fill-mode-missing-from-to-keyframes.html: * animations/fill-mode-multiple-keyframes.html: * animations/fill-mode-removed.html: * animations/fill-mode-reverse.html: * animations/fill-mode-transform.html: * animations/fill-mode.html: * animations/fill-unset-properties.html: * animations/font-size-using-ems.html-disabled: * animations/import-crash.html: * animations/keyframe-timing-functions-transform.html: * animations/keyframe-timing-functions2.html: * animations/keyframes-iteration-count-non-integer.html: * animations/longhand-timing-function.html: * animations/missing-from-to-transforms.html: * animations/missing-from-to.html: * animations/pause-crash.html: * animations/resources/animation-test-helpers.js: (checkExpectedValue): (endTest): * animations/state-at-end-event.html: * animations/suspend-resume-animation-events.html: * animations/suspend-transform-animation.html: * animations/transition-and-animation-3.html: * animations/unanimated-style.html: Canonical link: https://commits.webkit.org/106621@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-11 17:22:07 +00:00
testRunner.notifyDone();
}
else {
window.setTimeout("checkResults()", 2000);
}
}
function startTest()
{
Clean up accessibility & animations tests to stop calling testRunner.waitUntilDone() twice <https://webkit.org/b/167598> Reviewed by Alexey Proskuryakov. * accessibility/frame-disconnect-textmarker-cache-crash.html: * accessibility/loading-iframe-sends-notification.html: * accessibility/mac/combobox-activedescendant-notifications.html: * accessibility/mac/ordered-textmarker-crash.html: * accessibility/mac/stale-textmarker-crash.html: * accessibility/notification-listeners.html: * accessibility/scroll-to-global-point-iframe-nested.html: * accessibility/scroll-to-global-point-iframe.html: * accessibility/scroll-to-make-visible-iframe.html: * accessibility/svg-element-press.html: - Remove call to testRunner.waitUntilDone() since window.jsTestIsAsync is set to true, and thus waitUntilDone() is called from either js-test.js or js-test-post.js. * animations/animation-delay-changed.html: * animations/change-keyframes-name.html: * animations/font-variations/font-variation-settings-order.html: * animations/font-variations/font-variation-settings-unlike.html: * animations/font-variations/font-variation-settings.html: * animations/longhand-timing-function.html: * animations/transition-and-animation-3.html: * animations/unanimated-style.html: - Remove call to testRunner.waitUntilDone() since that's moved into animation-test-helpers.js. * animations/resources/animation-test-helpers.js: (runAnimationTest): Call testRunner.waitUntilDone() when this script resource is included instead of when runAnimationTest() is called since runAnimationTest() expects it to be set anyway. * animations/animation-direction-reverse-fill-mode-hardware.html: * animations/animation-direction-reverse-fill-mode.html: * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/animation-internals-api-multiple-keyframes.html: * animations/animation-internals-api.html: * animations/change-transform-style-during-animation.html: * animations/keyframes-iteration-count-non-integer.html: - Remove call to testRunner.waitUntilDone() since that now happens when loading animation-test-helpers.js. These tests don't currently call runAnimationTest(), but they manage their own state by calling testRunner.notifyDone() themselves. * animations/crash-on-removing-animation.html: * animations/resources/crash-on-removing-animation-window.html: Copied from LayoutTests/animations/crash-on-removing-animation.html. - Split this test into a main resource and a window resource. Previously testRunner.waitUntilDone() was being called twice when js-test-post.js was loaded in the main window and then loaded a second time when the window was opened. The new resource file doesn't load either js-test-pre.js or js-test-post.js, avoiding the duplicate call. Canonical link: https://commits.webkit.org/184787@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-02 18:55:23 +00:00
if (window.testRunner)
Use testRunner instead of layoutTestController in animations tests https://bugs.webkit.org/show_bug.cgi?id=88757 Reviewed by Tony Chang. * animations/3d/change-transform-in-end-event.html: * animations/3d/replace-filling-transform.html: * animations/3d/state-at-end-event-transform.html: * animations/3d/transform-origin-vs-functions.html: * animations/animation-add-events-in-handler.html: * animations/animation-border-overflow.html: * animations/animation-controller-drt-api.html: * animations/animation-direction-reverse-fill-mode-hardware.html: * animations/animation-direction-reverse-fill-mode.html: * animations/animation-drt-api-multiple-keyframes.html: * animations/animation-drt-api.html: * animations/animation-end-event-destroy-renderer.html: * animations/animation-end-event-short-iterations.html: * animations/animation-hit-test-transform.html: * animations/animation-hit-test.html: * animations/animation-iteration-event-destroy-renderer.html: * animations/animation-matrix-negative-scale-unmatrix.html: * animations/animation-on-inline-crash.html: * animations/animation-shorthand-overriding.html: * animations/animation-shorthand-removed.html: * animations/animation-shorthand.html: * animations/animation-start-event-destroy-renderer.html: * animations/animation-welcome-safari.html: * animations/body-removal-crash.html: * animations/change-keyframes-name.html: * animations/change-transform-style-during-animation.html: * animations/combo-transform-translate+scale.html: * animations/empty-keyframes.html: * animations/fill-mode-forwards.html: * animations/fill-mode-iteration-count-non-integer.html: * animations/fill-mode-missing-from-to-keyframes.html: * animations/fill-mode-multiple-keyframes.html: * animations/fill-mode-removed.html: * animations/fill-mode-reverse.html: * animations/fill-mode-transform.html: * animations/fill-mode.html: * animations/fill-unset-properties.html: * animations/font-size-using-ems.html-disabled: * animations/import-crash.html: * animations/keyframe-timing-functions-transform.html: * animations/keyframe-timing-functions2.html: * animations/keyframes-iteration-count-non-integer.html: * animations/longhand-timing-function.html: * animations/missing-from-to-transforms.html: * animations/missing-from-to.html: * animations/pause-crash.html: * animations/resources/animation-test-helpers.js: (checkExpectedValue): (endTest): * animations/state-at-end-event.html: * animations/suspend-resume-animation-events.html: * animations/suspend-transform-animation.html: * animations/transition-and-animation-3.html: * animations/unanimated-style.html: Canonical link: https://commits.webkit.org/106621@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-11 17:22:07 +00:00
testRunner.dumpAsText();
document.getElementById("target").style.webkitAnimationName = "anim";
2009-08-03 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Make the DRT APIs to pause transitions and animations work for accelerated animations <https://bugs.webkit.org/show_bug.cgi?id=27627> <rdar://problem/6442932> Fix the 'pauseAnimationAtTimeOnElementWithId' and 'pauseTransitionAtTimeOnElementWithId' APIs available to LayoutTests to work with accelerated animations and transitions. Done by sending the pause time down to the GraphicsLayer, and using it to stop time on the layer. I also added an assertion to check that the animation has actually started when we try to pause it, to check that the pause time we compute is valid. This revealed a number of tests that tried to pause before animations started, required some amount of test fixing. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::freezeAtTime): * page/animation/AnimationBase.h: * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::pauseAnimationAtTime): (WebCore::CompositeAnimation::pauseTransitionAtTime): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::suspendAnimations): * platform/graphics/GraphicsLayer.h: * platform/graphics/mac/GraphicsLayerCA.h: * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::suspendAnimations): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::suspendAnimations): * rendering/RenderLayerBacking.h: Canonical link: https://commits.webkit.org/38333@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@46727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-03 19:40:12 +00:00
waitForAnimationToStart(document.getElementById('target'), doTest);
}
</script>
</head>
<body onload="startTest()">
<div>
This test starts an animation of the 'left' property and then does elementFromPoint calls
at the shown yellow dots to see if hit testing works
</div>
<div id="target"></div>
<div class="dot" style="left:150px"></div>
<div class="dot" style="left:300px"></div>
<div class="dot" style="left:450px"></div>
<div id="result" style="position:absolute; top:250px"></div>
</body>
</html>