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