RESOLVED FIXED 119955
Support interpolation between cross-fade() images
https://bugs.webkit.org/show_bug.cgi?id=119955
Summary Support interpolation between cross-fade() images
Dirk Schulze
Reported 2013-08-17 11:14:27 PDT
Support interpolation between cross-fade() images: cross-fade(url(t1.png), url(t2.png), 0%) to cross-fade(url(t1.png), url(t2.png), 100%)
Attachments
Patch (100.99 KB, patch)
2013-09-04 07:59 PDT, Dirk Schulze
darin: review+
Patch (16.55 KB, patch)
2013-09-04 11:51 PDT, Dirk Schulze
no flags
Patch (38.84 KB, patch)
2013-09-04 21:29 PDT, Dirk Schulze
commit-queue: commit-queue-
Patch (38.97 KB, patch)
2013-09-04 23:13 PDT, Dirk Schulze
no flags
Dirk Schulze
Comment 1 2013-09-04 07:59:41 PDT
Darin Adler
Comment 2 2013-09-04 09:06:07 PDT
Comment on attachment 210459 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210459&action=review > LayoutTests/ChangeLog:10 > + * animations/cross-fade-background-image.html: Can we change this into a reference test instead of a pixel test? Also, we normally try to avoid having any red in expected results from tests, but I see red in this one. > Source/WebCore/css/CSSCrossfadeValue.h:72 > + bool equalInputImages(const CSSCrossfadeValue&) const; Naming here is a bit awkward. The function name “equal input images” sounds like a function that returns two equal images, not a function that answers the question, do these fades have input images that are equal. > Source/WebCore/page/animation/CSSPropertyAnimation.cpp:332 > + CSSCrossfadeValue* fromCrossfade = toCSSCrossfadeValue(fromGenerated); > + CSSCrossfadeValue* toCrossfade = toCSSCrossfadeValue(toGenerated); > + if (fromCrossfade->equalInputImages(*toCrossfade)) { > + RefPtr<CSSCrossfadeValue> result = toCrossfade->blend(*fromCrossfade, progress); > + return StyleGeneratedImage::create(result.get()); > + } I recommend writing this with references instead of pointers and eliminating the local variable for tighter code: if (fromGenerated->isCrossfadeValue() && toGenerated->isCrossfadeValue()) { CSSCrossfadeValue& fromCrossfade = *toCSSCrossfadeValue(fromGenerated); CSSCrossfadeValue& toCrossFade = *toCSSCrossfadeValue(toGenerated); if (fromCrossfade.equalInputImages(toCrossfade)) return StyleGeneratedImage::create(toCrossfade.blend(fromCrossfade, progress).get()); } Might even want to use shorter variable names since these have tiny scope.
Dirk Schulze
Comment 3 2013-09-04 09:19:37 PDT
(In reply to comment #2) > (From update of attachment 210459 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=210459&action=review > > > LayoutTests/ChangeLog:10 > > + * animations/cross-fade-background-image.html: > > Can we change this into a reference test instead of a pixel test? > > Also, we normally try to avoid having any red in expected results from tests, but I see red in this one. > The red is not intentional. I think this is a real failure but was already present before. See bug 120596. I'll investigate.
Dirk Schulze
Comment 4 2013-09-04 11:51:00 PDT
Dirk Schulze
Comment 5 2013-09-04 21:29:42 PDT
WebKit Commit Bot
Comment 6 2013-09-04 22:30:40 PDT
Comment on attachment 210544 [details] Patch Rejecting attachment 210544 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 210544, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output: http://webkit-queues.appspot.com/results/1692787
Dirk Schulze
Comment 7 2013-09-04 23:13:08 PDT
WebKit Commit Bot
Comment 8 2013-09-04 23:48:05 PDT
The commit-queue encountered the following flaky tests while processing attachment 210550 [details]: css2.1/20110323/overflow-applies-to-012.htm bug 120727 (author: robert@webkit.org) css2.1/20110323/overflow-applies-to-013.htm bug 120728 (author: robert@webkit.org) css2.1/20110323/c541-word-sp-001.htm bug 120729 (author: robert@webkit.org) css2.1/20110323/overflow-applies-to-014.htm bug 120730 (author: robert@webkit.org) css2.1/20110323/overflow-applies-to-015.htm bug 120731 (author: robert@webkit.org) css2.1/20110323/overflow-applies-to-007.htm bug 120732 (author: robert@webkit.org) css2.1/20110323/overflow-applies-to-010.htm bug 120733 (author: robert@webkit.org) css2.1/20110323/border-conflict-element-001d.htm bug 120734 (author: robert@webkit.org) css2.1/20110323/text-indent-014.htm bug 120735 (author: robert@webkit.org) http/tests/inspector/inspect-element.html bug 78869 (author: pfeldman@chromium.org) fast/regions/counters/extract-list-items-006.html bug 120736 (author: abucur@adobe.com) fast/regions/counters/extract-list-items-015.html bug 120737 (author: abucur@adobe.com) fast/regions/counters/extract-numbered-paragraphs-divs-002.html bug 120738 (author: abucur@adobe.com) fast/regions/counters/extract-list-items-003.html bug 120739 (author: abucur@adobe.com) fast/regions/counters/extract-list-items-001.html bug 120740 (author: abucur@adobe.com) fast/regions/counters/extract-list-items-013.html bug 120741 (author: abucur@adobe.com) fast/regions/counters/extract-list-items-014.html bug 120742 (author: abucur@adobe.com) fast/inline/layout-after-inserting-nested-br.html bug 120743 (author: robert@webkit.org) fast/multicol/newmulticol/float-paginate.html bug 120744 (author: hyatt@apple.com) fast/multicol/newmulticol/columns-shorthand-parsing.html bug 120745 fast/multicol/newmulticol/float-paginate-complex.html bug 120746 (author: hyatt@apple.com) fast/multicol/newmulticol/direct-child-column-span-all.html bug 120747 (author: mmaerean@adobe.com) fast/multicol/newmulticol/column-rules-fixed-height.html bug 120748 (author: hyatt@apple.com) fast/multicol/newmulticol/positioned-split.html bug 120749 (author: hyatt@apple.com) fast/multicol/newmulticol/layers-in-multicol.html bug 120750 (author: hyatt@apple.com) fast/multicol/newmulticol/positioned-with-constrained-height.html bug 120751 (author: hyatt@apple.com) fast/shapes/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html bug 120752 (author: betravis@adobe.com) fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html bug 120753 (author: giles_joplin@yahoo.com) fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html bug 120754 (author: giles_joplin@yahoo.com) animations/cross-fade-background-image.html bug 120755 (authors: krit@webkit.org and thorton@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 9 2013-09-04 23:49:02 PDT
Comment on attachment 210550 [details] Patch Clearing flags on attachment: 210550 Committed r155100: <http://trac.webkit.org/changeset/155100>
WebKit Commit Bot
Comment 10 2013-09-04 23:49:05 PDT
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 11 2013-09-06 22:20:35 PDT
This patch caused animations/cross-fade-background-image.html to start failing on Mac: http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=animations%2Fcross-fade-background-image.html
Note You need to log in before you can comment on or make changes to this bug.