haikuwebkit/LayoutTests/transitions/transition-to-from-undefine...

9 lines
548 B
Plaintext
Raw Permalink Normal View History

Improve blending of Length and other Length-related types https://bugs.webkit.org/show_bug.cgi?id=222816 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Add an extra 153 PASS results. We now pass all the column-gap, row-gap, border-image-slice, max-height and max-width interpolation tests. * web-platform-tests/css/css-align/animation/column-gap-composition-expected.txt: * web-platform-tests/css/css-align/animation/column-gap-interpolation-expected.txt: * web-platform-tests/css/css-align/animation/row-gap-composition-expected.txt: * web-platform-tests/css/css-align/animation/row-gap-interpolation-expected.txt: * web-platform-tests/css/css-backgrounds/animations/background-position-interpolation-expected.txt: * web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation-expected.txt: * web-platform-tests/css/css-backgrounds/animations/background-size-interpolation-expected.txt: * web-platform-tests/css/css-backgrounds/animations/border-image-slice-interpolation-expected.txt: * web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt: * web-platform-tests/css/css-box/animation/margin-bottom-composition-expected.txt: * web-platform-tests/css/css-box/animation/margin-left-composition-expected.txt: * web-platform-tests/css/css-box/animation/margin-right-composition-expected.txt: * web-platform-tests/css/css-box/animation/margin-top-composition-expected.txt: * web-platform-tests/css/css-box/animation/padding-bottom-composition-expected.txt: * web-platform-tests/css/css-box/animation/padding-left-composition-expected.txt: * web-platform-tests/css/css-box/animation/padding-right-composition-expected.txt: * web-platform-tests/css/css-box/animation/padding-top-composition-expected.txt: * web-platform-tests/css/css-flexbox/animation/flex-basis-composition-expected.txt: * web-platform-tests/css/css-position/animations/bottom-composition-expected.txt: * web-platform-tests/css/css-position/animations/left-composition-expected.txt: * web-platform-tests/css/css-position/animations/right-composition-expected.txt: * web-platform-tests/css/css-position/animations/top-composition-expected.txt: * web-platform-tests/css/css-shapes/animation/shape-margin-composition-expected.txt: * web-platform-tests/css/css-sizing/animation/max-height-composition-expected.txt: * web-platform-tests/css/css-sizing/animation/max-height-interpolation-expected.txt: * web-platform-tests/css/css-sizing/animation/max-width-composition-expected.txt: * web-platform-tests/css/css-sizing/animation/max-width-interpolation-expected.txt: * web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt: Source/WebCore: We improve the blending behavior of a number of CSS properties that are represented as Length or a type built upon Length, such as LengthSize, LengthBox or GapLength. We remove the NonNegativeLengthPropertyWrapper class and instead allow LengthPropertyWrapper to be passed some flags: one that indicates whether the CSS property supports <length-percentage> values and one that indicates whether negative values are supported. We use those flags to several CSS properties that are using LengthPropertyWrapper to ensure they have the correct blending behavior. We also take the code from the canInterpolateBetweenLengths lambda in LengthBoxPropertyWrapper's canInterpolate override and refactor it into the canInterpolateLengths static method so that we may use it across LengthPropertyWrapper and LengthVariantPropertyWrapper. As for LengthVariantPropertyWrapper, we also update its canInterpolate() override to call into type-specific static canInterpolateLengthVariants() methods which are implemented for LengthSize and GapLength. Finally, we update the blend() method for Length to return the from/to values as-is when progress is 0 or 1, respectively. * animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::canInterpolateLengths): (WebCore::LengthPropertyWrapper::LengthPropertyWrapper): (WebCore::canInterpolateLengthVariants): (WebCore::LengthVariantPropertyWrapper::LengthVariantPropertyWrapper): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): (WebCore::NonNegativeLengthPropertyWrapper::NonNegativeLengthPropertyWrapper): Deleted. * platform/Length.cpp: (WebCore::blend): LayoutTests: Adjust expectations of a couple of WPT tests with platform-specific results. We also add console logging for a non-WPT test, transitions/transition-to-from-undefined.html, which tests transitions between properties that cannot be interpolated and thus don't yield a transition. * platform/ios-wk2/imported/w3c/web-platform-tests/css/css-box/animation/padding-bottom-composition-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/css/css-box/animation/padding-top-composition-expected.txt: * transitions/transition-to-from-undefined-expected.txt: Canonical link: https://commits.webkit.org/234974@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-06 16:28:25 +00:00
CONSOLE MESSAGE: A transition for property max-height could not be found
CONSOLE MESSAGE: Failed to pause 'max-height' transition on element 'test1'
CONSOLE MESSAGE: A transition for property max-height could not be found
CONSOLE MESSAGE: Failed to pause 'max-height' transition on element 'test2'
PASS - "max-height" property for "test1" element at 1s saw something close to: none
PASS - "max-height" property for "test2" element at 1s saw something close to: 100
PASS - "max-height" property for "test3" element at 1s saw something close to: 50