Bug 225548

Summary: [GPUP] A small video element enters fullscreen with strange animations
Product: WebKit Reporter: Peng Liu <peng.liu6>
Component: MediaAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Fix build failures
none
Fix build failures (again)
eric.carlson: review+
Patch for landing none

Description Peng Liu 2021-05-07 16:29:23 PDT
[GPUP] A small video element enters fullscreen with strange animations
Comment 1 Peng Liu 2021-05-07 16:29:57 PDT
<rdar://76770068>
Comment 2 Peng Liu 2021-05-07 16:47:17 PDT
Created attachment 428061 [details]
Patch
Comment 3 Peng Liu 2021-05-07 17:22:16 PDT
Created attachment 428065 [details]
Fix build failures
Comment 4 Peng Liu 2021-05-07 17:24:40 PDT
Created attachment 428066 [details]
Fix build failures (again)
Comment 5 Eric Carlson 2021-05-08 07:55:48 PDT
Comment on attachment 428066 [details]
Fix build failures (again)

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

> Source/WebKit/WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:100
> +        bool inFullscreenOrPictureInPicture = false;
> +        if (auto* mediaPlayerPrivateRemote = self.mediaPlayerPrivateRemote)
> +            inFullscreenOrPictureInPicture = mediaPlayerPrivateRemote->inVideoFullscreenOrPictureInPicture();
> +
> +        if (inFullscreenOrPictureInPicture) {

Nit: this can be simplified slightly to 

    if (auto* mediaPlayerPrivateRemote = self.mediaPlayerPrivateRemote; mediaPlayerPrivateRemote && mediaPlayerPrivateRemote->inVideoFullscreenOrPictureInPicture())
Comment 6 Peng Liu 2021-05-08 15:43:05 PDT
Created attachment 428093 [details]
Patch for landing
Comment 7 Peng Liu 2021-05-08 15:44:03 PDT
Comment on attachment 428066 [details]
Fix build failures (again)

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

>> Source/WebKit/WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:100
>> +        if (inFullscreenOrPictureInPicture) {
> 
> Nit: this can be simplified slightly to 
> 
>     if (auto* mediaPlayerPrivateRemote = self.mediaPlayerPrivateRemote; mediaPlayerPrivateRemote && mediaPlayerPrivateRemote->inVideoFullscreenOrPictureInPicture())

Good idea! Fixed.
Comment 8 EWS 2021-05-08 21:53:43 PDT
Committed r277242 (237511@main): <https://commits.webkit.org/237511@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428093 [details].