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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 14 15:06:59 PDT 2016


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

--- Comment #9 from Tim Horton <thorton at apple.com> ---
(In reply to comment #8)
> I have a few questions while I was coding this patch. I see that
> -[_snapshotRect:intoImageOfWidth:completionHandler:] passes in
> WebKit::SnapshotOptionsExcludeDeviceScaleFactor when taking the software
> snapshot. -[_WKThumbnailView requestSnapshot] is another caller of this
> method that does not pass this parameter. While testing on OSX with Retina
> display I did not notice a difference in the output image. In what scenarios
> will this affect the snapshot?

You should get a 1x image if you pass that option, and I'm not sure why _snapshotRect would do that. But it definitely looks like WebPage::snapshotAtSize/scaledSnapshotWithOptions respect that option and don't apply the device scale.

> I am now calling -[_snapshotRect:intoImageOfWidth:completionHandler:] for
> iOS. When I tried calling this private API on my iOS 10 iPhone device, a
> WebGL sample page and HTML5 video were not being captured. The HTML overlays
> and surrounding DOM elements were all that was included in the snapshot.
> Does iOS 10 webkit.framework include the change to take a hardware snapshot?
> I see this method was modified a few times in the past year.

It does. Is the view in-window at the time? That really should work.

> I believe the check-webkit-style script is outputting incorrect results for
> the anonymous callbacks. I see this style being used other locations in the
> project.

Yep, this is a known problem.

> ERROR: Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:46: 
> Place brace on its own line for function definitions.  [whitespace/braces]
> [4]
> 
> Thanks,
> Dan

-- 
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/20160914/ce19f17a/attachment.html>


More information about the webkit-unassigned mailing list