зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 70bea8910bc5 (bug 1865955) for causing mochitest failures at dt / mochitest failures at animation. CLOSED TREE
This commit is contained in:
Родитель
a05fb9921e
Коммит
b1364f7256
|
@ -66,17 +66,16 @@ async function testSummaryGraphEndDelaySign() {
|
|||
"The endDelay sign element should be in animation item element"
|
||||
);
|
||||
|
||||
function assertExpected(key) {
|
||||
const actual = parseFloat(endDelaySignEl.style[key]);
|
||||
const expected = parseFloat(expectedResult[key]);
|
||||
ok(
|
||||
Math.abs(actual - expected) < 0.01,
|
||||
`${key} should be ${expected} (got ${actual})`
|
||||
);
|
||||
}
|
||||
|
||||
assertExpected(`marginInlineStart`);
|
||||
assertExpected(`width`);
|
||||
is(
|
||||
endDelaySignEl.style.marginInlineStart,
|
||||
expectedResult.marginInlineStart,
|
||||
`marginInlineStart position should be ${expectedResult.marginInlineStart}`
|
||||
);
|
||||
is(
|
||||
endDelaySignEl.style.width,
|
||||
expectedResult.width,
|
||||
`Width should be ${expectedResult.width}`
|
||||
);
|
||||
|
||||
if (expectedResult.additionalClass) {
|
||||
ok(
|
||||
|
|
|
@ -926,9 +926,9 @@ void Animation::SetCurrentTimeAsDouble(const Nullable<double>& aCurrentTime,
|
|||
|
||||
void Animation::Tick(AnimationTimeline::TickState& aTickState) {
|
||||
if (Pending()) {
|
||||
// Finish pending if we can, but make sure we've seen one existing tick, or
|
||||
// we've requested to get started via SetPendingReadyTime.
|
||||
if (!mPendingReadyTime.IsNull() || mSawTickWhilePending) {
|
||||
// Finish pending if we can, but make sure we've seen one existing tick
|
||||
// at least.
|
||||
if (mSawTickWhilePending) {
|
||||
TryTriggerNow();
|
||||
}
|
||||
mSawTickWhilePending = true;
|
||||
|
@ -960,16 +960,6 @@ bool Animation::TryTriggerNow() {
|
|||
if (!Pending()) {
|
||||
return true;
|
||||
}
|
||||
if (!mPendingReadyTime.IsNull()) {
|
||||
auto timelineTime = mTimeline->ToTimelineTime(mPendingReadyTime);
|
||||
MOZ_ASSERT(!timelineTime.IsNull(),
|
||||
"How? This came from the timeline itself");
|
||||
mPendingReadyTime = {};
|
||||
if (!timelineTime.IsNull()) {
|
||||
FinishPendingAt(timelineTime.Value());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// If we don't have an active timeline we can't trigger the animation.
|
||||
if (NS_WARN_IF(!mTimeline)) {
|
||||
return false;
|
||||
|
@ -1459,7 +1449,7 @@ void Animation::PlayNoUpdate(ErrorResult& aRv, LimitBehavior aLimitBehavior) {
|
|||
}
|
||||
|
||||
mPendingState = PendingState::PlayPending;
|
||||
mPendingReadyTime = {};
|
||||
|
||||
mSawTickWhilePending = false;
|
||||
if (Document* doc = GetRenderedDocument()) {
|
||||
if (HasFiniteTimeline()) {
|
||||
|
@ -1521,7 +1511,6 @@ void Animation::Pause(ErrorResult& aRv) {
|
|||
}
|
||||
|
||||
mPendingState = PendingState::PausePending;
|
||||
mPendingReadyTime = {};
|
||||
mSawTickWhilePending = false;
|
||||
|
||||
// See the relevant PlayPending code for comments.
|
||||
|
|
|
@ -114,9 +114,6 @@ class Animation : public DOMEventTargetHelper,
|
|||
Nullable<TimeDuration> GetStartTime() const { return mStartTime; }
|
||||
Nullable<double> GetStartTimeAsDouble() const;
|
||||
void SetStartTime(const Nullable<TimeDuration>& aNewStartTime);
|
||||
void SetPendingReadyTime(const TimeStamp& aReadyTime) {
|
||||
mPendingReadyTime = aReadyTime;
|
||||
}
|
||||
virtual void SetStartTimeAsDouble(const Nullable<double>& aStartTime);
|
||||
|
||||
// This is deliberately _not_ called GetCurrentTime since that would clash
|
||||
|
@ -577,9 +574,6 @@ class Animation : public DOMEventTargetHelper,
|
|||
// Whether the Animation is System, ResistFingerprinting, or neither
|
||||
RTPCallerType mRTPCallerType;
|
||||
|
||||
// The time at which our animation should be ready.
|
||||
TimeStamp mPendingReadyTime;
|
||||
|
||||
private:
|
||||
// The id for this animation on the compositor.
|
||||
uint64_t mIdOnCompositor = 0;
|
||||
|
|
|
@ -178,7 +178,7 @@ function runTest() {
|
|||
"getAnimations().length after transition end");
|
||||
|
||||
// Wait for the change MutationRecord for seeking the Animation to be
|
||||
// delivered, followed by the removal MutationRecord.
|
||||
// delivered, followed by the the removal MutationRecord.
|
||||
return waitForFrame();
|
||||
}).then(() => {
|
||||
assert_records([{ added: [], changed: animations, removed: [] },
|
||||
|
@ -553,7 +553,7 @@ promise_test(t => {
|
|||
p => ({ added: [], changed: [p], removed: [] })
|
||||
);
|
||||
|
||||
return Promise.all(animations.map(animation => animation.finished));
|
||||
return await_event(div, "animationend");
|
||||
}).then(() => {
|
||||
// After the changed notifications, which will be dispatched in the order that
|
||||
// the animations were seeked, we should get removal MutationRecords in order
|
||||
|
|
|
@ -493,14 +493,10 @@ void AnimationInfo::AddAnimationForProperty(
|
|||
animSegment->sampleFn() = segment.mTimingFunction;
|
||||
}
|
||||
|
||||
if (aAnimation->Pending()) {
|
||||
const TimeStamp readyTime =
|
||||
aFrame->PresContext()->RefreshDriver()->MostRecentRefresh(
|
||||
/* aEnsureTimerStarted= */ false);
|
||||
MOZ_ASSERT(!readyTime.IsNull());
|
||||
aAnimation->SetPendingReadyTime(readyTime);
|
||||
MaybeStartPendingAnimation(*animation, readyTime);
|
||||
}
|
||||
const TimeStamp readyTime =
|
||||
aFrame->PresContext()->RefreshDriver()->MostRecentRefresh(
|
||||
/* aEnsureTimerStarted= */ false);
|
||||
MaybeStartPendingAnimation(*animation, readyTime);
|
||||
}
|
||||
|
||||
// Let's use an example to explain this function:
|
||||
|
@ -604,8 +600,8 @@ bool AnimationInfo::AddAnimationsForProperty(
|
|||
// Currently this only happens when the timeline is driven by a refresh
|
||||
// driver under test control. In this case, the next time the refresh
|
||||
// driver is advanced it will trigger any pending animations.
|
||||
if (anim->Pending() && anim->GetTimeline() &&
|
||||
!anim->GetTimeline()->TracksWallclockTime()) {
|
||||
if (anim->Pending() &&
|
||||
(anim->GetTimeline() && !anim->GetTimeline()->TracksWallclockTime())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче