<?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>201019</bug_id>
          
          <creation_ts>2019-08-21 18:43:08 -0700</creation_ts>
          <short_desc>Migrate from m_styleRecalcTimer to scheduled rendering updates</short_desc>
          <delta_ts>2026-01-12 09:08:41 -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>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=201018</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=208780</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=222655</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>202843</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>ggaren</cc>
    
    <cc>graouts</cc>
    
    <cc>koivisto</cc>
    
    <cc>rniwa</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1563884</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-08-21 18:43:08 -0700</bug_when>
    <thetext>We should be able to remove the m_styleRecalcTimer and just schedule rendering updates now (via RenderingUpdateScheduler).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716297</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-12-22 11:55:22 -0800</bug_when>
    <thetext>There&apos;s a problem with this. We rely on style updates from this timer to reach the &quot;visually non-empty&quot; state, which is necessary to unfreeze the layer tree.

When the layer tree is frozen, TiledCoreAnimationDrawingArea::triggerRenderingUpdate() bails early so we get stuck.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716300</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-12-22 11:57:26 -0800</bug_when>
    <thetext>I think we’d have to move layer tree freezing into webcore, and have Page::updateRendering() do the first layout, but bail early when the tree is frozen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716311</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-12-22 12:20:54 -0800</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #2)
&gt; I think we’d have to move layer tree freezing into webcore, and have
&gt; Page::updateRendering() do the first layout, but bail early when the tree is
&gt; frozen

I think this is backwards. Instead of moving layer tree freezing into WebCore and letting TiledCoreAnimationDrawingArea::triggerRenderingUpdate invoke updateRendering just to make a progress in the &quot;visually non-empty&quot; state, TiledCoreAnimationDrawingArea::updateRendering should just know this is happening and trigger the initial layout anyway. So add something like Page::updateRenderingForFirstTimeIfNeeded and always call that when the layer tree is frozen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716342</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-12-22 13:13:38 -0800</bug_when>
    <thetext>But why not make layer tree freezing (bad name) a webcore feature, rather than a webkit feature? All ports could benefit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716363</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-12-22 13:47:13 -0800</bug_when>
    <thetext>fast/events/onunload-not-on-body.html is the test that broke</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1716437</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-12-23 00:23:34 -0800</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #4)
&gt; But why not make layer tree freezing (bad name) a webcore feature, rather
&gt; than a webkit feature? All ports could benefit.

You mean the logic to avoid painting when there is a page load happening? Don&apos;t we also use it for other purposes too? It&apos;s unclear to me what we call as layer tree freezing is what we want across all the ports. I suspect there is a subset of things it does like skipping rendering updating steps and/or painting that might be beneficial across ports. If you&apos;re talking about extracting it and moving it to WebCore, that does seem reasonable but it would be a lot bigger engineering task then.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>