<?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>218330</bug_id>
          
          <creation_ts>2020-10-29 04:36:51 -0700</creation_ts>
          <short_desc>Caption of table causes offset on sticky positioned table elements</short_desc>
          <delta_ts>2021-09-01 05:21:46 -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>Layout and Rendering</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Derk-Jan Hartman">hartman.wiki</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>mrobinson</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>smoley</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1702674</commentid>
    <comment_count>0</comment_count>
      <attachid>412633</attachid>
    <who name="Derk-Jan Hartman">hartman.wiki</who>
    <bug_when>2020-10-29 04:36:51 -0700</bug_when>
    <thetext>Created attachment 412633
testcase with and without caption

When you use position:sticky; top:0; on a table element, you expect this element to stick to the top of the overflowing frame. This usually works, unless you also have a &lt;caption&gt; element on your table. The caption elements have rather unique box model behavior, which introduces an offset that the sticky headers accidentally use as well.

I&apos;m not entirely sure if this is per the current specification or not. I do know that it doesn&apos;t match my expectations, and it doesn&apos;t match the behavior of Chrome and Firefox.

I have included a reproduction of this problem showing behavior with and without caption element in a table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702764</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-10-29 09:52:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/70813326&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1703754</commentid>
    <comment_count>2</comment_count>
    <who name="Smoley">smoley</who>
    <bug_when>2020-11-02 16:20:31 -0800</bug_when>
    <thetext>Thanks for filing, this reproduces for me on Safari 13.1.3 as well as STP 115 with the included test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1787132</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2021-08-25 03:55:25 -0700</bug_when>
    <thetext>This should be fixed now.

*** This bug has been marked as a duplicate of bug 224415 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1789299</commentid>
    <comment_count>4</comment_count>
    <who name="Derk-Jan Hartman">hartman.wiki</who>
    <bug_when>2021-09-01 05:20:45 -0700</bug_when>
    <thetext>@Martin Robinson

Are we sure ? I see several other sticky bugs are indeed fixed in my TP, but this specific one still seems to reproduce. At least with: Release 130 (Safari 15.0, WebKit 16612.1.26.1.5)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1789300</commentid>
    <comment_count>5</comment_count>
    <who name="Derk-Jan Hartman">hartman.wiki</who>
    <bug_when>2021-09-01 05:21:46 -0700</bug_when>
    <thetext>ah the latest TP is from august 18th I see.....</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>412633</attachid>
            <date>2020-10-29 04:36:51 -0700</date>
            <delta_ts>2020-10-29 04:36:51 -0700</delta_ts>
            <desc>testcase with and without caption</desc>
            <filename>caption-and-sticky-table-elements.html</filename>
            <type>text/html</type>
            <size>1430</size>
            <attacher name="Derk-Jan Hartman">hartman.wiki</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c3R5bGU+CiAgdGFibGUgdGgsIHRhYmxlIHRkIHsKICBib3JkZXI6IDFw
eCBzb2xpZCBibGFjazsKfQoKdGggewogIGJhY2tncm91bmQ6IHJlZDsKICBwb3NpdGlvbjogc3Rp
Y2t5OwogIHRvcDogMDsKfQoKZGl2IHsKICBtYXgtaGVpZ2h0OiAxMDBweDsKICBvdmVyZmxvdzog
c2Nyb2xsOwogIGZsb2F0OiBsZWZ0OwogIH08L3N0eWxlPgoKPC9oZWFkPgo8Ym9keT4KPGRpdj4K
PHRhYmxlPgogIDx0cj48dGg+SGVhZGVyPC90aD48L3RyPgogIDx0cj48dGQ+Q2VsbDwvdGQ+PC90
cj4KICA8dHI+PHRkPkNlbGw8L3RkPjwvdHI+CiAgPHRyPjx0ZD5DZWxsPC90ZD48L3RyPgogIDx0
cj48dGQ+Q2VsbDwvdGQ+PC90cj4KICA8dHI+PHRkPkNlbGw8L3RkPjwvdHI+CiAgPHRyPjx0ZD5D
ZWxsPC90ZD48L3RyPgogIDx0cj48dGQ+Q2VsbDwvdGQ+PC90cj4KICA8dHI+PHRkPkNlbGw8L3Rk
PjwvdHI+CiAgPHRyPjx0ZD5DZWxsPC90ZD48L3RyPgogIDx0cj48dGQ+Q2VsbDwvdGQ+PC90cj4K
ICA8dHI+PHRkPkNlbGw8L3RkPjwvdHI+CiAgPHRyPjx0ZD5DZWxsPC90ZD48L3RyPgogIDx0cj48
dGQ+Q2VsbDwvdGQ+PC90cj4KICA8dHI+PHRkPkNlbGw8L3RkPjwvdHI+CiAgPHRyPjx0ZD5DZWxs
PC90ZD48L3RyPgogIDx0cj48dGQ+Q2VsbDwvdGQ+PC90cj4KICA8dHI+PHRkPkNlbGw8L3RkPjwv
dHI+CiAgPHRy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