Fixed the build following AppKit API deprecations in a recent SDKs
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Jan 2018 19:09:47 +0000 (19:09 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Jan 2018 19:09:47 +0000 (19:09 +0000)
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]): Suppressed deprecation warnings.
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
(-[WKFullScreenWindowController exitFullScreen]): Ditto.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _setAutodisplay:]): Ditto.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm
Source/WebKit/UIProcess/mac/WKPrintingView.mm

index 71f2a36..2e250ea 100644 (file)
@@ -1,3 +1,18 @@
+2018-01-05  Dan Bernstein  <mitz@apple.com>
+
+        Fixed the build following AppKit API deprecations in a recent SDKs
+
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+        (-[WKFullScreenWindowController enterFullScreen:]): Suppressed deprecation warnings.
+        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
+        (-[WKFullScreenWindowController exitFullScreen]): Ditto.
+        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
+        (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
+        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
+        (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
+        * UIProcess/mac/WKPrintingView.mm:
+        (-[WKPrintingView _setAutodisplay:]): Ditto.
+
 2018-01-05  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r226401.
index b4fc977..e1446b2 100644 (file)
@@ -227,7 +227,10 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
 
     // Screen updates to be re-enabled in _startEnterFullScreenAnimationWithDuration:
     NSDisableScreenUpdates();
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[self window] setAutodisplay:NO];
+#pragma clang diagnostic pop
 
     [self _manager]->saveScrollPosition();
     _savedTopContentInset = _page->topContentInset();
@@ -303,7 +306,10 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med
         // Transition to fullscreen failed. Clean up.
         _fullScreenState = NotInFullScreen;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
         [[self window] setAutodisplay:YES];
+#pragma clang diagnostic pop
         _page->setSuppressVisibilityUpdates(false);
 
         NSResponder *firstResponder = [[self window] firstResponder];
@@ -340,7 +346,10 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med
 
     // Screen updates to be re-enabled in _startExitFullScreenAnimationWithDuration: or beganExitFullScreenWithInitialFrame:finalFrame:
     NSDisableScreenUpdates();
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[self window] setAutodisplay:NO];
+#pragma clang diagnostic pop
 
     // See the related comment in enterFullScreen:
     // We will resume the normal behavior in _startExitFullScreenAnimationWithDuration:
@@ -400,7 +409,10 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med
     NSView *contentView = [[self window] contentView];
     contentView.hidden = YES;
     [_backgroundView.get().layer removeAllAnimations];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[_webViewPlaceholder window] setAutodisplay:NO];
+#pragma clang diagnostic pop
 
     [self _replaceView:_webViewPlaceholder.get() with:_webView];
     BEGIN_BLOCK_OBJC_EXCEPTIONS
@@ -433,7 +445,10 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med
 - (void)completeFinishExitFullScreenAnimationAfterRepaint
 {
     _repaintCallback = nullptr;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[_webView window] setAutodisplay:YES];
+#pragma clang diagnostic pop
     [[_webView window] displayIfNeeded];
     _page->setSuppressVisibilityUpdates(false);
     NSEnableScreenUpdates();
@@ -627,7 +642,10 @@ static CAAnimation *fadeAnimation(CFTimeInterval duration, AnimationDirection di
     [window makeFirstResponder:_webView];
 
     _page->setSuppressVisibilityUpdates(false);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[self window] setAutodisplay:YES];
+#pragma clang diagnostic pop
     [[self window] displayIfNeeded];
     NSEnableScreenUpdates();
 }
@@ -652,7 +670,10 @@ static CAAnimation *fadeAnimation(CFTimeInterval duration, AnimationDirection di
     [_backgroundView.get().layer addAnimation:fadeAnimation(duration, AnimateOut) forKey:@"fullscreen"];
 
     _page->setSuppressVisibilityUpdates(false);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[self window] setAutodisplay:YES];
+#pragma clang diagnostic pop
     [[self window] displayIfNeeded];
     NSEnableScreenUpdates();
 }
index 2a00ddb..934297f 100644 (file)
@@ -78,10 +78,16 @@ static BOOL isForcingPreviewUpdate;
 
 - (void)_setAutodisplay:(BOOL)newState
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if (!newState && [[_wkView window] isAutodisplay])
+#pragma clang diagnostic pop
         [_wkView displayIfNeeded];
     
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [[_wkView window] setAutodisplay:newState];
+#pragma clang diagnostic pop
 
     // For some reason, painting doesn't happen for a long time without this call, <rdar://problem/8975229>.
     if (newState)