<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - No reliable way to get a snapshot of WKWebView (macOS)"
href="https://bugs.webkit.org/show_bug.cgi?id=161450#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - No reliable way to get a snapshot of WKWebView (macOS)"
href="https://bugs.webkit.org/show_bug.cgi?id=161450">bug 161450</a>
from <span class="vcard"><a class="email" href="mailto:thorton@apple.com" title="Tim Horton <thorton@apple.com>"> <span class="fn">Tim Horton</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=161450#c8">comment #8</a>)
<span class="quote">> 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?</span >
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.
<span class="quote">> 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.</span >
It does. Is the view in-window at the time? That really should work.
<span class="quote">> 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.</span >
Yep, this is a known problem.
<span class="quote">> ERROR: Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:46:
> Place brace on its own line for function definitions. [whitespace/braces]
> [4]
>
> Thanks,
> Dan</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>