Cross-fade is broken with SVGImages, because SVGImage resets the context's opacity before the image is drawn, so the opacity that we set does not take effect. We can use a transparency layer to get around this, but due to the performance cost, we should only do this when painting an SVG image. I have a patch. <rdar://problem/13973162>
Created attachment 213572 [details] patch
Attachment 213572 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3/images/cross-fade-svg-with-opacity-expected.html', u'LayoutTests/css3/images/cross-fade-svg-with-opacity.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp']" exit_code: 1 Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp:64: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 213572 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=213572&action=review >> Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp:64 >> + static_cast<float>(targetSize.height()) / imageSize.height())); > > Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Hmm, I just moved this, but it does look wrong.
http://trac.webkit.org/changeset/157045