haikuwebkit/LayoutTests/transitions/transition-property-for-ele...

7 lines
438 B
HTML
Raw Permalink Normal View History

transition-property is not computed correctly when transition-duration is set to "inherit" https://bugs.webkit.org/show_bug.cgi?id=204554 <rdar://problem/57458091> Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Somehow this test progressed slightly, it now fails in the second assertion rather than the first, although it fails still overall. * web-platform-tests/css/css-transitions/events-004-expected.txt: Source/WebCore: Test: transitions/transition-property-for-element-with-transition-duration-inherit.html The "transition-property" would behave as if "inherit" was set when the "transition-duration" property itself was set explicitly to "inherit". We fix this by storing all the information contained in the "transition-property" into the single Animation::m_property member instead of splitting it across Animation::m_mode as well. We now use a TransitionProperty struct which holds both the transition "mode" (none, all, single property, unknown property) and and the CSS property targeted itself. This requires modifying call sites of both Animation::property() and Animation::animationMode() throughout WebCore. * animation/AnimationTimeline.cpp: (WebCore::transitionMatchesProperty): (WebCore::compileTransitionPropertiesInStyle): * css/CSSComputedStyleDeclaration.cpp: (WebCore::createTransitionPropertyValue): * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::mapAnimationProperty): * css/makeprop.pl: (generateAnimationPropertyInitialValueSetter): (generateAnimationPropertyInheritValueSetter): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::ImplicitAnimation): * page/ios/ContentChangeObserver.cpp: (WebCore::ContentChangeObserver::didAddTransition): * platform/animation/Animation.cpp: (WebCore::Animation::Animation): (WebCore::Animation::operator=): (WebCore::Animation::animationsMatch const): (WebCore::operator<<): * platform/animation/Animation.h: (WebCore::Animation::property const): (WebCore::Animation::timingFunction const): (WebCore::Animation::setProperty): (WebCore::Animation::setTimingFunction): (WebCore::Animation::initialProperty): (WebCore::Animation::animationMode const): Deleted. (WebCore::Animation::setAnimationMode): Deleted. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::adjustTransitions): (WebCore::RenderStyle::transitionForProperty const): LayoutTests: Add a new test that checks that setting "transition-duration" to "inherit" does not cause "transition-property" to behaves as if "inherit" was implictly set as well. * transitions/transition-property-for-element-with-transition-duration-inherit-expected.txt: Added. * transitions/transition-property-for-element-with-transition-duration-inherit.html: Added. Canonical link: https://commits.webkit.org/223083@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-08 16:31:18 +00:00
<script src="../resources/js-test-pre.js"></script>
<div style="transition-duration: 1s; transition-property: margin-left;"><span style="transition-duration: inherit;"></span></div>
<script>
description("Test the effect of 'transition-duration: inherit' on 'transition-property'.")
shouldBe("getComputedStyle(document.querySelector('span')).transitionProperty", "'all'");
</script>
<script src="../resources/js-test-post.js"></script>