[Webkit-unassigned] [Bug 198107] New: WKWebView takeSnapshotWithConfiguration does not take a snapshot of html5 video (youtube.com) and WebGL (i.e. hardware accelerated)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 22 04:46:11 PDT 2019


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

            Bug ID: 198107
           Summary: WKWebView takeSnapshotWithConfiguration does not take
                    a snapshot of html5 video (youtube.com) and WebGL
                    (i.e. hardware accelerated)
           Product: WebKit
           Version: WebKit Local Build
          Hardware: iPhone / iPad
                OS: iOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: vladymyrvi at gmail.com

When the snapshot of WKWebView (not fullscreen mode) is taken with takeSnapshotWithConfiguration on iOS 12.2 (iPhone XR) (and any other supported version) instead of html5 video content (hardware accelerated - any youtube.com video) and any WebGL content - there is a black portion of the screen, other content around is shown normally. I suspect the issues is related to the fact some html5 videos and WebGL content is hardware accelerated and rendered differently.

Exact WebKit version: AppleWebKit/605.1.15

Steps to reproduce:
Take a snapshot of WKWebView (not fullscreen mode) on iOS 12.2 (iPhone XR) with takeSnapshotWithConfiguration of any playing youtube.com video (e.g. https://www.youtube.com/watch?v=CF2BfWYRZoc ) or a page with WebGL content (e.g. https://threejs.org/examples/#webgl_marchingcubes )

Result:
Black part of the screen in the snapshot (image) instead of a content, other web-page content around is visible 

Expected result:
As a user I can take a snapshot of hardware accelerated html5 videos and WebGL content, so they are present on the final snapshot image

Code sample:
  WKSnapshotConfiguration *configuration = [WKSnapshotConfiguration new];
  configuration.rect = CGRectMake(0, 0, boundsWidth, contentHeight);
  configuration.snapshotWidth = @(boundsWidth);
  //webView is WKWebView*
  [webView takeSnapshotWithConfiguration: configuration completionHandler:
      ^(UIImage * _Nullable snapshotImage, NSError * _Nullable error)
      {
        //Here is the code to deal with the image 
      }];

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190522/c7acf128/attachment-0001.html>


More information about the webkit-unassigned mailing list