haikuwebkit/LayoutTests/transitions/transition-display-property...

32 lines
605 B
HTML
Raw Permalink Normal View History

Computing animated style should not require renderers https://bugs.webkit.org/show_bug.cgi?id=171926 <rdar://problem/34428035> Reviewed by Sam Weinig. Source/WebCore: CSS animation system is now element rather than renderer based. This allows cleaning up style resolution and render tree update code. This also fixes bug animation doesn't run if display property is animated from one rendered type to another. Added a test case for this. Test: transitions/transition-display-property-2.html * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::updateAnimations): Pass in the old style instead of getting it from the renderer. Factor to return the animated style as a return value. * page/animation/CSSAnimationController.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): (WebCore::RenderElement::willBeDestroyed): Animation are now canceled by RenderTreeUpdater::tearDownRenderers. * rendering/RenderElement.h: (WebCore::RenderElement::hasInitialAnimatedStyle const): Deleted. (WebCore::RenderElement::setHasInitialAnimatedStyle): Deleted. We no longer need to this concept. * style/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateElementRenderer): (WebCore::RenderTreeUpdater::createRenderer): We now get correct animated style from style resolution in all cases so we don't need to compute it separately for new renderers. (WebCore::RenderTreeUpdater::tearDownRenderers): Cancel animations when render tree is fully torn down. Keep them when updating style. * style/RenderTreeUpdater.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): We can now compute animated style without renderer. Special cases dealing with rendererless case can be removed. LayoutTests: * transitions/transition-display-property-2-expected.html: Added. * transitions/transition-display-property-2.html: Added. * transitions/transition-display-property.html: Canonical link: https://commits.webkit.org/193451@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-16 12:33:04 +00:00
<style>
test {
transition: 5s;
display: block;
height: 100px;
border: 2px solid green;
transition-timing-function: steps(2, start);
}
.animate { display:inline-block; height:10px; width:10px; }
</style>
<test></test>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
Computing animated style should not require renderers https://bugs.webkit.org/show_bug.cgi?id=171926 <rdar://problem/34428035> Reviewed by Sam Weinig. Source/WebCore: CSS animation system is now element rather than renderer based. This allows cleaning up style resolution and render tree update code. This also fixes bug animation doesn't run if display property is animated from one rendered type to another. Added a test case for this. Test: transitions/transition-display-property-2.html * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::updateAnimations): Pass in the old style instead of getting it from the renderer. Factor to return the animated style as a return value. * page/animation/CSSAnimationController.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): (WebCore::RenderElement::willBeDestroyed): Animation are now canceled by RenderTreeUpdater::tearDownRenderers. * rendering/RenderElement.h: (WebCore::RenderElement::hasInitialAnimatedStyle const): Deleted. (WebCore::RenderElement::setHasInitialAnimatedStyle): Deleted. We no longer need to this concept. * style/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateElementRenderer): (WebCore::RenderTreeUpdater::createRenderer): We now get correct animated style from style resolution in all cases so we don't need to compute it separately for new renderers. (WebCore::RenderTreeUpdater::tearDownRenderers): Cancel animations when render tree is fully torn down. Keep them when updating style. * style/RenderTreeUpdater.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): We can now compute animated style without renderer. Special cases dealing with rendererless case can be removed. LayoutTests: * transitions/transition-display-property-2-expected.html: Added. * transitions/transition-display-property-2.html: Added. * transitions/transition-display-property.html: Canonical link: https://commits.webkit.org/193451@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-16 12:33:04 +00:00
const test = document.querySelector("test");
function tryComplete()
{
if (test.offsetHeight < 100) {
if (window.testRunner)
testRunner.notifyDone();
return;
}
setTimeout(tryComplete, 10);
Computing animated style should not require renderers https://bugs.webkit.org/show_bug.cgi?id=171926 <rdar://problem/34428035> Reviewed by Sam Weinig. Source/WebCore: CSS animation system is now element rather than renderer based. This allows cleaning up style resolution and render tree update code. This also fixes bug animation doesn't run if display property is animated from one rendered type to another. Added a test case for this. Test: transitions/transition-display-property-2.html * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::updateAnimations): Pass in the old style instead of getting it from the renderer. Factor to return the animated style as a return value. * page/animation/CSSAnimationController.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): (WebCore::RenderElement::willBeDestroyed): Animation are now canceled by RenderTreeUpdater::tearDownRenderers. * rendering/RenderElement.h: (WebCore::RenderElement::hasInitialAnimatedStyle const): Deleted. (WebCore::RenderElement::setHasInitialAnimatedStyle): Deleted. We no longer need to this concept. * style/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateElementRenderer): (WebCore::RenderTreeUpdater::createRenderer): We now get correct animated style from style resolution in all cases so we don't need to compute it separately for new renderers. (WebCore::RenderTreeUpdater::tearDownRenderers): Cancel animations when render tree is fully torn down. Keep them when updating style. * style/RenderTreeUpdater.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): We can now compute animated style without renderer. Special cases dealing with rendererless case can be removed. LayoutTests: * transitions/transition-display-property-2-expected.html: Added. * transitions/transition-display-property-2.html: Added. * transitions/transition-display-property.html: Canonical link: https://commits.webkit.org/193451@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-16 12:33:04 +00:00
}
test.offsetWidth;
test.className = "animate";
tryComplete();
Computing animated style should not require renderers https://bugs.webkit.org/show_bug.cgi?id=171926 <rdar://problem/34428035> Reviewed by Sam Weinig. Source/WebCore: CSS animation system is now element rather than renderer based. This allows cleaning up style resolution and render tree update code. This also fixes bug animation doesn't run if display property is animated from one rendered type to another. Added a test case for this. Test: transitions/transition-display-property-2.html * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::updateAnimations): Pass in the old style instead of getting it from the renderer. Factor to return the animated style as a return value. * page/animation/CSSAnimationController.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): (WebCore::RenderElement::willBeDestroyed): Animation are now canceled by RenderTreeUpdater::tearDownRenderers. * rendering/RenderElement.h: (WebCore::RenderElement::hasInitialAnimatedStyle const): Deleted. (WebCore::RenderElement::setHasInitialAnimatedStyle): Deleted. We no longer need to this concept. * style/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateElementRenderer): (WebCore::RenderTreeUpdater::createRenderer): We now get correct animated style from style resolution in all cases so we don't need to compute it separately for new renderers. (WebCore::RenderTreeUpdater::tearDownRenderers): Cancel animations when render tree is fully torn down. Keep them when updating style. * style/RenderTreeUpdater.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): We can now compute animated style without renderer. Special cases dealing with rendererless case can be removed. LayoutTests: * transitions/transition-display-property-2-expected.html: Added. * transitions/transition-display-property-2.html: Added. * transitions/transition-display-property.html: Canonical link: https://commits.webkit.org/193451@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-16 12:33:04 +00:00
</script>