Bug 213658 - Video spills over PiP screen a little when using Picture in Picture
Summary: Video spills over PiP screen a little when using Picture in Picture
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-26 13:32 PDT by Peng Liu
Modified: 2020-06-29 16:32 PDT (History)
7 users (show)

See Also:


Attachments
Patch (18.49 KB, patch)
2020-06-26 17:02 PDT, Peng Liu
eric.carlson: review+
Details | Formatted Diff | Diff
patch for landing (18.49 KB, patch)
2020-06-29 10:47 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2020-06-26 13:32:26 PDT
Video spills over PiP screen a little when using Picture in Picture
Comment 1 Peng Liu 2020-06-26 13:32:58 PDT
<rdar://problem/64747869>
Comment 2 Peng Liu 2020-06-26 17:02:27 PDT
Created attachment 402932 [details]
Patch
Comment 3 Eric Carlson 2020-06-28 17:37:47 PDT
Comment on attachment 402932 [details]
Patch

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

> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:986
> +    FloatSize videoDimensions = FloatSize(videoElement.videoWidth(), videoElement.videoHeight());
> +
> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, videoElementClientRect, videoDimensions, viewRef, mode, allowsPictureInPicture] {

Can you use something like this instead - FloatSize videoDimensions = { videoElement.videoWidth(), videoElement.videoHeight() }
Comment 4 Peng Liu 2020-06-29 10:41:59 PDT
Comment on attachment 402932 [details]
Patch

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

>> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:986
>> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, videoElementClientRect, videoDimensions, viewRef, mode, allowsPictureInPicture] {
> 
> Can you use something like this instead - FloatSize videoDimensions = { videoElement.videoWidth(), videoElement.videoHeight() }

Good idea! I change it to:
FloatSize videoDimensions = { (float)videoElement.videoWidth(), (float)videoElement.videoHeight() };
Comment 5 Peng Liu 2020-06-29 10:47:51 PDT
Created attachment 403081 [details]
patch for landing
Comment 6 EWS 2020-06-29 16:32:46 PDT
Committed r263707: <https://trac.webkit.org/changeset/263707>

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