<?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>278813</bug_id>
          
          <creation_ts>2024-08-28 13:52:51 -0700</creation_ts>
          <short_desc>Blend modes in Safari are lost when zooming in</short_desc>
          <delta_ts>2024-09-23 17:30:52 -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 17</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>250828</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yitzchok Sabel">yitzchok</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>graouts</cc>
    
    <cc>graouts</cc>
    
    <cc>mordechai112</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2056056</commentid>
    <comment_count>0</comment_count>
    <who name="Yitzchok Sabel">yitzchok</who>
    <bug_when>2024-08-28 13:52:51 -0700</bug_when>
    <thetext>Blend Mode Issue in WebKit

When using supported blend modes (e.g., `multiply`, `screen`, etc.) in Safari, zooming in causes the browser to forget the blend mode effect and display the element with its regular color. Zooming out does not restore the blend mode effect; only reloading the page does.


Steps to Reproduce
1. Create an HTML element with a blend mode applied using CSS.
2. Open the HTML file in Safari.
3. Zoom in using Safari&apos;s zoom feature (pinching on trackpad).

Example Code
```html
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &lt;title&gt;Blend Mode Bug&lt;/title&gt;
    &lt;style&gt;
        .blend-mode {
            width: 200px;
            height: 200px;
            background-color: red;
            mix-blend-mode: overlay;
        }
        .background {
            width: 200px;
            height: 200px;
            background-color: blue;
            position: absolute;
            top: 0;
            left: 0;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class=&quot;background&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;blend-mode&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056208</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-08-29 00:28:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/134918699&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056330</commentid>
    <comment_count>2</comment_count>
      <attachid>472349</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-08-29 11:33:14 -0700</bug_when>
    <thetext>Created attachment 472349
Example with screen blend mode

I can&apos;t reproduce this. Your example, with `overlay`, doesn&apos;t actually look different when the blend mode is removed. I attach an example using `screen`, and zooming does not break it for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056336</commentid>
    <comment_count>3</comment_count>
    <who name="Yitzchok Sabel">yitzchok</who>
    <bug_when>2024-08-29 11:40:15 -0700</bug_when>
    <thetext>Try this

https://vercel.com/d7mtgs-projects/d7mtg/CrEbNcLr1bADgZLPUoviuuA4r7pA

1. Click and hold the &apos;use&apos; button
2. Observe that the overlay works
3. Zoom using a Apple magic trackpad
4. Press the button again</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056337</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-08-29 11:51:10 -0700</bug_when>
    <thetext>Do you have an example that&apos;s not behind a log-in?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057059</commentid>
    <comment_count>5</comment_count>
    <who name="Yitzchok Sabel">yitzchok</who>
    <bug_when>2024-09-02 10:50:06 -0700</bug_when>
    <thetext>I&apos;ve found that the only way this bug happens is if:

1 Use background-image and not solid color
2 the position of overlay has to be position fixed with inset 0

See code below

&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;Blend Mode Bug&lt;/title&gt;
    &lt;style&gt;
      .overlay {
        background-image: radial-gradient(
          circle,
          red 0%,
          red 80%,
          transparent 80%
        );
        mix-blend-mode: screen;
        position: fixed;
        inset: 0;
        pointer-events: none;
      }
      .background {
        width: 200px;
        height: 200px;
        background-color: blue;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div class=&quot;background&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;overlay&quot;&gt;&lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057318</commentid>
    <comment_count>6</comment_count>
      <attachid>472424</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-09-03 11:20:59 -0700</bug_when>
    <thetext>Created attachment 472424
Test case

Thank you, I can reproduce with that test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057319</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-09-03 11:21:28 -0700</bug_when>
    <thetext>This is about the overlay layer becoming tiled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062561</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-09-23 17:30:52 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 250828 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>472349</attachid>
            <date>2024-08-29 11:33:14 -0700</date>
            <delta_ts>2024-09-03 11:20:59 -0700</delta_ts>
            <desc>Example with screen blend mode</desc>
            <filename>blend-mode-with-zoom.html</filename>
            <type>text/html</type>
            <size>678</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0
PSJVVEYtOCI+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNl
LXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICA8dGl0bGU+QmxlbmQgTW9kZSBCdWc8L3Rp
dGxlPgogICAgPHN0eWxlPgogICAgICAgIC5ibGVuZC1tb2RlIHsKICAgICAgICAgICAgbWFyZ2lu
OiA1MHB4OwogICAgICAgICAgICB3aWR0aDogMjAwcHg7CiAgICAgICAgICAgIGhlaWdodDogMjAw
cHg7CiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHJlZDsKICAgICAgICAgICAgbWl4LWJs
ZW5kLW1vZGU6IHNjcmVlbjsKICAgICAgICB9CiAgICAgICAgLmJhY2tncm91bmQgewogICAgICAg
ICAgICB3aWR0aDogMjAwcHg7CiAgICAgICAgICAgIGhlaWdodDogMjAwcHg7CiAgICAgICAgICAg
IGJhY2tncm91bmQtY29sb3I6IGJsdWU7CiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsK
ICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgIH0KICAgIDwv
c3R5bGU+CjwvaGVhZD4KPGJvZHk+CiAgICA8ZGl2IGNsYXNzPSJiYWNrZ3JvdW5kIj48L2Rpdj4K
ICAgIDxkaXYgY2xhc3M9ImJsZW5kLW1vZGUiPjwvZGl2Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>472424</attachid>
            <date>2024-09-03 11:20:59 -0700</date>
            <delta_ts>2024-09-03 11:20:59 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>blend-mode-screen-with-fixed.html</filename>
            <type>text/html</type>
            <size>634</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PGh0bWwgbGFuZz0iZW4iPgogIDxoZWFkPgogICAgPHRpdGxlPkJsZW5kIE1vZGUgQnVnPC90aXRs
ZT4KICAgIDxzdHlsZT4KICAgICAgLm92ZXJsYXkgewogICAgICAgIGJhY2tncm91bmQtaW1hZ2U6
IHJhZGlhbC1ncmFkaWVudCgKICAgICAgICAgIGNpcmNsZSwKICAgICAgICAgIHJlZCAwJSwKICAg
ICAgICAgIHJlZCA4MCUsCiAgICAgICAgICB0cmFuc3BhcmVudCA4MCUKICAgICAgICApOwogICAg
ICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICAgICAgICBmb250LXNpemU6IDQycHQ7CiAgICAgICAg
bWl4LWJsZW5kLW1vZGU6IHNjcmVlbjsKICAgICAgICBwb3NpdGlvbjogZml4ZWQ7CiAgICAgICAg
aW5zZXQ6IDA7CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgIH0KICAgICAgLmJh
Y2tncm91bmQgewogICAgICAgIHdpZHRoOiAyMDBweDsKICAgICAgICBoZWlnaHQ6IDIwMHB4Owog
ICAgICAgIGJhY2tncm91bmQtY29sb3I6IGJsdWU7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9o
ZWFkPgogIDxib2R5PgogICAgPGRpdiBjbGFzcz0iYmFja2dyb3VuZCI+PC9kaXY+CiAgICA8ZGl2
IGNsYXNzPSJvdmVybGF5Ij5ab29tIGluIHRvIHNlZSB0aGUgYnVnPC9kaXY+CiAgPC9ib2R5Pgo8
L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>