Bug 200577 - Problems playing animated images in Mac high-sierra
Summary: Problems playing animated images in Mac high-sierra
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-09 08:59 PDT by Carlos Alberto Lopez Perez
Modified: 2019-08-12 12:08 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.88 KB, patch)
2019-08-09 09:11 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (10.88 KB, patch)
2019-08-09 09:16 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-highsierra (3.24 MB, application/zip)
2019-08-09 10:21 PDT, EWS Watchlist
no flags Details
Patch (11.18 KB, patch)
2019-08-09 10:58 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2019-08-09 08:59:26 PDT
When working on bug 74779 I discovered that all the test cases I wrote (I tested the cases in bug 200537 to not spam the other)  were failing on the EWS for Mac (which happens to run MacOS high-sierra), but this test cases are working fine on the  Mac machine I have access to (that runs on Mojave).

This tests also work fine on other ports (GTK and AppleWin).

So now I believe there is an issue in high-sierra that causes that playing animated images to be broken.

The issue I see is that the animated image doesn't play beyond the first 2 or 4 frames. It gets stuck playing.

I'm attaching a patch with  3 simple test cases that pass fine on Mojave and WebKitGTK and AppleWin, but will fail here on the EWS because it runs high-sierra.

I don't have the resources to investigate this, so I'm reporting this with the hope someone else can have a look.
Comment 1 Carlos Alberto Lopez Perez 2019-08-09 09:11:02 PDT
Created attachment 375924 [details]
Patch

patch for testing. It includes 3 test cases that will fail on mac high-sierra but work on mojave or other ports
Comment 2 Carlos Alberto Lopez Perez 2019-08-09 09:16:53 PDT
Created attachment 375925 [details]
Patch

same than above, just fix timeout value in a test
Comment 3 EWS Watchlist 2019-08-09 10:21:01 PDT
Comment on attachment 375925 [details]
Patch

Attachment 375925 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12885592

New failing tests:
fast/images/draw-animated-image-simple-no-repeat.html
fast/images/count-animated-image-frames-simple-timer.html
fast/images/count-animated-image-frames-decode-and-webkitImageFrameReady.html
Comment 4 EWS Watchlist 2019-08-09 10:21:04 PDT
Created attachment 375931 [details]
Archive of layout-test-results from ews103 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 5 Simon Fraser (smfr) 2019-08-09 10:43:21 PDT
This might be related to [window setAutodisplay:NO] in DumpRenderTree that will prevent the repaint-based advancement of animated images.

A hack would be to add a composited element on the page to turn autodisplay on.
Comment 6 Carlos Alberto Lopez Perez 2019-08-09 10:52:32 PDT
(In reply to Simon Fraser (smfr) from comment #5)
> This might be related to [window setAutodisplay:NO] in DumpRenderTree that
> will prevent the repaint-based advancement of animated images.
> 
> A hack would be to add a composited element on the page to turn autodisplay
> on.

I had no idea this was a thing.

Let's try it.
Comment 7 Carlos Alberto Lopez Perez 2019-08-09 10:58:50 PDT
Created attachment 375935 [details]
Patch

Add <div style="will-change: transform"> to the 3 tests
Comment 8 Simon Fraser (smfr) 2019-08-09 14:21:27 PDT
We should really add testRunner.setWindowAutodisplay() or something.
Comment 9 Carlos Alberto Lopez Perez 2019-08-12 08:12:48 PDT
(In reply to Carlos Alberto Lopez Perez from comment #6)
> (In reply to Simon Fraser (smfr) from comment #5)
> > This might be related to [window setAutodisplay:NO] in DumpRenderTree that
> > will prevent the repaint-based advancement of animated images.
> > 
> > A hack would be to add a composited element on the page to turn autodisplay
> > on.
> 
> I had no idea this was a thing.
> 
> Let's try it.

This fixed the issue I was having :)

What its the rationale for having a default of [window setAutodisplay:NO] in DRT? Just curious.
Comment 10 Simon Fraser (smfr) 2019-08-12 11:17:45 PDT
(In reply to Carlos Alberto Lopez Perez from comment #9)
> (In reply to Carlos Alberto Lopez Perez from comment #6)
> > (In reply to Simon Fraser (smfr) from comment #5)
> > > This might be related to [window setAutodisplay:NO] in DumpRenderTree that
> > > will prevent the repaint-based advancement of animated images.
> > > 
> > > A hack would be to add a composited element on the page to turn autodisplay
> > > on.
> > 
> > I had no idea this was a thing.
> > 
> > Let's try it.
> 
> This fixed the issue I was having :)
> 
> What its the rationale for having a default of [window setAutodisplay:NO] in
> DRT? Just curious.

Historically, it increased performance, and made testing more predictable (you only paint when you explicitly ask for it).
Comment 11 Carlos Alberto Lopez Perez 2019-08-12 12:08:04 PDT
(In reply to Simon Fraser (smfr) from comment #10)
> > What its the rationale for having a default of [window setAutodisplay:NO] in
> > DRT? Just curious.
> 
> Historically, it increased performance, and made testing more predictable
> (you only paint when you explicitly ask for it).

I see.

But I have to say that I find really confusing that a test can behave differently in WK2 and WK1 due to this setting.

Maybe the default should be the other way around, so only tests that really need this disabled have to manually opt-in.

In any case, I'm not going to argue/push about changing this as I'm not really interested into WebKit1 development.

I'm closing this as an invalid bug.

Thanks!