<?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>218895</bug_id>
          
          <creation_ts>2020-11-13 02:31:15 -0800</creation_ts>
          <short_desc>Opacity doesn&apos;t work on picture element if child img is display block</short_desc>
          <delta_ts>2026-01-25 15:57:11 -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>Images</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=287407</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="James Long">jameslong</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>karlcow</cc>
    
    <cc>koivisto</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>smoley</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1707173</commentid>
    <comment_count>0</comment_count>
    <who name="James Long">jameslong</who>
    <bug_when>2020-11-13 02:31:15 -0800</bug_when>
    <thetext>If a picture element is given an opacity, the opacity is applied. However, if the picture element has a child img element that has display:block, the opacity isn&apos;t honoured unless the picture element has display:block as well.

Expected behaviour: the opacity should be applied even with a display:block child.

This affects Opera, Chrome and the latest version of Edge. It doesn&apos;t affect pre-webkit Edge and it doesn&apos;t affect Firefox.

You can see this bug in this fiddle: https://jsfiddle.net/Skateside/k6zbeq1j/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707526</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2020-11-14 11:52:22 -0800</bug_when>
    <thetext>The report doesn&apos;t explicitly mention WebKit, but I can reproduce in Safari indeed.

Changing a behavior where we match Chrome can have negative compatibility effect of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1708657</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-11-18 10:24:50 -0800</bug_when>
    <thetext>&lt;rdar://problem/71545258&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174684</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-23 20:06:08 -0800</bug_when>
    <thetext>https://jsfiddle.net/maoue9t6/ &lt;- Above seems to have broken Image URL, so I updated it from same domain (random image) and Safari Technology Preview 235 + Chrome Canary 146 works same. Might be already fixed?

@Karl - can you double check?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174873</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-25 02:11:36 -0800</bug_when>
    <thetext>It seems Safari 26.1 does not get opacity on `&lt;picture&gt; with opacity of 0.5 and display:block on the &lt;img&gt;.` but Safari Technology Preview 235 does. So something recently progressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174959</commentid>
    <comment_count>5</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2026-01-25 15:57:11 -0800</bug_when>
    <thetext>This has progressed with [block-in-inline].</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>