Fix a few issues in WKFullScreenViewController
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 May 2018 17:46:49 +0000 (17:46 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 May 2018 17:46:49 +0000 (17:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186067
<rdar://problem/40630944>

Reviewed by Darin Adler.

The check in setInterface() is checking the wrong pointer:
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):

The check in -_effectiveFullscreenInsetTop is backwards:
(-[WKFullScreenViewController _effectiveFullscreenInsetTop]):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm

index 8c2642e..29410c6 100644 (file)
@@ -1,3 +1,18 @@
+2018-05-30  Jer Noble  <jer.noble@apple.com>
+
+        Fix a few issues in WKFullScreenViewController
+        https://bugs.webkit.org/show_bug.cgi?id=186067
+        <rdar://problem/40630944>
+
+        Reviewed by Darin Adler.
+
+        The check in setInterface() is checking the wrong pointer:
+        * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+        (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
+
+        The check in -_effectiveFullscreenInsetTop is backwards:
+        (-[WKFullScreenViewController _effectiveFullscreenInsetTop]):
+
 2018-05-30  Chris Dumez  <cdumez@apple.com>
 
         Take a background process assertion in WebPageProxy::callAfterNextPresentationUpdate()
index 6710ae0..6bc452d 100644 (file)
@@ -67,7 +67,7 @@ public:
             return;
 
         if (m_interface && m_interface->playbackSessionModel())
-            interface->playbackSessionModel()->removeClient(*this);
+            m_interface->playbackSessionModel()->removeClient(*this);
         m_interface = interface;
         if (m_interface && m_interface->playbackSessionModel())
             interface->playbackSessionModel()->addClient(*this);
@@ -360,7 +360,7 @@ private:
 @dynamic _effectiveFullscreenInsetTop;
 - (CGFloat)_effectiveFullscreenInsetTop
 {
-    if (!self.prefersStatusBarHidden)
+    if (self.prefersStatusBarHidden)
         return 0;
 
     CGRect cancelFrame = _cancelButton.get().frame;