<?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>280307</bug_id>
          
          <creation_ts>2024-09-24 17:27:46 -0700</creation_ts>
          <short_desc>Regression in Safari 18: all: revert-layer breaks due to style changes on parent elements</short_desc>
          <delta_ts>2024-12-03 08:51:38 -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>Layout and Rendering</component>
          <version>Safari 18</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=283942</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="Devon Govett">govett</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>koivisto</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>2062890</commentid>
    <comment_count>0</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2024-09-24 17:27:46 -0700</bug_when>
    <thetext>This is a very strange bug that started occurring in Safari 18 on both macOS and iOS. It appears to be related to cascade layers. See the reproduction here: https://codepen.io/devongovett/pen/gOJOVGo

Hovering over the outer element causes the color of the text to change, and unexpectedly, the width of the inner element collapses to zero. This appears to be due to the `all: revert-layer` rule applied to the inner element, which should simply revert to the previous cascade layer. The width should not be affected by the color change on the parent element.

This resulted in regressions to Adobe&apos;s component library, which relies on cascade layers. revert-layer is used to ensure external styles outside a layer do not apply. This worked correctly in previous versions of Safari, and works fine in Chrome and Firefox as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063190</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-09-25 16:45:19 -0700</bug_when>
    <thetext>@Devon - it seems that Safari Technology Preview 203 already matches with Chrome Canary 131 and Firefox Nightly 132 and does not collapse like Safari 18.1 Beta do. Can you test this as well on your end?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063277</commentid>
    <comment_count>2</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2024-09-25 21:13:12 -0700</bug_when>
    <thetext>Thanks! Yes, I can verify that it is broken in both 18.0 (20619.1.26.31.6) and 18.1 in macOS 15.1 Developer Beta 5 (20619.2.3.1), but works in Safari Tech Preview 203 (20620.1.6).

Any idea how much farther ahead tech preview is than 18.1? Any chance whatever fixed this could make it into the shipping version?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064277</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2024-09-30 10:15:48 -0700</bug_when>
    <thetext>STP is not necessarily ahead of these Safari builds. This is an important data point, but it does not prove in itself that the issue is already fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064278</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-30 10:16:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/136976934&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066629</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-10-09 13:45:27 -0700</bug_when>
    <thetext>Could you convert https://codepen.io/devongovett/pen/gOJOVGo into a self-describing test? We can&apos;t tell if this is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066631</commentid>
    <comment_count>6</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2024-10-09 13:52:50 -0700</bug_when>
    <thetext>Sure, I updated it to have more description. Let me know if you&apos;re still not sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066644</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2024-10-09 14:22:37 -0700</bug_when>
    <thetext>The test passes in Safari Tech Preview 203, so I think this is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2078630</commentid>
    <comment_count>8</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2024-12-02 14:16:59 -0800</bug_when>
    <thetext>Looks like this reproduction is fixed in Safari 18.2 beta, but there is still another broken case. I reported that as a separate issue here: https://bugs.webkit.org/show_bug.cgi?id=283942</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>