Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c610bd1cd7c7c41aad043fc2527683cf4ee6e044
      
https://github.com/WebKit/WebKit/commit/c610bd1cd7c7c41aad043fc2527683cf4ee6e044
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2024-04-27 (Sat, 27 Apr 2024)

  Changed paths:
    A 
LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash-expected.txt
    A 
LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash.html
    M LayoutTests/platform/ipad/TestExpectations
    M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h
    M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm

  Log Message:
  -----------
  Picture-in-Picture from canvas-sourced video turns black when canvas is 
resized
https://bugs.webkit.org/show_bug.cgi?id=270859
rdar://124479880

Reviewed by Jer Noble.

In 262654@main, a workaround was added waiting for the element size to change, 
assuming that
when the size changed, the HostingContextID would always be known.
In 262654@main, a proper solution was added that asynchronously waited for the 
context ID to
be available before continuing setting up fullscreen PiP, however it didn't 
remove the workaround
set in 262654@main and as it incorrectly didn't clear the callback it allowed 
for it to be called
multiple times.
When used with a MediaStream, there's no initial size change as the size is 
known upon
creation of the canvas.
So when the video element was resized, it would attempt to enter fullscreen 
when we were
already in fullscreen.
This caused an assertion in debug build and an Obj-C exception would also be 
thrown when exiting PiP
due to the ViewController having already been deleted.

This change is in effect a revert of 262654@main.
Added test.

* LayoutTests/platform/ipad/TestExpectations: On EWS, tests intermittently 
timeout, works fine locally
* 
LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash-expected.txt:
 Added.
* 
LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash.html:
 Added.
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h:
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
(WebKit::VideoPresentationManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoPresentationManager::videoDimensionsChanged):

Canonical link: https://commits.webkit.org/278075@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to