Title: [110780] trunk/Source/WebKit2
- Revision
- 110780
- Author
- [email protected]
- Date
- 2012-03-14 16:27:17 -0700 (Wed, 14 Mar 2012)
Log Message
With tiled drawing enabled, clicking a link to a PDF causes a cross-fade
https://bugs.webkit.org/show_bug.cgi?id=79247
<rdar://problem/10910808>
Reviewed by Sam Weinig.
Instead of creating a new CALayer for the WKView when we're in tiled mode, re-use the existing layer that AppKit makes for us.
This way, we won't get any implicit animations when we change layer properties (such as sublayers in this case).
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView wantsUpdateLayer]):
(-[WKView updateLayer]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (110779 => 110780)
--- trunk/Source/WebKit2/ChangeLog 2012-03-14 23:25:41 UTC (rev 110779)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-14 23:27:17 UTC (rev 110780)
@@ -1,3 +1,19 @@
+2012-03-14 Anders Carlsson <[email protected]>
+
+ With tiled drawing enabled, clicking a link to a PDF causes a cross-fade
+ https://bugs.webkit.org/show_bug.cgi?id=79247
+ <rdar://problem/10910808>
+
+ Reviewed by Sam Weinig.
+
+ Instead of creating a new CALayer for the WKView when we're in tiled mode, re-use the existing layer that AppKit makes for us.
+ This way, we won't get any implicit animations when we change layer properties (such as sublayers in this case).
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:contextRef:pageGroupRef:]):
+ (-[WKView wantsUpdateLayer]):
+ (-[WKView updateLayer]):
+
2012-03-14 Alexey Proskuryakov <[email protected]>
WebProcess sometimes hits an assertion in SandboxExtensionTracker::didCommitProvisionalLoad after running regression tests
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (110779 => 110780)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-03-14 23:25:41 UTC (rev 110779)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-03-14 23:27:17 UTC (rev 110780)
@@ -2525,9 +2525,11 @@
bool hadPDFView = _data->_pdfViewController;
_data->_pdfViewController = nullptr;
+ self.wantsLayer = pageHasCustomRepresentation;
+
if (pageHasCustomRepresentation)
_data->_pdfViewController = PDFViewController::create(self);
-
+
if (pageHasCustomRepresentation != hadPDFView)
_data->_page->drawingArea()->pageCustomRepresentationChanged();
}
@@ -2882,10 +2884,6 @@
[self _registerDraggedTypes];
if ([self _shouldUseTiledDrawingArea]) {
- CALayer *layer = [CALayer layer];
- layer.backgroundColor = CGColorGetConstantColor(kCGColorWhite);
- self.layer = layer;
-
self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawNever;
self.wantsLayer = YES;
}
@@ -2895,6 +2893,18 @@
return self;
}
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+- (BOOL)wantsUpdateLayer
+{
+ return [self _shouldUseTiledDrawingArea];
+}
+
+- (void)updateLayer
+{
+ self.layer.backgroundColor = CGColorGetConstantColor(kCGColorWhite);
+}
+#endif
+
- (WKPageRef)pageRef
{
return toAPI(_data->_page.get());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes