Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reland]: Repaint when bgcolor animation is triggered #27801

Merged
merged 1 commit into from Mar 2, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 26, 2021

This CL is the reland of:
https://chromium-review.googlesource.com/c/chromium/src/+/2698847

The above CL was reverted because the layout test added was flaky.
In this CL, PS#1 is the reverted CL, and we need to make sure
that the test is no longer flaky.

It turns out that it was the non-virtual version that was flaky,
and the reason is that double raf doesn't seem to be enough to
make the animation jump into the mid-point. I have tested
locally with 500 runs, and the failure rate is ~99%, Oh, that's
bad...

The reason is that run_web_tests might run with a 1ms raf timer
which would be too fast to guarantee the screenshot would be
after the step change.

The solution is very simple, which is to use triple raf instead
of double raf, I have ran both the virtual and non-virtual version
of the test, each one for 500 times locally, and there is no
failure at all.

Bug: 1177320
Change-Id: I95f576994a5d67bf8319b5b1f33e8e6fca6d4bb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2716060
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859050}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

This CL is the reland of:
https://chromium-review.googlesource.com/c/chromium/src/+/2698847

The above CL was reverted because the layout test added was flaky.
In this CL, PS#1 is the reverted CL, and we need to make sure
that the test is no longer flaky.

It turns out that it was the non-virtual version that was flaky,
and the reason is that double raf doesn't seem to be enough to
make the animation jump into the mid-point. I have tested
locally with 500 runs, and the failure rate is ~99%, Oh, that's
bad...

The reason is that run_web_tests might run with a 1ms raf timer
which would be too fast to guarantee the screenshot would be
after the step change.

The solution is very simple, which is to use triple raf instead
of double raf, I have ran both the virtual and non-virtual version
of the test, each one for 500 times locally, and there is no
failure at all.

Bug: 1177320
Change-Id: I95f576994a5d67bf8319b5b1f33e8e6fca6d4bb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2716060
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859050}
@hiikezoe
Copy link
Contributor

hello @xidachen, this test is very flaky on Firefox, I think (at least on Firefox) we need to make sure the target element gets styled initially with the before-change style (rgb(0, 200, 0)) before triggering the transition with the after-change style (rgb(200, 0, 0)) to trigger the transition surely. Just waiting a rAF callback before triggering the transition doesn't seem to make sure it. So I think adding getComputedStyle(target).backgroundColor is the right solution there. Does it sound reasonable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants