haikuwebkit/LayoutTests/transitions/cross-fade-background-image...

15 lines
783 B
Plaintext
Raw Permalink Normal View History

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
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,10) size 784x582
RenderBlock {DIV} at (10,0) size 200x200
RenderBlock {DIV} at (10,210) size 200x200
RenderBlock {DIV} at (0,420) size 784x36
RenderText {#text} at (0,0) size 581x18
text run at (0,0) width 581: "PASS - \"background-image\" property for \"box\" element at 0.5s saw something close to: 0.5"
RenderBR {BR} at (581,14) size 0x0
RenderText {#text} at (0,18) size 646x18
text run at (0,18) width 646: "PASS - \"background-image\" property for \"boxShorthand\" element at 0.5s saw something close to: 0.5"
RenderBR {BR} at (646,32) size 0x0