Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (229065 => 229066)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-02-27 18:04:36 UTC (rev 229065)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-02-27 18:21:14 UTC (rev 229066)
@@ -1,3 +1,14 @@
+2018-02-27 Tim Horton <[email protected]>
+
+ Stop using deprecated CADisplay SPI
+ https://bugs.webkit.org/show_bug.cgi?id=183150
+ <rdar://problem/37918297>
+
+ Reviewed by Simon Fraser.
+
+ * pal/spi/cocoa/QuartzCoreSPI.h:
+ Switch to the more modern way of getting the display name.
+
2018-02-27 Ryan Haddad <[email protected]>
Unreviewed, rolling out r229055.
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h (229065 => 229066)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h 2018-02-27 18:04:36 UTC (rev 229065)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h 2018-02-27 18:21:14 UTC (rev 229066)
@@ -43,10 +43,6 @@
#import <QuartzCore/CALayerPrivate.h>
#import <QuartzCore/QuartzCorePrivate.h>
-#if PLATFORM(IOS)
-#import <QuartzCore/CADisplay.h>
-#endif
-
#if PLATFORM(MAC)
#import <QuartzCore/CARenderCG.h>
#endif
@@ -100,15 +96,6 @@
@property BOOL shadowPathIsBounds;
@end
-#if PLATFORM(IOS)
-@interface CADisplay : NSObject
-@end
-
-@interface CADisplay ()
-@property (nonatomic, readonly) NSString *name;
-@end
-#endif
-
#if ENABLE(FILTERS_LEVEL_2)
@interface CABackdropLayer : CALayer
@property BOOL windowServerAware;
Modified: trunk/Source/WebKit/ChangeLog (229065 => 229066)
--- trunk/Source/WebKit/ChangeLog 2018-02-27 18:04:36 UTC (rev 229065)
+++ trunk/Source/WebKit/ChangeLog 2018-02-27 18:21:14 UTC (rev 229066)
@@ -1,3 +1,18 @@
+2018-02-27 Tim Horton <[email protected]>
+
+ Stop using deprecated CADisplay SPI
+ https://bugs.webkit.org/show_bug.cgi?id=183150
+ <rdar://problem/37918297>
+
+ Reviewed by Simon Fraser.
+
+ * Platform/spi/ios/FrontBoardServicesSPI.h: Added.
+ * Platform/spi/ios/UIKitSPI.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
+ * WebKit.xcodeproj/project.pbxproj:
+ Switch to the more modern way of getting the display name.
+
2018-02-27 Ryan Haddad <[email protected]>
Unreviewed, rolling out r229055.
Added: trunk/Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h (0 => 229066)
--- trunk/Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h (rev 0)
+++ trunk/Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h 2018-02-27 18:21:14 UTC (rev 229066)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if PLATFORM(IOS)
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <FrontBoardServices/FBSDisplay.h>
+
+#else
+
+@interface FBSDisplayConfiguration : NSObject
+@property (nonatomic, copy, readonly) NSString *name;
+@end
+
+#endif // USE(APPLE_INTERNAL_SDK)
+
+#endif // PLATFORM(IOS)
Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (229065 => 229066)
--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2018-02-27 18:04:36 UTC (rev 229065)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2018-02-27 18:21:14 UTC (rev 229066)
@@ -310,9 +310,9 @@
- (void)_wheelChangedWithEvent:(UIEvent *)event;
@end
-@class CADisplay;
+@class FBSDisplayConfiguration;
@interface UIScreen ()
-- (CADisplay *)_display;
+@property (nonatomic, readonly, retain) FBSDisplayConfiguration *displayConfiguration;
@end
@interface UIScrollView ()
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (229065 => 229066)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-02-27 18:04:36 UTC (rev 229065)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-02-27 18:21:14 UTC (rev 229066)
@@ -34,6 +34,7 @@
#import "CompletionHandlerCallChecker.h"
#import "DiagnosticLoggingClient.h"
#import "FindClient.h"
+#import "FrontBoardServicesSPI.h"
#import "FullscreenClient.h"
#import "IconLoadingDelegate.h"
#import "LegacySessionStateCoding.h"
@@ -5317,10 +5318,7 @@
#if HAVE(IOSURFACE)
// If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- if (CADisplay *display = self.window.screen._display) {
-#pragma clang diagnostic pop
+ if (NSString *displayName = self.window.screen.displayConfiguration.name) {
auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::sRGBColorSpaceRef());
if (!surface) {
completionHandler(nullptr);
@@ -5329,7 +5327,7 @@
CGFloat imageScaleInViewCoordinates = imageWidth / rectInViewCoordinates.size.width;
CATransform3D transform = CATransform3DMakeScale(imageScaleInViewCoordinates, imageScaleInViewCoordinates, 1);
transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0);
- CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(MACH_PORT_NULL, (CFStringRef)display.name, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform, 0);
+ CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(MACH_PORT_NULL, (CFStringRef)displayName, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform, 0);
completionHandler(WebCore::IOSurface::sinkIntoImage(WTFMove(surface)).get());
return;
}
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (229065 => 229066)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-02-27 18:04:36 UTC (rev 229065)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-02-27 18:21:14 UTC (rev 229066)
@@ -635,6 +635,7 @@
2D429BFD1721E2C700EC681F /* PDFPluginPasswordField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */; };
2D47B56C1810714E003A3AEE /* RemoteLayerBackingStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */; };
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */; };
+ 2D4AF0892044C3C4006C8817 /* FrontBoardServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4AF0882044C3C4006C8817 /* FrontBoardServicesSPI.h */; };
2D4D2C811DF60BF3002EB10C /* InteractionInformationRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4D2C7F1DF60BF3002EB10C /* InteractionInformationRequest.h */; };
2D4D2C821DF60BF3002EB10C /* InteractionInformationRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D4D2C801DF60BF3002EB10C /* InteractionInformationRequest.cpp */; };
2D50365E1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D50365D1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm */; };
@@ -3003,6 +3004,7 @@
2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPluginPasswordField.mm; path = PDF/PDFPluginPasswordField.mm; sourceTree = "<group>"; };
2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerBackingStore.mm; sourceTree = "<group>"; };
2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerBackingStore.h; sourceTree = "<group>"; };
+ 2D4AF0882044C3C4006C8817 /* FrontBoardServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrontBoardServicesSPI.h; sourceTree = "<group>"; };
2D4D2C7F1DF60BF3002EB10C /* InteractionInformationRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InteractionInformationRequest.h; path = ios/InteractionInformationRequest.h; sourceTree = "<group>"; };
2D4D2C801DF60BF3002EB10C /* InteractionInformationRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InteractionInformationRequest.cpp; path = ios/InteractionInformationRequest.cpp; sourceTree = "<group>"; };
2D50365D1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeWebGestureEventMac.mm; sourceTree = "<group>"; };
@@ -8490,6 +8492,7 @@
CDA041F31ACE2105004A13EC /* BackBoardServicesSPI.h */,
07A8F3861E64A8F900B668E8 /* CelestialSPI.h */,
CE1A0BCD1A48E6C60054EF74 /* CorePDFSPI.h */,
+ 2D4AF0882044C3C4006C8817 /* FrontBoardServicesSPI.h */,
CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */,
CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */,
CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */,
@@ -8844,6 +8847,7 @@
BCE81D8D1319F7EF00241910 /* FontInfo.h in Headers */,
1A14F8E21D74C834006CBEC6 /* FrameInfoData.h in Headers */,
1AE00D611831792100087DD7 /* FrameLoadState.h in Headers */,
+ 2D4AF0892044C3C4006C8817 /* FrontBoardServicesSPI.h in Headers */,
CD78E1151DB7D7ED0014A2DE /* FullscreenClient.h in Headers */,
515BE1B31D5902DD00DD7C68 /* GamepadData.h in Headers */,
BC17753F118BABF0007D9E9A /* GenericCallback.h in Headers */,