Title: [267372] trunk/Source/WebCore
- Revision
- 267372
- Author
- [email protected]
- Date
- 2020-09-21 15:03:44 -0700 (Mon, 21 Sep 2020)
Log Message
Tapping to zoom in and out causes video to become very small on some iPhone models
https://bugs.webkit.org/show_bug.cgi?id=216635
Reviewed by Jer Noble.
* 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (267371 => 267372)
--- trunk/Source/WebCore/ChangeLog 2020-09-21 22:01:12 UTC (rev 267371)
+++ trunk/Source/WebCore/ChangeLog 2020-09-21 22:03:44 UTC (rev 267372)
@@ -1,3 +1,20 @@
+2020-09-21 Peng Liu <[email protected]>
+
+ Tapping to zoom in and out causes video to become very small on some iPhone models
+ https://bugs.webkit.org/show_bug.cgi?id=216635
+
+ Reviewed by Jer Noble.
+
+ * 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.
+
2020-09-21 Jiewen Tan <[email protected]>
[WebAuthn] Don't set the UV option if the authenticator doesn't support it
Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (267371 => 267372)
--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2020-09-21 22:01:12 UTC (rev 267371)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2020-09-21 22:03:44 UTC (rev 267372)
@@ -332,14 +332,13 @@
[CATransaction begin];
[CATransaction setAnimationDuration:0];
[CATransaction setDisableActions:YES];
-
- if (!CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds])) {
- self.modelVideoLayerFrame = [self bounds];
- if (auto* model = _fullscreenInterface->videoFullscreenModel())
- model->setVideoLayerFrame(_videoSublayerFrame);
- _previousVideoGravity = _videoGravity;
- }
+ self.modelVideoLayerFrame = [self bounds];
+ if (auto* model = _fullscreenInterface->videoFullscreenModel())
+ model->setVideoLayerFrame(_videoSublayerFrame);
+
+ _previousVideoGravity = _videoGravity;
+
[(UIView *)[_videoSublayer delegate] setTransform:CGAffineTransformIdentity];
[CATransaction commit];
@@ -374,6 +373,8 @@
if (auto* model = _fullscreenInterface->videoFullscreenModel())
model->setVideoLayerGravity(gravity);
+
+ [self setNeedsLayout];
}
- (NSString *)videoGravity
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes