Tapping to zoom in and out causes video to become very small on some iPhone models
<rdar://67870169>
Created attachment 408988 [details] Patch
Comment on attachment 408988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408988&action=review > Source/WebCore/ChangeLog:16 > + * platform/ios/VideoFullscreenInterfaceAVKit.mm: > + (-[WebAVPlayerLayer resolveBounds]): On some iPhone models, AVKit does not > + change "bounds" of WebAVPlayerLayer after changing its video gravity. Therefore, > + in this function, "modelVideoLayerFrame" and "bounds" might be the same. But we > + still need to update the video layer frame in the Web process. > + > + (-[WebAVPlayerLayer setVideoGravity:]): On some iPhone models, AVKit does > + not call -[WebAVPlayerLayer:layoutSublayers] immediately after changing > + the video gravity. Forcing a layout can fix that. How can this be tested?
Comment on attachment 408988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408988&action=review >> Source/WebCore/ChangeLog:16 >> + the video gravity. Forcing a layout can fix that. > > How can this be tested? To write a regression test, we need to expose the "video gravity" and "video fullscreen frame" of a video element through the "Internals" interface. However, for a layout test, we have to disable the "mock video presentation mode". Otherwise, the test may conflict with any other video fullscreen or picture-in-picture test. But we cannot test this patch if "mock video presentation mode" is disabled. Let me try to write an API test.
Just realized that we have to land the patch for bug 216426 first. The patch for bug 216426 will improve the mechanism to implement reliable tests regarding video fullscreen and picture-in-picture.
Because of bug 212654, TestWebKitAPI on iOS cannot test the video fullscreen feature properly. We have to enable the "mock video presentation mode", with which we cannot test the video gravity setting. I am afraid we have to defer the regression test development for this bug.
Committed r267372: <https://trac.webkit.org/changeset/267372> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408988 [details].