<?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>228333</bug_id>
          
          <creation_ts>2021-07-27 10:38:49 -0700</creation_ts>
          <short_desc>[iOS] CSS transform transitions become janky after snapshotting other UIViews</short_desc>
          <delta_ts>2023-02-24 03:44:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Animations</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Ali Juma">ajuma</reporter>
          <assigned_to name="Antoine Quint">graouts</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>dino</cc>
    
    <cc>gambard</cc>
    
    <cc>graouts</cc>
    
    <cc>graouts</cc>
    
    <cc>jeroen.kroese</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1779781</commentid>
    <comment_count>0</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2021-07-27 10:38:49 -0700</bug_when>
    <thetext>Snapshotting UIViews with a forced screen update (i.e., calling -[UIView snapshotAfterScreenUpdates:YES]) sufficiently many times somehow breaks all CSS transform transitions in all WKWebViews embedded in the same app, until the app is-relaunched. In the broken state, transitions are either very janky (low frame rate) or just jump directly to their end state with no intermediate frames.

In an app with a complex view hierarchy (e.g., Chrome for iOS), even a couple calls to -[UIView snapshotAfterScreenUpdates:YES] are enough to get into this broken state. In a simple test app, a few hundred calls are needed to make the jankiness obvious. The UIView being snapshotted is independent of WKWebView (neither contained in WKWebView nor an ancestor). The same bug happens when using -[UIView resizableSnapshotViewFromRect:rect afterScreenUpdates:YES withCapInsets:UIEdgeInsetsZero]. In both cases, changing the &apos;afterScreenUpdates&apos; argument to NO prevents the bug from happening.

This doesn&apos;t seem to affect CSS keyframe animations, just CSS transitions.

I&apos;ve attached a test app to FB9409883.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1779782</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-07-27 10:41:57 -0700</bug_when>
    <thetext>&lt;rdar://81165761&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780420</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-07-29 10:18:48 -0700</bug_when>
    <thetext>This appears to be a bug in UIKit. Tracked by the above radar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1920217</commentid>
    <comment_count>3</comment_count>
    <who name="Jeroen Kroese">jeroen.kroese</who>
    <bug_when>2022-12-17 03:19:39 -0800</bug_when>
    <thetext>Hi there, as of today the issue still persists. See the following bug reports on the Chromium project for examples of manifestations of this issue:

https://bugs.chromium.org/p/chromium/issues/detail?id=1231712
https://bugs.chromium.org/p/chromium/issues/detail?id=899130
https://bugs.chromium.org/p/chromium/issues/detail?id=1249723

Any updates on the UIKit bug logged in Radar?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1920814</commentid>
    <comment_count>4</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-12-20 09:45:17 -0800</bug_when>
    <thetext>Note: This is actually tracked by this:
&lt;rdar://81165591&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923967</commentid>
    <comment_count>5</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-08 13:13:47 -0800</bug_when>
    <thetext>This might be as easy as setting `-[CALayer inheritsTiming]` to `NO` for the CALayer managed by PlatformCALayerCocoa.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923969</commentid>
    <comment_count>6</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-08 13:14:12 -0800</bug_when>
    <thetext>Steps to reproduce:

1. Install Google Chrome
2. Open a second tab
3. Go to getbrentobox.com
4. Tap on the hamburger menu icon in the top right
5. Tap on the icon again to dismiss the sliding menu in the Web page
6. Go to the first tab
7. Go back to the second tab
8. Tap on the hamburger menu icon in the top right again

At this stage there is no animation, this is the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924045</commentid>
    <comment_count>7</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-09 04:35:46 -0800</bug_when>
    <thetext>(In reply to Antoine Quint from comment #5)
&gt; This might be as easy as setting `-[CALayer inheritsTiming]` to `NO` for the
&gt; CALayer managed by PlatformCALayerCocoa.

That indeed seems to work, need to find the best place to include this call for all remote layers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924055</commentid>
    <comment_count>8</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-09 05:01:36 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/8394</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924757</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-01-11 03:34:46 -0800</bug_when>
    <thetext>Committed 258781@main (46c1b789ed08): &lt;https://commits.webkit.org/258781@main&gt;

Reviewed commits have been landed. Closing PR #8394 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1936477</commentid>
    <comment_count>10</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-02-24 03:44:11 -0800</bug_when>
    <thetext>This should be fixed in iOS 16.4 Seed 1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>