WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211668
Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents
https://bugs.webkit.org/show_bug.cgi?id=211668
Summary
Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents
Darin Adler
Reported
2020-05-09 12:30:18 PDT
Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents
Attachments
Patch
(8.62 KB, patch)
2020-05-09 12:34 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(8.62 KB, patch)
2020-05-09 12:36 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(8.48 KB, patch)
2020-05-09 16:32 PDT
,
Darin Adler
graouts
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2020-05-09 12:34:34 PDT
Comment hidden (obsolete)
Created
attachment 398932
[details]
Patch
Darin Adler
Comment 2
2020-05-09 12:36:09 PDT
Comment hidden (obsolete)
Created
attachment 398933
[details]
Patch
Darin Adler
Comment 3
2020-05-09 16:32:41 PDT
Created
attachment 398945
[details]
Patch
Antoine Quint
Comment 4
2020-05-10 01:45:51 PDT
Comment on
attachment 398945
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=398945&action=review
r=me, but there are a couple of things you should adjust before landing based on feedback.
> Source/WebCore/animation/DocumentTimelinesController.cpp:136 > + // 2. Within events with equal scheduled event times, sort by their composite order. FIXME: Need to do this. > + return lhs->timelineTime() < rhs->timelineTime();
I'm not sure about that bit. How does this work if one of those two values is WTF::nullopt?
> Source/WebCore/animation/DocumentTimelinesController.cpp:149 > + // FIXME: Should this use WebAnimation::remove instead of Timeline::removeAnimation?
Calling `WebAnimation::remove()` is not correct here. All we want to do is remove the animation from the list of relevant animations for this timeline, but we do not want to alter its animation-to-timeline or animation-to-effect relationships, which is what `WebAnimation::remove()` would do. Indeed, there may be JS references to that animation, and we cannot alter this object.
Darin Adler
Comment 5
2020-05-10 13:52:16 PDT
Comment on
attachment 398945
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=398945&action=review
>> Source/WebCore/animation/DocumentTimelinesController.cpp:136 >> + return lhs->timelineTime() < rhs->timelineTime(); > > I'm not sure about that bit. How does this work if one of those two values is WTF::nullopt?
nullopt compares as less than any non-nullopt And that’s exactly what’s the code above was doing. Except for a bug where the code was returning “true” when both are nullopt. That‘a not really OK, but it probably did no harm in practice in the sort.
>> Source/WebCore/animation/DocumentTimelinesController.cpp:149 >> + // FIXME: Should this use WebAnimation::remove instead of Timeline::removeAnimation? > > Calling `WebAnimation::remove()` is not correct here. All we want to do is remove the animation from the list of relevant animations for this timeline, but we do not want to alter its animation-to-timeline or animation-to-effect relationships, which is what `WebAnimation::remove()` would do. Indeed, there may be JS references to that animation, and we cannot alter this object.
OK, I will not check in this FIXME.
Darin Adler
Comment 6
2020-05-10 14:22:03 PDT
Committed
r261459
: <
https://trac.webkit.org/changeset/261459
>
Radar WebKit Bug Importer
Comment 7
2020-05-10 14:23:12 PDT
<
rdar://problem/63069361
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug