Summary: | Animation stops with object-fit:contain on an animated 2d canvas | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | andj2223 | ||||
Component: | Canvas | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Major | CC: | commit-queue, dino, graouts, jonlee, realdawei, simon.fraser, tsavell, webkit-bug-importer, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari Technology Preview | ||||||
Hardware: | iPhone / iPad | ||||||
OS: | Other | ||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=188007 https://bugs.webkit.org/show_bug.cgi?id=188910 https://bugs.webkit.org/show_bug.cgi?id=188394 |
||||||
Attachments: |
|
Description
andj2223
2018-07-19 18:58:39 PDT
This is pretty funny. Turn on repaint rects in web inspector and you can see that we fail to map the repaints through the object-fit transform. Created attachment 345735 [details]
Patch
Comment on attachment 345735 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=345735&action=review > Source/WebCore/html/HTMLCanvasElement.cpp:511 > + if (is<RenderReplaced>(renderBox())) { The canvas renderer is not necessarily a RenderReplaced. (In reply to zalan from comment #4) > Comment on attachment 345735 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=345735&action=review > > > Source/WebCore/html/HTMLCanvasElement.cpp:511 > > + if (is<RenderReplaced>(renderBox())) { > > The canvas renderer is not necessarily a RenderReplaced. And the object-fit is specific to replaced elements. Reverted r234187 for reason: the layout test added with this change is flaky on the bots Committed r234203: <https://trac.webkit.org/changeset/234203> (In reply to David Fenton (:realdawei) from comment #7) > Reverted r234187 for reason: > > the layout test added with this change is flaky on the bots > > Committed r234203: <https://trac.webkit.org/changeset/234203> This test was A) Failing on High Sierra WK2 and Sierra WK 2, B) Flaky on High Sierra Release WK1, High Sierra (Leaks) and C) Failing on Windows Release. So I made the decision to roll it out for now. Sample Diff: https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r234195%20(5827)/fast/repaint/canvas-object-fit-diff.txt --- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/fast/repaint/canvas-object-fit-expected.txt +++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/fast/repaint/canvas-object-fit-actual.txt @@ -10,9 +10,6 @@ (position 8.00 8.00) (bounds 202.00 102.00) (drawsContent 1) - (repaint rects - (rect 70.00 20.00 7.00 7.00) - ) ) ) ) Flakiness Dashboard: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Frepaint%2Fcanvas-object-fit.html *** Bug 188007 has been marked as a duplicate of this bug. *** *** Bug 188004 has been marked as a duplicate of this bug. *** When the test flakes, there's no layer flush between the first drawing and the drawing with tracked repaints, so we've never cleared the dirty rect from the first fill, and the second draw doesn't add a new dirty rect. In the good case we flush between the load event and the zero-delay timer. Re-landed in https://trac.webkit.org/changeset/234343/webkit with a fixed test. Looks like after https://trac.webkit.org/changeset/234343/webkit, we have two tests. One is failing and the other is a timeout that fail together. Both tests are flakey. tests are failing on High Sierra Leaks bots tests: inspector/layers/layers-anonymous.html inspector/layers/layer-tree-manager.html combines history: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=inspector%2Flayers%2Flayers-anonymous.html%20inspector%2Flayers%2Flayer-tree-manager.html Diffs: https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/r234434%20(11850)/inspector/layers/layer-tree-manager-pretty-diff.html https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/r234434%20(11850)/inspector/layers/layers-anonymous-pretty-diff.html Looks like fast/repaint/canvas-object-fit.html has been flakey sense being reintroduced in: https://trac.webkit.org/changeset/234343/webkit Test History: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Frepaint%2Fcanvas-object-fit.html Reproduced with: run-webkit-tests --root testbuild-234343 fast/repaint/canvas-object-fit.html --iterations 500 -f -1 Diff: --- /Volumes/Data/slave/highsierra-release-tests-wk1/build/layout-test-results/fast/repaint/canvas-object-fit-expected.txt +++ /Volumes/Data/slave/highsierra-release-tests-wk1/build/layout-test-results/fast/repaint/canvas-object-fit-actual.txt @@ -1,21 +1 @@ - (GraphicsLayer - (anchor 0.00 0.00) - (bounds 800.00 600.00) - (children 1 - (GraphicsLayer - (bounds 800.00 600.00) - (contentsOpaque 1) - (children 1 - (GraphicsLayer - (position 8.00 8.00) - (bounds 202.00 102.00) - (drawsContent 1) - (repaint rects - (rect 70.00 20.00 7.00 7.00) - ) - ) - ) - ) - ) -) |