Title: [207197] branches/safari-602-branch/Source/WebCore
Revision
207197
Author
matthew_han...@apple.com
Date
2016-10-12 01:41:03 -0700 (Wed, 12 Oct 2016)

Log Message

Merge r203792. rdar://problem/28476951

Modified Paths

Diff

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (207196 => 207197)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-10-12 08:40:58 UTC (rev 207196)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-10-12 08:41:03 UTC (rev 207197)
@@ -1,5 +1,27 @@
 2016-10-11  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r203792. rdar://problem/28476951
+
+    2016-07-27  Jeremy Jones  <jere...@apple.com>
+
+            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-10-11  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r203611. rdar://problem/28476958
 
     2016-07-22  Daniel Bates  <daba...@apple.com>

Modified: branches/safari-602-branch/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (207196 => 207197)


--- branches/safari-602-branch/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm	2016-10-12 08:40:58 UTC (rev 207196)
+++ branches/safari-602-branch/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm	2016-10-12 08:41:03 UTC (rev 207197)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to