[Webkit-unassigned] [Bug 161450] [Cocoa] No reliable way to get a snapshot of WKWebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 13:57:25 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=161450

Tim Horton <thorton at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #302563|review?                     |review+
              Flags|                            |

--- Comment #64 from Tim Horton <thorton at apple.com> ---
Comment on attachment 302563
  --> https://bugs.webkit.org/attachment.cgi?id=302563
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=302563&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKSnapshotConfiguration.h:45
> + @discussion snapshotWidth represents the width in points. If the snapshotWidth is not set, 

"not set", or maybe "nil" (since you can set it to nil)

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:984
> +    // For iOS perform a hardware snapshot of the view for better quality.
> +    // Need to scale by device scale factor or the image will be distorted.

I would almost just remove these comments, they're kind of vague and unhelpful.

> Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:454
> +		93F56DA31E564938003EDE84 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C83E0331D0A5F2700FEBCF3 /* libicucore.dylib */; };

‽‽‽

> Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:-1423
> -				7C83E03F1D0A61A000FEBCF3 /* libicucore.dylib in Frameworks */,

‽‽‽

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:74
> +    [snapshotConfiguration setSnapshotWidth:[NSNumber numberWithFloat:viewWidth]];

@(viewWidth)

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:79
> +        EXPECT_WK_STREQ(@"WKErrorDomain", [error domain]);

Dots :)

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:99
> +    backingScaleFactor = [[webView window] backingScaleFactor];

Isn't this just window? no need for [webView window]

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170223/29f6c160/attachment.html>


More information about the webkit-unassigned mailing list