Support interpolation between cross-fade() images
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Sep 2013 06:50:05 +0000 (06:50 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Sep 2013 06:50:05 +0000 (06:50 +0000)
commit16ee19c6c655dfc24db9394ccd0048e26a22f22d
tree70e5d0fd0f4935881edce85b9012984cfc295272
parent4fc29f668d23bd6a1f1f7e2d39932cc54791fa31
Support interpolation between cross-fade() images
https://bugs.webkit.org/show_bug.cgi?id=119955

Reviewed by Darin Adler.

Source/WebCore:

With this patch, CSS can animate from one -webkit-cross-fade
function to another, when the input images are the same in the
same order.

* css/CSSCrossfadeValue.cpp: Added blend function.
(WebCore::blendFunc):
(WebCore::CSSCrossfadeValue::blend):
(WebCore::CSSCrossfadeValue::equals):
(WebCore::CSSCrossfadeValue::equalInputImages):
* css/CSSCrossfadeValue.h: Added save casting functions.
(WebCore::toCSSCrossfadeValue):
* css/CSSValue.h:
(WebCore::CSSValue::isCrossfadeValue):
* page/animation/CSSPropertyAnimation.cpp: Add another condition to
    interpolate between two -webkit-cross-fade functions.
(WebCore::blendFunc):

LayoutTests:

Test interpolation from one cross-fade function to another. Changed pixel test
to a ref test.

* animations/cross-fade-background-image.html:
* animations/cross-fade-background-image-expected.html: Added.
* platform/mac/animations/cross-fade-background-image-expected.png: Removed.
* platform/mac/animations/cross-fade-background-image-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/animations/cross-fade-background-image-expected.html [new file with mode: 0644]
LayoutTests/animations/cross-fade-background-image.html
LayoutTests/platform/mac/animations/cross-fade-background-image-expected.png [deleted file]
LayoutTests/platform/mac/animations/cross-fade-background-image-expected.txt [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCrossfadeValue.h
Source/WebCore/css/CSSValue.h
Source/WebCore/page/animation/CSSPropertyAnimation.cpp