Fullscreen view should not update bounds of video when in PiP.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jun 2015 19:10:51 +0000 (19:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jun 2015 19:10:51 +0000 (19:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146134

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-06-19
Reviewed by Darin Adler.

Don't update bounds on video layer when it is not a child.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setBounds:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185761 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

index 5447026..f5b4baa 100644 (file)
@@ -1,3 +1,15 @@
+2015-06-19  Jeremy Jones  <jeremyj@apple.com>
+
+        Fullscreen view should not update bounds of video when in PiP.
+        https://bugs.webkit.org/show_bug.cgi?id=146134
+
+        Reviewed by Darin Adler.
+
+        Don't update bounds on video layer when it is not a child.
+
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (-[WebAVVideoLayer setBounds:]):
+
 2015-06-19  Zalan Bujtas  <zalan@apple.com>
 
         RenderRubyText requires RenderRubyRun parent.
index 7960d5f..70797ee 100644 (file)
@@ -693,8 +693,10 @@ static const char* boolString(bool val)
 {
     [super setBounds:bounds];
 
-    [_videoSublayer setPosition:CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds))];
-    [_videoSublayer setBounds:bounds];
+    if ([_videoSublayer superlayer] == self) {
+        [_videoSublayer setPosition:CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds))];
+        [_videoSublayer setBounds:bounds];
+    }
 }
 
 - (void)setVideoLayerGravity:(AVVideoLayerGravity)videoLayerGravity