Skip to content
  • krit@webkit.org's avatar
    Support interpolation between cross-fade() images · 50fa7026
    krit@webkit.org authored
    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: http://svn.webkit.org/repository/webkit/trunk@155100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    50fa7026