Title: [203792] trunk/Source/WebCore
- Revision
- 203792
- Author
- [email protected]
- Date
- 2016-07-27 14:10:23 -0700 (Wed, 27 Jul 2016)
Log Message
Fullscreen video zoom button does not work after rotating when aspect ratio matches display.
https://bugs.webkit.org/show_bug.cgi?id=160263
rdar://problem/27368872
Patch by Jeremy Jones <[email protected]> on 2016-07-27
Reviewed by Eric Carlson.
When video and display aspect ratio match, and rotating from landscape to protrait, the transform used in layout
will be Identity. This means checking the transform for identity is an insufficient test to see if the bounds
need to be resolved.
Instead, always attempt to resolve the bounds and do a more accurate test while doing so.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (203791 => 203792)
--- trunk/Source/WebCore/ChangeLog 2016-07-27 21:00:42 UTC (rev 203791)
+++ trunk/Source/WebCore/ChangeLog 2016-07-27 21:10:23 UTC (rev 203792)
@@ -1,3 +1,21 @@
+2016-07-27 Jeremy Jones <[email protected]>
+
+ Fullscreen video zoom button does not work after rotating when aspect ratio matches display.
+ https://bugs.webkit.org/show_bug.cgi?id=160263
+ rdar://problem/27368872
+
+ Reviewed by Eric Carlson.
+
+ When video and display aspect ratio match, and rotating from landscape to protrait, the transform used in layout
+ will be Identity. This means checking the transform for identity is an insufficient test to see if the bounds
+ need to be resolved.
+
+ Instead, always attempt to resolve the bounds and do a more accurate test while doing so.
+
+ * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+ (-[WebAVPlayerLayer layoutSublayers]):
+ (-[WebAVPlayerLayer resolveBounds]):
+
2016-07-27 Anders Carlsson <[email protected]>
Stop accepting the deprecated "requiredShippingAddressFields" and "requiredBillingAddressFields" properties
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (203791 => 203792)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-07-27 21:00:42 UTC (rev 203791)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-07-27 21:10:23 UTC (rev 203792)
@@ -269,8 +269,7 @@
dispatch_async(dispatch_get_main_queue(), ^{
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(resolveBounds) object:nil];
- if (!CGAffineTransformIsIdentity(transform))
- [self performSelector:@selector(resolveBounds) withObject:nil afterDelay:animationDuration + 0.1];
+ [self performSelector:@selector(resolveBounds) withObject:nil afterDelay:animationDuration + 0.1];
});
}
@@ -283,13 +282,18 @@
if ([_videoSublayer superlayer] != self)
return;
+ if (CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds]) && CGAffineTransformIsIdentity([(UIView *)[_videoSublayer delegate] transform]))
+ return;
+
[CATransaction begin];
[CATransaction setAnimationDuration:0];
[CATransaction setDisableActions:YES];
- self.modelVideoLayerFrame = [self bounds];
- ASSERT(_fullscreenInterface->model());
- _fullscreenInterface->model()->setVideoLayerFrame(self.modelVideoLayerFrame);
+ if (!CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds])) {
+ self.modelVideoLayerFrame = [self bounds];
+ ASSERT(_fullscreenInterface->model());
+ _fullscreenInterface->model()->setVideoLayerFrame(self.modelVideoLayerFrame);
+ }
[(UIView *)[_videoSublayer delegate] setTransform:CGAffineTransformIdentity];
[CATransaction commit];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes