Title: [262988] branches/safari-609-branch/Source/WebKit
Revision
262988
Author
[email protected]
Date
2020-06-12 17:06:33 -0700 (Fri, 12 Jun 2020)

Log Message

Cherry-pick r262508. rdar://problem/62977672

    [iOS] Hide the PiP button in fullscreen mode if PiP is disabled in preferences
    https://bugs.webkit.org/show_bug.cgi?id=212699
    <rdar://problem/60391437>

    Reviewed by Eric Carlson.

    In r260474, we hid the PiP button in fullscreen when PiP was unsupported on the
    current device; we must also hide the PiP button when clients have disabled PiP
    via preferences.

    * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
    (-[WKFullScreenViewController videoControlsManagerDidChange]):

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

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (262987 => 262988)


--- branches/safari-609-branch/Source/WebKit/ChangeLog	2020-06-12 23:55:42 UTC (rev 262987)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog	2020-06-13 00:06:33 UTC (rev 262988)
@@ -1,3 +1,38 @@
+2020-06-12  Alan Coon  <[email protected]>
+
+        Cherry-pick r262508. rdar://problem/62977672
+
+    [iOS] Hide the PiP button in fullscreen mode if PiP is disabled in preferences
+    https://bugs.webkit.org/show_bug.cgi?id=212699
+    <rdar://problem/60391437>
+    
+    Reviewed by Eric Carlson.
+    
+    In r260474, we hid the PiP button in fullscreen when PiP was unsupported on the
+    current device; we must also hide the PiP button when clients have disabled PiP
+    via preferences.
+    
+    * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+    (-[WKFullScreenViewController videoControlsManagerDidChange]):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-06-03  Jer Noble  <[email protected]>
+
+            [iOS] Hide the PiP button in fullscreen mode if PiP is disabled in preferences
+            https://bugs.webkit.org/show_bug.cgi?id=212699
+            <rdar://problem/60391437>
+
+            Reviewed by Eric Carlson.
+
+            In r260474, we hid the PiP button in fullscreen when PiP was unsupported on the
+            current device; we must also hide the PiP button when clients have disabled PiP
+            via preferences.
+
+            * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+            (-[WKFullScreenViewController videoControlsManagerDidChange]):
+
 2020-06-10  Alan Coon  <[email protected]>
 
         Cherry-pick r262850. rdar://problem/64226899

Modified: branches/safari-609-branch/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm (262987 => 262988)


--- branches/safari-609-branch/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm	2020-06-12 23:55:42 UTC (rev 262987)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm	2020-06-13 00:06:33 UTC (rev 262988)
@@ -265,7 +265,11 @@
 
     WebCore::PlaybackSessionModel* playbackSessionModel = playbackSessionInterface ? playbackSessionInterface->playbackSessionModel() : nullptr;
     self.playing = playbackSessionModel ? playbackSessionModel->isPlaying() : NO;
-    [_pipButton setHidden:!playbackSessionModel || !playbackSessionModel->isPictureInPictureSupported()];
+    bool isPiPEnabled = false;
+    if (auto page = [self._webView _page])
+        isPiPEnabled = page->preferences().pictureInPictureAPIEnabled() && page->preferences().allowsPictureInPictureMediaPlayback();
+    bool isPiPSupported = playbackSessionModel && playbackSessionModel->isPictureInPictureSupported();
+    [_pipButton setHidden:!isPiPEnabled || !isPiPSupported];
 }
 
 - (void)setPrefersStatusBarHidden:(BOOL)value
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to