Using -webkit-cross-fade, we can allow -webkit-animation between background-image, list-style-image, border-image, and -webkit-mask-(box-)image (If I missed any, let me know!) <rdar://problem/10209303>
Created attachment 118315 [details] initial patch I think I still need more tests, but this is a start.
Comment on attachment 118315 [details] initial patch Attachment 118315 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10800082 New failing tests: animations/cross-fade-webkit-mask-image.html animations/cross-fade-webkit-mask-box-image.html animations/cross-fade-background-image.html animations/cross-fade-border-image-source.html animations/cross-fade-list-style-image.html
Comment on attachment 118315 [details] initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=118315&action=review r=me but some transition tests wouldn't hurt. > LayoutTests/animations/cross-fade-background-image.html:37 > + @-webkit-keyframes "anim" { > + from { background-image: url(resources/blue-100.png); } > + to { background-image: url(resources/green-100.png); } > + } > + @-webkit-keyframes "animShorthand" { > + from { background: url(resources/blue-100.png); } > + to { background: url(resources/green-100.png); } Animation names are IDENT, not STRING, so should not be quoted. > LayoutTests/animations/resources/animation-test-helpers.js:54 > + var matches = s.match("-webkit-cross-fade\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\)"); Is the double escaping necessary? > Source/WebCore/css/CSSCrossfadeValue.cpp:112 > + if (fromImageSize.width() == toImageSize.width() && fromImageSize.height() == toImageSize.height()) Doesn't IntSize have an operator== ? > Source/WebCore/page/animation/AnimationBase.cpp:239 > + if (progress == 1.) 1. -> 1 or 1.0 > Source/WebCore/page/animation/AnimationBase.cpp:251 > + RefPtr<StyleGeneratedImage> generatedImage = StyleGeneratedImage::create(crossfadeValue.get()); Could just return StyleGeneratedImage::create(crossfadeValue.get()); > Source/WebCore/page/animation/AnimationBase.cpp:274 > + // FIXME: Support transitioning between NinePieceImages that differ by more than image content. Please file a bug for this. > Source/WebCore/page/animation/AnimationBase.cpp:286 > + return newNinePieceImage; return NinePieceImage(....) ?
Landed with Simon's changes and two transition tests in http://trac.webkit.org/changeset/102388.