Diff
Modified: trunk/Source/WebCore/ChangeLog (187214 => 187215)
--- trunk/Source/WebCore/ChangeLog 2015-07-23 04:58:34 UTC (rev 187214)
+++ trunk/Source/WebCore/ChangeLog 2015-07-23 05:09:16 UTC (rev 187215)
@@ -1,3 +1,14 @@
+2015-07-22 James Savage <james.sav...@apple.com>
+
+ Use updated CoreAnimation snapshot SPI.
+ https://bugs.webkit.org/show_bug.cgi?id=147197
+ <rdar://problem/21032083>
+
+ Reviewed by Tim Horton.
+ Patch by James Savage.
+
+ * platform/spi/cocoa/QuartzCoreSPI.h:
+
2015-07-22 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Timeline should immediately start moving play head when starting a new recording
Modified: trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h (187214 => 187215)
--- trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h 2015-07-23 04:58:34 UTC (rev 187214)
+++ trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h 2015-07-23 05:09:16 UTC (rev 187215)
@@ -32,6 +32,7 @@
#include <QuartzCore/CARenderServer.h>
#ifdef __OBJC__
+#import <QuartzCore/CADisplay.h>
#import <QuartzCore/CALayerHost.h>
#import <QuartzCore/CALayerPrivate.h>
@@ -149,7 +150,7 @@
uint32_t slotId, int32_t ox, int32_t oy, const CATransform3D *);
#if USE(IOSURFACE)
-EXTERN_C void CARenderServerRenderLayerWithTransform(mach_port_t server_port, uint32_t client_id, uint64_t layer_id, IOSurfaceRef iosurface, int32_t ox, int32_t oy, const CATransform3D *matrix);
+EXTERN_C void CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(mach_port_t server_port, CFStringRef display_name, uint32_t client_id, uint64_t layer_id, IOSurfaceRef iosurface, int32_t ox, int32_t oy, const CATransform3D *matrix, CFTimeInterval offset);
#endif
Modified: trunk/Source/WebKit2/ChangeLog (187214 => 187215)
--- trunk/Source/WebKit2/ChangeLog 2015-07-23 04:58:34 UTC (rev 187214)
+++ trunk/Source/WebKit2/ChangeLog 2015-07-23 05:09:16 UTC (rev 187215)
@@ -1,3 +1,16 @@
+2015-07-22 James Savage <james.sav...@apple.com>
+
+ Use updated CoreAnimation snapshot SPI.
+ https://bugs.webkit.org/show_bug.cgi?id=147197
+ <rdar://problem/21032083>
+
+ Reviewed by Tim Horton.
+ Patch by James Savage.
+
+ * Platform/spi/ios/UIKitSPI.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
+
2015-07-22 Timothy Horton <timothy_hor...@apple.com>
Fix the build
Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (187214 => 187215)
--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-23 04:58:34 UTC (rev 187214)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-23 05:09:16 UTC (rev 187215)
@@ -247,6 +247,11 @@
- (void)_handleKeyUIEvent:(UIEvent *)event;
@end
+@class CADisplay;
+@interface UIScreen (Details)
+- (CADisplay *)_display;
+@end
+
@interface UIScrollView (Details)
- (void)_stopScrollingAndZoomingAnimations;
- (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration force:(BOOL)force;
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (187214 => 187215)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-07-23 04:58:34 UTC (rev 187214)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-07-23 05:09:16 UTC (rev 187215)
@@ -2885,14 +2885,13 @@
#if USE(IOSURFACE)
// If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly.
- if (self.window) {
+ if (CADisplay *display = self.window.screen._display) {
auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::ColorSpaceDeviceRGB);
CGFloat imageScaleInViewCoordinates = imageWidth / rectInViewCoordinates.size.width;
CATransform3D transform = CATransform3DMakeScale(imageScaleInViewCoordinates, imageScaleInViewCoordinates, 1);
transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0);
- CARenderServerRenderLayerWithTransform(MACH_PORT_NULL, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform);
+ CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(MACH_PORT_NULL, (CFStringRef)display.name, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform, 0);
completionHandler(surface->createImage().get());
-
return;
}
#endif