<?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>174903</bug_id>
          
          <creation_ts>2017-07-27 12:06:46 -0700</creation_ts>
          <short_desc>CSS filter on svg &gt; g (transform) &gt; foreignObject &gt; div negates the transform on the &lt;g&gt; element</short_desc>
          <delta_ts>2024-03-05 21:14:50 -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>SVG</component>
          <version>Safari 10</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=270317</see_also>
          <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="Dan">dan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1332689</commentid>
    <comment_count>0</comment_count>
      <attachid>316562</attachid>
    <who name="Dan">dan</who>
    <bug_when>2017-07-27 12:06:46 -0700</bug_when>
    <thetext>Created attachment 316562
HTML test case

Steps to reproduce the problem:

1. Set up the HTML

&lt;html&gt;
&lt;body&gt;
&lt;svg width=&apos;500&apos; height=&apos;500&apos;&gt;
    &lt;g transform=&apos;matrix(1 0 0 1 100 100)&apos;&gt;
    &lt;foreignObject x=&apos;50&apos; y=&apos;50&apos; width=&apos;200&apos; height=&apos;200&apos;&gt;
      &lt;div&gt;Some content&lt;/div&gt;
    &lt;/foreignObject&gt;
    &lt;/g&gt;
  &lt;/svg&gt;
&lt;/body&gt;
&lt;/html&gt;

2. Apply a CSS filter to the &lt;div&gt;, such as with:

&lt;div style=&quot;filter: blur(10px)&quot;&gt;

---

The &lt;div&gt; should stay in place, and exhibit the blur effect as defined in its style.

Instead, the &lt;div&gt; gets shifted upwards and leftwards in a way that suggests the transform matrix applied on the &lt;g&gt; element is no longer taken into consideration.

Chrome / macOS exhibits a similar problem, but compounded with some weird cropping. Bug report here: https://bugs.chromium.org/p/chromium/issues/detail?id=749756
Firefox / macOS behaves as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332705</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-07-27 13:42:24 -0700</bug_when>
    <thetext>&lt;rdar://problem/33575367&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332716</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-27 13:50:35 -0700</bug_when>
    <thetext>We&apos;re just bad at things that trigger RenderLayer creation inside &lt;foreignobject&gt; in general.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>316562</attachid>
            <date>2017-07-27 12:06:46 -0700</date>
            <delta_ts>2017-07-27 12:06:46 -0700</delta_ts>
            <desc>HTML test case</desc>
            <filename>jsbin.xemobevafa.1.html</filename>
            <type>text/html</type>
            <size>1045</size>
            <attacher name="Dan">dan</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjwhLS0KQ3JlYXRlZCB1c2luZyBKUyBCaW4KaHR0cDovL2pzYmluLmNv
bQoKQ29weXJpZ2h0IChjKSAyMDE3IGJ5IGFub255bW91cyA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