<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>198107</bug_id>
          
          <creation_ts>2019-05-22 04:46:11 -0700</creation_ts>
          <short_desc>WKWebView takeSnapshotWithConfiguration does not take a snapshot of html5 video (youtube.com) and WebGL (i.e. hardware accelerated)</short_desc>
          <delta_ts>2025-06-08 02:38:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit API</component>
          <version>WebKit Local Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vladymyr">vladymyrvi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bdakin</cc>
    
    <cc>dino</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>john</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>vladymyrvi</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1538154</commentid>
    <comment_count>0</comment_count>
    <who name="Vladymyr">vladymyrvi</who>
    <bug_when>2019-05-22 04:46:11 -0700</bug_when>
    <thetext>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 
      }];</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1538454</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-05-22 16:25:01 -0700</bug_when>
    <thetext>&lt;rdar://problem/51047322&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122386</commentid>
    <comment_count>2</comment_count>
    <who name="">john</who>
    <bug_when>2025-06-08 02:38:19 -0700</bug_when>
    <thetext>I’m guessing all current and future SwiftUI Browser based versions of WebKit are negatively impacted by this as of 06-08-2025 across all platforms across the board</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>