Title: [272666] trunk/Source/WebKit
- Revision
- 272666
- Author
- achristen...@apple.com
- Date
- 2021-02-10 11:41:06 -0800 (Wed, 10 Feb 2021)
Log Message
REGRESSION (r272628): [macOS] TestWebKitAPI.WKWebView.SnapshotImageError is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221702
I got a little carried away with my error reduction. This one needs an error.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (272665 => 272666)
--- trunk/Source/WebKit/ChangeLog 2021-02-10 19:27:35 UTC (rev 272665)
+++ trunk/Source/WebKit/ChangeLog 2021-02-10 19:41:06 UTC (rev 272666)
@@ -1,3 +1,13 @@
+2021-02-10 Alex Christensen <achristen...@webkit.org>
+
+ REGRESSION (r272628): [macOS] TestWebKitAPI.WKWebView.SnapshotImageError is consistently failing
+ https://bugs.webkit.org/show_bug.cgi?id=221702
+
+ I got a little carried away with my error reduction. This one needs an error.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
+
2021-02-10 Kate Cheney <katherine_che...@apple.com>
PCM: Expired reports get sent at the same time after a session restart
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (272665 => 272666)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-02-10 19:27:35 UTC (rev 272665)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-02-10 19:41:06 UTC (rev 272666)
@@ -1075,6 +1075,10 @@
// contains recent updates. If we ever have a UI-side snapshot mechanism on macOS, we will need to factor
// in snapshotConfiguration.afterScreenUpdates at that time.
_page->takeSnapshot(WebCore::enclosingIntRect(rectInViewCoordinates), bitmapSize, WebKit::SnapshotOptionsInViewCoordinates, [handler, snapshotWidth, imageHeight](const WebKit::ShareableBitmap::Handle& imageHandle) {
+ if (imageHandle.isNull()) {
+ handler(nil, createNSError(WKErrorUnknown).get());
+ return;
+ }
auto bitmap = WebKit::ShareableBitmap::create(imageHandle, WebKit::SharedMemory::Protection::ReadOnly);
RetainPtr<CGImageRef> cgImage = bitmap ? bitmap->makeCGImage() : nullptr;
auto image = adoptNS([[NSImage alloc] initWithCGImage:cgImage.get() size:NSMakeSize(snapshotWidth, imageHeight)]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes