This is a followup to bug 223148 to address some additional review feedback that Darin Adler provided.
Actually, looking at the code again: double aspectRatioDst = WebCore::blend(log(a->logicalAspectRatio()), log(b->logicalAspectRatio()), progress); dst->setAspectRatio(exp(aspectRatioDst), 1); dst->setAspectRatioType(progress < 0.5 ? a->aspectRatioType() : b->aspectRatioType()); Since in the discrete case the progress is either 0 or 1, I think the blend function could be just those three lines. While it's a bit extra work to actually blend the values when we know it'll be one or the other, it simplifies the logic. That assumes that canInterpolate() will correctly identify all cases where the animation should be discrete, which is its contract.
Don't mind this last comment, it was mistakenly typed in this bug rather than bug 220848.
*** Bug 223172 has been marked as a duplicate of this bug. ***
<rdar://problem/75685299>
Will address this in a larger refactor in bug 224433. *** This bug has been marked as a duplicate of bug 224433 ***