<?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>196303</bug_id>
          
          <creation_ts>2019-03-27 10:05:53 -0700</creation_ts>
          <short_desc>Non-separable blend modes in mix-blend-mode don&apos;t work on elements in compositing layers</short_desc>
          <delta_ts>2024-09-30 14:23:48 -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>Compositing</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Perry">mattgperry</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>dino</cc>
    
    <cc>eelco</cc>
    
    <cc>graouts</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1521721</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Perry">mattgperry</who>
    <bug_when>2019-03-27 10:05:53 -0700</bug_when>
    <thetext>If an element has both `mix-blend-mode` rule and has either:
1. Been promoted to a GPU layer,
2. intersects an element that has been promoted to a GPU layer
3. intersects an element that itself intersects an element that has been promoted to a GPU layer (possibly so on)

The mix-blend-mode fails to take effect.

Examples
=================================

In the following examples the red box has been forced into GPU acceleration with `translateZ(0)` - `will-change: transform; transform: anything` also has the same effect.

The blue and black boxes are not on a GPU layer.

The black box has `mix-blend-mode: color` applied.

Note: If any example fails to reproduce as per &quot;Result&quot;, try opening the link in a separate, new tab (seriously). Sometimes these work as expected, even after refresh, and then don&apos;t when in a new tab.

Example 1
---------

Blended element overlaps *only* non-accelerated element

Visit https://0pl5r1jx3l.codesandbox.io/ 
Expected: Blend mode takes effect
Result: Blend mode indeed takes effect
With source https://codesandbox.io/s/0pl5r1jx3l

Example 2
---------

Blended element overlaps both accelerated and non-accelerated elements

Visit https://2xm9ormpkn.codesandbox.io/
Expected: Blend mode takes effect
Result: Blend mode doesn&apos;t take effect
With source https://codesandbox.io/s/2xm9ormpkn

Example 3
---------

Blended element overlaps *only* non-accelerated element, but non-accelerated element overlaps accelerated element

Visit https://0p56069jp.codesandbox.io/
Expected: Blend mode takes effect
Result: Blend mode doesn&apos;t take effect
With source https://codesandbox.io/s/0p56069jp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1522125</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-03-28 11:16:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/49387130&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1522358</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-03-28 21:18:06 -0700</bug_when>
    <thetext>Holy React tests batman. Needs to transpile modules before it can show three divs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1522359</commentid>
    <comment_count>3</comment_count>
      <attachid>366243</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-03-28 21:18:18 -0700</bug_when>
    <thetext>Created attachment 366243
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1522360</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-03-28 21:20:40 -0700</bug_when>
    <thetext>I think we just don&apos;t support the non-separable blend modes on GPU layers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1522363</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-03-28 21:31:30 -0700</bug_when>
    <thetext>        // FIXME: CA does&apos;t support non-separable blend modes on compositing filters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062536</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-09-23 16:19:22 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/34129</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062812</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-24 12:55:11 -0700</bug_when>
    <thetext>Committed 284170@main (4d83f317a465): &lt;https://commits.webkit.org/284170@main&gt;

Reviewed commits have been landed. Closing PR #34129 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064339</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-30 14:23:48 -0700</bug_when>
    <thetext>Committed 283286.157@safari-7620-branch (384f9e3d5bd2): &lt;https://commits.webkit.org/283286.157@safari-7620-branch&gt;

Reviewed commits have been landed. Closing PR #1913 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>366243</attachid>
            <date>2019-03-28 21:18:18 -0700</date>
            <delta_ts>2019-03-28 21:18:18 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>mix-blend-mode-compositing.html</filename>
            <type>text/html</type>
            <size>515</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PGh0bWwgbGFuZz0iZW4iPgo8aGVhZD4KCTxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4KICAgIDxzdHls
ZT4KICAgICAgICAuYm94IHsKICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAg
ICAgICB3aWR0aDogMjAwcHg7CiAgICAgICAgICAgIGhlaWdodDogMjAwcHg7CiAgICAgICAgfQog
ICAgPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KPGRpdiBpZD0icm9vdCI+CiAgICA8ZGl2IGNsYXNz
PSJib3giIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiByZWQ7IHRyYW5zZm9ybTogdHJhbnNsYXRl
WigwcHgpOyI+PC9kaXY+CiAgICA8ZGl2IGNsYXNzPSJib3giIHN0eWxlPSJ0b3A6IDEwMHB4OyBs
ZWZ0OiAxMDBweDsgYmFja2dyb3VuZC1jb2xvcjogYmx1ZTsiPjwvZGl2PgogICAgPGRpdiBjbGFz
cz0iYm94IiBzdHlsZT0idG9wOiA1MHB4OyBsZWZ0OiA1MHB4OyBiYWNrZ3JvdW5kLWNvbG9yOiBi
bGFjazsgbWl4LWJsZW5kLW1vZGU6IGNvbG9yOyI+PC9kaXY+CjwvZGl2Pgo8L2JvZHk+CjwvaHRt
bD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>