Bug 223173
Summary: | Use references instead of pointers as animation wrapper function arguments in CSSPropertyAnimation.cpp | ||
---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> |
Component: | Animations | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | darin, dino, graouts, sam, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=223148 |
Antoine Quint
This is a followup to bug 223148 to address some additional review feedback that Darin Adler provided.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Antoine Quint
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.
Antoine Quint
Don't mind this last comment, it was mistakenly typed in this bug rather than bug 220848.
Alexey Proskuryakov
*** Bug 223172 has been marked as a duplicate of this bug. ***
Radar WebKit Bug Importer
<rdar://problem/75685299>
Antoine Quint
Will address this in a larger refactor in bug 224433.
*** This bug has been marked as a duplicate of bug 224433 ***