Ignore:
Timestamp:
Sep 4, 2013, 11:50:05 PM (12 years ago)
Author:
[email protected]
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSCrossfadeValue.h

    r155060 r155100  
    6666    bool hasFailedOrCanceledSubresources() const;
    6767
     68    PassRefPtr<CSSCrossfadeValue> blend(const CSSCrossfadeValue&, double) const;
     69
    6870    bool equals(const CSSCrossfadeValue&) const;
     71
     72    bool equalInputImages(const CSSCrossfadeValue&) const;
    6973
    7074private:
     
    107111};
    108112
     113inline CSSCrossfadeValue* toCSSCrossfadeValue(CSSImageGeneratorValue* value)
     114{
     115    ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isCrossfadeValue());
     116    return static_cast<CSSCrossfadeValue*>(value);
     117}
     118
    109119} // namespace WebCore
    110120
Note: See TracChangeset for help on using the changeset viewer.