Bug 219660 - [GPUProcess] Video does not resume if the GPU Process crashes while in fullscreen
Summary: [GPUProcess] Video does not resume if the GPU Process crashes while in fullsc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-08 15:45 PST by Chris Dumez
Modified: 2020-12-09 10:23 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.06 KB, patch)
2020-12-08 15:51 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.05 KB, patch)
2020-12-08 16:04 PST, Chris Dumez
darin: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-12-08 15:45:52 PST
Video does not resume if the GPU Process crashes while in fullscreen.
Comment 1 Chris Dumez 2020-12-08 15:51:25 PST
Created attachment 415685 [details]
Patch
Comment 2 Peng Liu 2020-12-08 15:59:31 PST
Comment on attachment 415685 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        again. However, the full screen logic lives in the UIProcess and I could no figure out how to

s/no/not/

> Source/WebCore/ChangeLog:13
> +        I have verified that the video renders properly if the user re-enter full screen after a crash.

Nice! I assume this patch works for the picture-in-picture case as well, right? Did you see any issue in the animation (exit fullscreen)?
Comment 3 Chris Dumez 2020-12-08 16:03:06 PST
(In reply to Peng Liu from comment #2)
> Comment on attachment 415685 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=415685&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        again. However, the full screen logic lives in the UIProcess and I could no figure out how to
> 
> s/no/not/
> 
> > Source/WebCore/ChangeLog:13
> > +        I have verified that the video renders properly if the user re-enter full screen after a crash.
> 
> Nice! I assume this patch works for the picture-in-picture case as well,
> right? Did you see any issue in the animation (exit fullscreen)?

I see no reason why it would no work in PIP but I have not tested. I personally don't see an animation when full screen exits due to a crash. I am not sure why since we are not calling the exitFullScreenWithoutAnination. That said, it does not look bad, especially considering something crashed.
Comment 4 Chris Dumez 2020-12-08 16:04:29 PST
Created attachment 415687 [details]
Patch
Comment 5 Darin Adler 2020-12-08 17:07:35 PST
Comment on attachment 415687 [details]
Patch

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

> Source/WebCore/platform/graphics/MediaPlayer.cpp:535
> +    if (client().mediaPlayerFullscreenMode() != MediaPlayer::VideoFullscreenModeNone)
> +        client().mediaPlayerExitFullscreen();

Not sure it’s self explanatory that "we would play in full screen if we could, but we can’t make that work, so exit full screen to work around that" is the intention here. Maybe add a brief comment?
Comment 6 Darin Adler 2020-12-08 17:08:25 PST
Comment on attachment 415687 [details]
Patch

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

>> Source/WebCore/platform/graphics/MediaPlayer.cpp:535
>> +        client().mediaPlayerExitFullscreen();
> 
> Not sure it’s self explanatory that "we would play in full screen if we could, but we can’t make that work, so exit full screen to work around that" is the intention here. Maybe add a brief comment?

Maybe something like: "It would be even better if we could resume in full screen mode, but, for now, exiting full screen makes the video rendering work."
Comment 7 Chris Dumez 2020-12-09 10:22:53 PST
Committed r270586: <https://trac.webkit.org/changeset/270586>
Comment 8 Radar WebKit Bug Importer 2020-12-09 10:23:17 PST
<rdar://problem/72141981>