Bug 194798

Summary: [ Mac ] REGRESSION (r237587) Layout Test compositing/visible-rect/animated-from-none.html is flaky text diff failure
Product: WebKit Reporter: Shawn Roberts <sroberts>
Component: Tools / TestsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, graouts, lforschler, simon.fraser, thorton, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dino: review+

Description Shawn Roberts 2019-02-18 15:59:14 PST
The following layout test is flaky on Mac

compositing/visible-rect/animated-from-none.html

Probable cause:

Test started to become flaky after R237924. Prior revision passes. 

reproduced locally with:

run-webkit-tests compositing/visible-rect/animated-from-none.html --iterations 5000 -f --exit-after-n-failures=1 --no-retry-failures

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=compositing%2Fvisible-rect%2Fanimated-from-none.html

Diff:

--- /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/compositing/visible-rect/animated-from-none-expected.txt
+++ /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/compositing/visible-rect/animated-from-none-actual.txt
@@ -35,6 +35,7 @@
                   (position -100.00 0.00)
                   (bounds 200.00 200.00)
                   (contentsOpaque 1)
+                  (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
                   (visible rect 100.00, 0.00 100.00 x 200.00)
                   (coverage rect 100.00, 0.00 500.00 x 200.00)
                   (intersects coverage rect 1)
Comment 1 Radar WebKit Bug Importer 2019-02-18 16:00:05 PST
<rdar://problem/48181898>
Comment 2 Wenson Hsieh 2019-02-18 16:04:45 PST
(In reply to Shawn Roberts from comment #0)
> The following layout test is flaky on Mac
> 
> compositing/visible-rect/animated-from-none.html
> 
> Probable cause:
> 
> Test started to become flaky after R237924. Prior revision passes. 

I haven't investigated this to any depth yet, but it seems somewhat unlikely that <https://trac.webkit.org/r237924> would cause a layout test on macOS to become flaky.
Comment 3 Wenson Hsieh 2019-02-18 16:07:12 PST
Is it possible that another change (which might've landed around the same time as r237924) caused this?
Comment 4 Shawn Roberts 2019-02-18 16:17:26 PST
It is definitely possible. Partnering with another bot watcher they thought perhaps the Rect it was referring to was it attempting to draw a rectangle and it was off. 

237925 has a similar reference but I don't think anything had been changed in that regard.
Comment 5 Shawn Roberts 2019-02-18 16:17:44 PST
https://trac.webkit.org/changeset/237925/webkit
Comment 6 Simon Fraser (smfr) 2019-04-08 10:48:15 PDT
The dumping code is:
    if (m_transform && !m_transform->isIdentity()) {
        ts << indent << "(transform ";
        ts << "[" << m_transform->m11() << " " << m_transform->m12() << " " << m_transform->m13() << " " << m_transform->m14() << "] ";
        ts << "[" << m_transform->m21() << " " << m_transform->m22() << " " << m_transform->m23() << " " << m_transform->m24() << "] ";
        ts << "[" << m_transform->m31() << " " << m_transform->m32() << " " << m_transform->m33() << " " << m_transform->m34() << "] ";
        ts << "[" << m_transform->m41() << " " << m_transform->m42() << " " << m_transform->m43() << " " << m_transform->m44() << "])\n";
    }


So this transform must be slightly non-identity. Figure out why!
Comment 7 Antoine Quint 2019-04-09 07:09:24 PDT
I think the reason is that the animation's progress can be a very small number larger than 0. I don't know whether that is a bug or a shortcoming of the test.
Comment 8 Antoine Quint 2019-04-09 10:09:59 PDT
I think for the Web Animations engine the right thing to use is the "ready" promise and not an "animationstart" event where the event delivery is async and progress may not be 0 at the time it's delivered.
Comment 9 Antoine Quint 2019-04-09 10:12:00 PDT
Created attachment 367047 [details]
Patch
Comment 10 Dean Jackson 2019-04-09 10:21:12 PDT
Comment on attachment 367047 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367047&action=review

> LayoutTests/ChangeLog:11
> +        than 1 and yield an animated transform that isn't quite the identity matrix.

Don't you mean 0?
Comment 11 Antoine Quint 2019-04-09 10:50:18 PDT
Committed r244082: <https://trac.webkit.org/changeset/244082>