<?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>209376</bug_id>
          
          <creation_ts>2020-03-20 23:22:11 -0700</creation_ts>
          <short_desc>Text content not getting updated in sticky element.</short_desc>
          <delta_ts>2021-08-25 04:00:14 -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>CSS</component>
          <version>Safari 13</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>224415</dup_id>
          
          <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>jianbo.wu</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>mrobinson</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1632444</commentid>
    <comment_count>0</comment_count>
    <who name="">jianbo.wu</who>
    <bug_when>2020-03-20 23:22:11 -0700</bug_when>
    <thetext>When updating HTML content and sticky status at the same time in a macrotask/microtask (e.g. setTimeout or Promise.then), the value shown on the screen seems to be stale value. (still 0)

Code sandbox: https://codesandbox.io/s/focused-solomon-z3i79

To replicate the issue, open this link in Safari: https://z3i79.csb.app/ (a popped out version of the sandbox above)

Observation:

- In other browsers, the text content of that sticky footer should be 1.
- In safari, it&apos;s 0, until user scroll to bottom.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632561</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-03-21 18:50:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/60733061&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632872</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-23 09:44:42 -0700</bug_when>
    <thetext>We&apos;re failing to repaint the sticky layer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632874</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-23 09:47:41 -0700</bug_when>
    <thetext>Oddly this doesn&apos;t happen if https://codesandbox.io/public/sse-hooks/sse-hooks.js is not included, yet this JS isn&apos;t necessary for the test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632895</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-23 10:08:31 -0700</bug_when>
    <thetext>Actually I can reproduce without the included JS file. It&apos;s a bit timing dependent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632914</commentid>
    <comment_count>5</comment_count>
      <attachid>394275</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-23 10:23:14 -0700</bug_when>
    <thetext>Created attachment 394275
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632915</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-23 10:23:34 -0700</bug_when>
    <thetext>The repaint we issue in the sticky layer is offset incorrectly. This testcase shows that sometimes the text half-paints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632916</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-23 10:26:16 -0700</bug_when>
    <thetext>And the repaint rect is getting offset by layoutDelta().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1787136</commentid>
    <comment_count>8</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2021-08-25 04:00:14 -0700</bug_when>
    <thetext>I have confirmed that r281185 fixed this in the repository. This fix should be available for Safari in the future.

*** This bug has been marked as a duplicate of bug 224415 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>394275</attachid>
            <date>2020-03-23 10:23:14 -0700</date>
            <delta_ts>2020-03-23 10:23:14 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>sticky-layer-repaint.html</filename>
            <type>text/html</type>
            <size>864</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQi
IGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xLjAiIC8+CiAgICA8
c3R5bGU+CiAgICAgICAgI2Zvb3RlciB7CiAgICAgICAgICAgIHBvc2l0aW9uOiBzdGlja3k7CiAg
ICAgICAgICAgIGJhY2tncm91bmQ6IGJsdWU7CiAgICAgICAgICAgIGJvdHRvbTogMTIwcHg7CiAg
ICAgICAgICAgIGhlaWdodDogNDAwcHg7CiAgICAgICAgICAgIGZvbnQtc2l6ZTogMzAwcHg7CiAg
ICAgICAgfQogICAgICAgIC50YWxsIHsKICAgICAgICAgICAgaGVpZ2h0OiAyMDBweDsKICAgICAg
ICAgICAgYmFja2dyb3VuZC1jb2xvcjogc2lsdmVyOwogICAgICAgIH0KICAgIDwvc3R5bGU+CiAg
PC9oZWFkPgogIDxib2R5PgogICAgPGRpdiBpZD0iZm9vdGVyIj4KICAgICAgMAogICAgPC9kaXY+
CiAgICA8c2NyaXB0PgogICAgICAgIGNvbnN0IHRhbGxFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRl
RWxlbWVudCgiZGl2Iik7CiAgICAgICAgdGFsbEVsZW1lbnQuY2xhc3NOYW1lID0gJ3RhbGwnOwog
ICAgICAgIGNvbnN0IGZvb3RlckVsZW1lbnQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiZm9v
dGVyIik7CiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgIGRvY3VtZW50LmJv
ZHkucHJlcGVuZCh0YWxsRWxlbWVudCk7CiAgICAgICAgICAgIGZvb3RlckVsZW1lbnQuaW5uZXJI
VE1MID0gIjEiOwogICAgICAgICAgICAvLyBmb290ZXJFbGVtZW50LnN0eWxlLmJhY2tncm91bmRD
b2xvciA9ICdncmVlbic7CiAgICAgICAgfSwgMTAwMCk7CiAgICA8L3NjcmlwdD4KICA8L2JvZHk+
CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>