<?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>202576</bug_id>
          
          <creation_ts>2019-10-04 02:09:53 -0700</creation_ts>
          <short_desc>Transforming element with parent background-color fails if iframe with z-index -1 present in DOM</short_desc>
          <delta_ts>2020-01-14 14:59:49 -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>Compositing</component>
          <version>Safari 12</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 13</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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>
          <dependson>206262</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dag-Inge Aas">daginge</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>dino</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1576781</commentid>
    <comment_count>0</comment_count>
    <who name="Dag-Inge Aas">daginge</who>
    <bug_when>2019-10-04 02:09:53 -0700</bug_when>
    <thetext>Description:
If an element has a parent with a background-color, and the element is transformed, the element does not behave as expected, and completely disappears in certain cases, should an iframe be present in the DOM which has a z-index of -1. This is not reproducible on older versions of iOS Safari. You can see the element if the background-color has an alpha channel.

Steps to reproduce:
- Navigate to https://cdpn.io/daginge/debug/dybLjGg/wQAPozPYQEDr on an iOS device
- Observe that no text can be seen
- Open https://cdpn.io/daginge/debug/dybLjGg/wQAPozPYQEDr on desktop Safari
- Observe that text is there and mirrored

Code: https://codepen.io/daginge/pen/dybLjGg

Impact:
Intercom messenger, which is present on a lot of pages, has a hidden iframe with z-index -1. When this iframe is added to the DOM, any element which is transformed will disappear if a parent has a background-color. This impacts us because we are dependent on Intercom for support, and run a video conferencing site which needs to transform the so called &quot;self-view&quot; 180deg on the Y-axis to avoid confusion when the user sees themselves.

Workaround:
If a parent element gets opacity 0.999 the issue disappears. We decided to add this on the affected component&apos;s wrapper so minimize other issues that might come from having the body SLIGHTLY less visible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577273</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-10-06 17:45:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/56022948&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577389</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-10-07 10:42:29 -0700</bug_when>
    <thetext>I can&apos;t view the test case (&quot;This debug view expired&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577390</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-10-07 10:44:21 -0700</bug_when>
    <thetext>Ah, https://codepen.io/daginge/pen/dybLjGg works. I can reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1577414</commentid>
    <comment_count>4</comment_count>
    <who name="Dag-Inge Aas">daginge</who>
    <bug_when>2019-10-07 11:55:11 -0700</bug_when>
    <thetext>Yes, sorry about that. I wasn’t aware those expired :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606613</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-01-14 14:49:27 -0800</bug_when>
    <thetext>Better test case: https://codepen.io/smfr/pen/OJPwjJd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606615</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-01-14 14:58:09 -0800</bug_when>
    <thetext>We&apos;re depth-sorting the layer with the rotateY(180deg) with the layer used to paint the &quot;foreground&quot; (the section background), and they are coplanar, and it ends up sorting behind.

The fix is to move it a bit in Z: transform: rotateY(180deg) translateZ(-1px);</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>