haikuwebkit/LayoutTests/animations/cross-fade-list-style-image...

59 lines
2.0 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
Enable animations of CSS images using -webkit-cross-fade https://bugs.webkit.org/show_bug.cgi?id=74049 <rdar://problem/10209303> Reviewed by Simon Fraser. Add support for animating CSS images in the following properties: - background(-image) - border-image(-source) - list-style(-image) - -webkit-mask-box-image(-source) - -webkit-mask-image(-source) This patch only adds support for transitioning between NinePieceImages where all of the properties except the image itself are equal, and the size of the images are equal. Other cases will not animate. Add animation blend functions for StyleImage and NinePieceImage. Apply the proper compositing operation to -webkit-cross-fade, and fix handling of the destination and source areas to support scaling. Tests: 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/cross-fade-webkit-mask-image.html * css/CSSCrossfadeValue.cpp: (WebCore::cachedImageForCSSValue): (WebCore::CSSCrossfadeValue::fixedSize): (WebCore::CSSCrossfadeValue::image): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::CSSImageValue): * css/CSSImageValue.h: (WebCore::CSSImageValue::create): * page/animation/AnimationBase.cpp: (WebCore::crossfadeBlend): (WebCore::blendFunc): (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): (WebCore::RefCountedPropertyWrapper::blend): (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper): (WebCore::FillLayerRefCountedPropertyWrapper::blend): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::AnimationBase::ensurePropertyMap): (WebCore::addShorthandProperties): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawCrossfade): (WebCore::CrossfadeGeneratedImage::draw): (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setMaskImage): Add tests of -webkit-animation (using -webkit-cross-fade) between: - background-image - border-image - list-style-image - -webkit-mask-box-image - -webkit-mask-image Add the ability for animation tests to compare an animated element to a static element. Add tests of -webkit-transition (using -webkit-cross-fade) between: - background-image - border-image * animations/cross-fade-background-image-expected.txt: Added. * animations/cross-fade-background-image.html: Added. * animations/cross-fade-border-image-source-expected.txt: Added. * animations/cross-fade-border-image-source.html: Added. * animations/cross-fade-list-style-image-expected.txt: Added. * animations/cross-fade-list-style-image.html: Added. * animations/cross-fade-webkit-mask-box-image-expected.txt: Added. * animations/cross-fade-webkit-mask-box-image.html: Added. * animations/cross-fade-webkit-mask-image-expected.txt: Added. * animations/cross-fade-webkit-mask-image.html: Added. * animations/resources/animation-test-helpers.js: (parseCrossFade): (checkExpectedValue): * animations/resources/blue-100.png: Added. * animations/resources/green-100.png: Added. * animations/resources/stripes-100.png: Added. * platform/mac/animations/cross-fade-background-image-expected.png: Added. * platform/mac/animations/cross-fade-border-image-source-expected.png: Added. * platform/mac/animations/cross-fade-list-style-image-expected.png: Added. * platform/mac/animations/cross-fade-webkit-mask-box-image-expected.png: Added. * platform/mac/animations/cross-fade-webkit-mask-image-expected.png: Added. * platform/mac/transitions/cross-fade-background-image-expected.png: Added. * platform/mac/transitions/cross-fade-border-image-expected.png: Added. * transitions/cross-fade-background-image-expected.txt: Added. * transitions/cross-fade-background-image.html: Added. * transitions/cross-fade-border-image-expected.txt: Added. * transitions/cross-fade-border-image.html: Added. * transitions/resources/transition-test-helpers.js: (expected): Canonical link: https://commits.webkit.org/90793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-12-08 23:06:15 +00:00
<html>
<head>
<style>
#box {
position: absolute;
left: 100px;
top: 100px;
height: 100px;
width: 100px;
-webkit-animation: anim 1s linear infinite;
}
#boxShorthand {
position: absolute;
left: 400px;
top: 100px;
height: 100px;
width: 100px;
-webkit-animation: animShorthand 1s linear infinite;
}
#boxStatic {
position: absolute;
left: 100px;
top: 350px;
height: 100px;
width: 100px;
list-style: square -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 50%);
}
@-webkit-keyframes anim {
from { list-style-image: url(resources/blue-100.png); }
to { list-style-image: url(resources/green-100.png); }
}
@-webkit-keyframes animShorthand {
from { list-style: square url(resources/blue-100.png); }
to { list-style: square url(resources/green-100.png); }
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [animation-name, time, element-id, property, expected-value, tolerance]
Animate CSS Image filter() function https://bugs.webkit.org/show_bug.cgi?id=119938 Reviewed by Simon Fraser. Source/WebCore: With this patch, the new introduced CSS Image function filter() can be animated. According to the spec, just filter functions can be interpolated. The patch also prepares StyleImage blending for interpolation of other generated images like gradients or cross-fade(). http://dev.w3.org/fxtf/filters/#interpolating-filter-image Test: fast/filter-image/filter-image-animation.html * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a CSSValueList from ComputeStyle logic. (WebCore::valueForPixel): For StyleRules we want to have not-adjusted length values. (WebCore::ComputedStyleExtractor::valueForShadow): Add argument to switch between adjusted and not-adjusted length. (WebCore::ComputedStyleExtractor::valueForFilter): Ditto. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSComputedStyleDeclaration.h: * css/CSSFilterImageValue.h: Add helper functions for animating filters. We need to pass the FilterOperations for the image generation and the CSSValueList for StyleRule. (WebCore::CSSFilterImageValue::filterOperations): (WebCore::CSSFilterImageValue::setFilterOperations): (WebCore::CSSFilterImageValue::cachedImage): * page/animation/CSSPropertyAnimation.cpp: Add animation code to support animations between two filter() function values. (WebCore::blendFilterOperations): (WebCore::blendFunc): (WebCore::filterBlend): * rendering/style/StyleGeneratedImage.h: Add helper functions. (WebCore::CSSFilterImageValue::imageValue): LayoutTests: Add tests to test animation between two filter() function values. Furthermore, extended animation-test-helpers.js to parse all kind of CSS image function where we support animations. CSS Image function can be deeply nested as well now: -wekit-filter(-webkit-cross-fade(url(a.png), url(b.png), 50%), sepia(0.5)) Even the 50% can now be checked with a tolerance. If we should ever support animations on nested CSS Images, the new code in animation-test-helpers.js is prepared for it. Fixed a bunch of tests that passed by accident or needed an update to the new infrastructure. * animations/resources/animation-test-helpers.js: (parseCSSImage): For parsing of all kind of supported CSS Image functions. Currently supported: -webkit-cross-fade, -webkit-filter, url, none Still missing: linear and radial gradients (can not be animated yet). CSS Image functions are allowed to be nested as deep JS allows. (parseCrossFade): Add parsing of input CSS images. (parseFilterImage): Parse -webkit-filter image function as well as input images. (parseFilterFunctionList): Parse filter function list. We now parse the function name as well. Added rudimentary support for drop-shadow and url. (parseDeprecatedCustomFilterFunction): Special case old syntax of custom filter function. Shall be removed in the future. (compareCSSImages): Compares all kind (even deep nested) CSS images. (compareFilterFunctions): Now compare filter function names as well. (comparePropertyValue): Use new compareCSSImages function. * fast/filter-image/filter-image-animation-expected.txt: Added. * fast/filter-image/filter-image-animation.html: Added. Canonical link: https://commits.webkit.org/138534@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 19:29:03 +00:00
["anim", 2.5, "box", "listStyleImage", "-webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],
Unprefix -webkit-cross-fade() https://bugs.webkit.org/show_bug.cgi?id=157632 Reviewed by Darin Adler. Source/WebCore: Support unprefixed cross-fade() in addition to the prefixed value when parsing, and have computed style round-trip the correct one. If computed style is queried during an image transition, return an unprefixed cross-fade(). If blending cross-fade values, only return the prefixed function if both inputs are prefixed. Tested by modified and existing tests. * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::customCSSText): (WebCore::CSSCrossfadeValue::blend): * css/CSSCrossfadeValue.h: (WebCore::CSSCrossfadeValue::create): (WebCore::CSSCrossfadeValue::isPrefixed): (WebCore::CSSCrossfadeValue::CSSCrossfadeValue): * css/CSSParser.cpp: (WebCore::CSSParser::isGeneratedImageValue): (WebCore::CSSParser::parseGeneratedImage): (WebCore::CSSParser::parseCrossfade): * css/CSSParser.h: Source/WebInspectorUI: * UserInterface/Models/CSSKeywordCompletions.js: LayoutTests: * animations/cross-fade-background-image-expected.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/cross-fade-webkit-mask-image.html: * animations/resources/animation-test-helpers.js: (parseCSSImage): (parseCrossFade): (compareCSSImages): * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: * fast/css/getComputedStyle/computed-style-cross-fade.html: * transitions/resources/transition-test-helpers.js: (parseCrossFade): Canonical link: https://commits.webkit.org/175817@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-13 22:40:52 +00:00
["anim", 2.5, ["box", "static:boxStatic"], "listStyleImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],
["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "listStyleImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],
Enable animations of CSS images using -webkit-cross-fade https://bugs.webkit.org/show_bug.cgi?id=74049 <rdar://problem/10209303> Reviewed by Simon Fraser. Add support for animating CSS images in the following properties: - background(-image) - border-image(-source) - list-style(-image) - -webkit-mask-box-image(-source) - -webkit-mask-image(-source) This patch only adds support for transitioning between NinePieceImages where all of the properties except the image itself are equal, and the size of the images are equal. Other cases will not animate. Add animation blend functions for StyleImage and NinePieceImage. Apply the proper compositing operation to -webkit-cross-fade, and fix handling of the destination and source areas to support scaling. Tests: 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/cross-fade-webkit-mask-image.html * css/CSSCrossfadeValue.cpp: (WebCore::cachedImageForCSSValue): (WebCore::CSSCrossfadeValue::fixedSize): (WebCore::CSSCrossfadeValue::image): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::CSSImageValue): * css/CSSImageValue.h: (WebCore::CSSImageValue::create): * page/animation/AnimationBase.cpp: (WebCore::crossfadeBlend): (WebCore::blendFunc): (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): (WebCore::RefCountedPropertyWrapper::blend): (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper): (WebCore::FillLayerRefCountedPropertyWrapper::blend): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::AnimationBase::ensurePropertyMap): (WebCore::addShorthandProperties): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawCrossfade): (WebCore::CrossfadeGeneratedImage::draw): (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setMaskImage): Add tests of -webkit-animation (using -webkit-cross-fade) between: - background-image - border-image - list-style-image - -webkit-mask-box-image - -webkit-mask-image Add the ability for animation tests to compare an animated element to a static element. Add tests of -webkit-transition (using -webkit-cross-fade) between: - background-image - border-image * animations/cross-fade-background-image-expected.txt: Added. * animations/cross-fade-background-image.html: Added. * animations/cross-fade-border-image-source-expected.txt: Added. * animations/cross-fade-border-image-source.html: Added. * animations/cross-fade-list-style-image-expected.txt: Added. * animations/cross-fade-list-style-image.html: Added. * animations/cross-fade-webkit-mask-box-image-expected.txt: Added. * animations/cross-fade-webkit-mask-box-image.html: Added. * animations/cross-fade-webkit-mask-image-expected.txt: Added. * animations/cross-fade-webkit-mask-image.html: Added. * animations/resources/animation-test-helpers.js: (parseCrossFade): (checkExpectedValue): * animations/resources/blue-100.png: Added. * animations/resources/green-100.png: Added. * animations/resources/stripes-100.png: Added. * platform/mac/animations/cross-fade-background-image-expected.png: Added. * platform/mac/animations/cross-fade-border-image-source-expected.png: Added. * platform/mac/animations/cross-fade-list-style-image-expected.png: Added. * platform/mac/animations/cross-fade-webkit-mask-box-image-expected.png: Added. * platform/mac/animations/cross-fade-webkit-mask-image-expected.png: Added. * platform/mac/transitions/cross-fade-background-image-expected.png: Added. * platform/mac/transitions/cross-fade-border-image-expected.png: Added. * transitions/cross-fade-background-image-expected.txt: Added. * transitions/cross-fade-background-image.html: Added. * transitions/cross-fade-border-image-expected.txt: Added. * transitions/cross-fade-border-image.html: Added. * transitions/resources/transition-test-helpers.js: (expected): Canonical link: https://commits.webkit.org/90793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-12-08 23:06:15 +00:00
];
[LayoutTests] Transition animations/cross-fade-* tests to non-pixel-tests https://bugs.webkit.org/show_bug.cgi?id=208495 <rdar://problem/59979337> Reviewed by Simon Fraser. These tests are designed to be a dumpAsText() tests (their render tree outputs are flaky). * animations/cross-fade-border-image-source-expected.txt: Added. * animations/cross-fade-border-image-source.html: * animations/cross-fade-list-style-image-expected.txt: Added. * animations/cross-fade-list-style-image.html: * animations/cross-fade-webkit-mask-box-image-expected.txt: Added. * animations/cross-fade-webkit-mask-box-image.html: * animations/cross-fade-webkit-mask-image-expected.txt: Added. * animations/cross-fade-webkit-mask-image.html: * platform/gtk/animations/cross-fade-border-image-source-expected.png: Removed. * platform/gtk/animations/cross-fade-border-image-source-expected.txt: Removed. * platform/gtk/animations/cross-fade-list-style-image-expected.png: Removed. * platform/gtk/animations/cross-fade-list-style-image-expected.txt: Removed. * platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.png: Removed. * platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.txt: Removed. * platform/gtk/animations/cross-fade-webkit-mask-image-expected.png: Removed. * platform/gtk/animations/cross-fade-webkit-mask-image-expected.txt: Removed. * platform/ios/animations/cross-fade-border-image-source-expected.txt: Removed. * platform/ios/animations/cross-fade-list-style-image-expected.txt: Removed. * platform/ios/animations/cross-fade-webkit-mask-box-image-expected.txt: Removed. * platform/ios/animations/cross-fade-webkit-mask-image-expected.txt: Removed. * platform/mac/animations/cross-fade-border-image-source-expected.png: Removed. * platform/mac/animations/cross-fade-border-image-source-expected.txt: Removed. * platform/mac/animations/cross-fade-list-style-image-expected.png: Removed. * platform/mac/animations/cross-fade-list-style-image-expected.txt: Removed. * platform/mac/animations/cross-fade-webkit-mask-box-image-expected.png: Removed. * platform/mac/animations/cross-fade-webkit-mask-box-image-expected.txt: Removed. * platform/mac/animations/cross-fade-webkit-mask-image-expected.png: Removed. * platform/mac/animations/cross-fade-webkit-mask-image-expected.txt: Removed. * platform/win/animations/cross-fade-border-image-source-expected.txt: Removed. * platform/win/animations/cross-fade-list-style-image-expected.txt: Removed. * platform/win/animations/cross-fade-webkit-mask-box-image-expected.txt: Removed. * platform/wincairo/animations/cross-fade-border-image-source-expected.txt: Removed. * platform/wincairo/animations/cross-fade-list-style-image-expected.txt: Removed. * platform/wincairo/animations/cross-fade-webkit-mask-box-image-expected.txt: Removed. * platform/wincairo/animations/cross-fade-webkit-mask-image-expected.txt: Removed. * platform/wpe/animations/cross-fade-border-image-source-expected.txt: Removed. * platform/wpe/animations/cross-fade-list-style-image-expected.txt: Removed. * platform/wpe/animations/cross-fade-webkit-mask-box-image-expected.txt: Removed. * platform/wpe/animations/cross-fade-webkit-mask-image-expected.txt: Removed. Canonical link: https://commits.webkit.org/221417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-03 06:05:59 +00:00
var doPixelTest = false;
Enable animations of CSS images using -webkit-cross-fade https://bugs.webkit.org/show_bug.cgi?id=74049 <rdar://problem/10209303> Reviewed by Simon Fraser. Add support for animating CSS images in the following properties: - background(-image) - border-image(-source) - list-style(-image) - -webkit-mask-box-image(-source) - -webkit-mask-image(-source) This patch only adds support for transitioning between NinePieceImages where all of the properties except the image itself are equal, and the size of the images are equal. Other cases will not animate. Add animation blend functions for StyleImage and NinePieceImage. Apply the proper compositing operation to -webkit-cross-fade, and fix handling of the destination and source areas to support scaling. Tests: 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/cross-fade-webkit-mask-image.html * css/CSSCrossfadeValue.cpp: (WebCore::cachedImageForCSSValue): (WebCore::CSSCrossfadeValue::fixedSize): (WebCore::CSSCrossfadeValue::image): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::CSSImageValue): * css/CSSImageValue.h: (WebCore::CSSImageValue::create): * page/animation/AnimationBase.cpp: (WebCore::crossfadeBlend): (WebCore::blendFunc): (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): (WebCore::RefCountedPropertyWrapper::blend): (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper): (WebCore::FillLayerRefCountedPropertyWrapper::blend): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::AnimationBase::ensurePropertyMap): (WebCore::addShorthandProperties): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawCrossfade): (WebCore::CrossfadeGeneratedImage::draw): (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setMaskImage): Add tests of -webkit-animation (using -webkit-cross-fade) between: - background-image - border-image - list-style-image - -webkit-mask-box-image - -webkit-mask-image Add the ability for animation tests to compare an animated element to a static element. Add tests of -webkit-transition (using -webkit-cross-fade) between: - background-image - border-image * animations/cross-fade-background-image-expected.txt: Added. * animations/cross-fade-background-image.html: Added. * animations/cross-fade-border-image-source-expected.txt: Added. * animations/cross-fade-border-image-source.html: Added. * animations/cross-fade-list-style-image-expected.txt: Added. * animations/cross-fade-list-style-image.html: Added. * animations/cross-fade-webkit-mask-box-image-expected.txt: Added. * animations/cross-fade-webkit-mask-box-image.html: Added. * animations/cross-fade-webkit-mask-image-expected.txt: Added. * animations/cross-fade-webkit-mask-image.html: Added. * animations/resources/animation-test-helpers.js: (parseCrossFade): (checkExpectedValue): * animations/resources/blue-100.png: Added. * animations/resources/green-100.png: Added. * animations/resources/stripes-100.png: Added. * platform/mac/animations/cross-fade-background-image-expected.png: Added. * platform/mac/animations/cross-fade-border-image-source-expected.png: Added. * platform/mac/animations/cross-fade-list-style-image-expected.png: Added. * platform/mac/animations/cross-fade-webkit-mask-box-image-expected.png: Added. * platform/mac/animations/cross-fade-webkit-mask-image-expected.png: Added. * platform/mac/transitions/cross-fade-background-image-expected.png: Added. * platform/mac/transitions/cross-fade-border-image-expected.png: Added. * transitions/cross-fade-background-image-expected.txt: Added. * transitions/cross-fade-background-image.html: Added. * transitions/cross-fade-border-image-expected.txt: Added. * transitions/cross-fade-border-image.html: Added. * transitions/resources/transition-test-helpers.js: (expected): Canonical link: https://commits.webkit.org/90793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-12-08 23:06:15 +00:00
var disablePauseAPI = false;
runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTest);
</script>
</head>
<body>
<ul id="box"><li>one</li><li>two</li></ul>
<ul id="boxStatic"><li>one</li><li>two</li></ul>
<ul id="boxShorthand"><li>one</li><li>two</li></ul>
<div id="result"></div>
</body>
</html>