<?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>200383</bug_id>
          
          <creation_ts>2019-08-01 22:38:11 -0700</creation_ts>
          <short_desc>&lt;foreignObject&gt; doesn&apos;t establish a containing block</short_desc>
          <delta_ts>2019-08-02 15:31: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>SVG</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>23113</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Xidorn Quan">xidorn-webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1557885</commentid>
    <comment_count>0</comment_count>
      <attachid>375397</attachid>
    <who name="Xidorn Quan">xidorn-webkit</who>
    <bug_when>2019-08-01 22:38:11 -0700</bug_when>
    <thetext>Created attachment 375397
testcase

See the attached testcase, the green box should be 200px away from the top and left edge, however it&apos;s attached to the two edges on Safari.

I&apos;m not sure whether there is any spec about the behavior here, but I think it makes sense that &lt;foreignObject&gt; should establish a containing block so that absolutely-positioned element wouldn&apos;t escape out of &lt;foreignObject&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1557886</commentid>
    <comment_count>1</comment_count>
    <who name="Xidorn Quan">xidorn-webkit</who>
    <bug_when>2019-08-01 22:38:34 -0700</bug_when>
    <thetext>And it works as expected on Firefox and Chrome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1558086</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-08-02 13:29:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/53876964&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1558170</commentid>
    <comment_count>3</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2019-08-02 15:31:14 -0700</bug_when>
    <thetext>This bug happens because RenderSVGForeignObject is not a rendering root. RenderSVGForeignObject::requiresLayer() currently returns false.

*** This bug has been marked as a duplicate of bug 23113 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>375397</attachid>
            <date>2019-08-01 22:38:11 -0700</date>
            <delta_ts>2019-08-01 22:38:11 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>foreignobject-absolute.html</filename>
            <type>text/html</type>
            <size>284</size>
            <attacher name="Xidorn Quan">xidorn-webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjxzdmcgdmlld0JveD0iMCAwIDMwMCAzMDAiIHdpZHRoPSIzMDAiIGhl
aWdodD0iMzAwIiBzdHlsZT0ibWFyZ2luOiAxMDBweCI+CiAgPGZvcmVpZ25PYmplY3QgeD0iMTAw
IiB5PSIxMDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj4KICAgIDxkaXYgc3R5bGU9InBvc2l0
aW9uOiBhYnNvbHV0ZTsgbGVmdDogMDsgdG9wOiAwOyB3aWR0aDogMTAwcHg7IGhlaWdodDogMTAw
cHg7IGJhY2tncm91bmQ6IGdyZWVuIj48L2Rpdj4KICA8L2ZvcmVpZ25PYmplY3Q+Cjwvc3ZnPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>