<?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>290923</bug_id>
          
          <creation_ts>2025-04-02 08:17:06 -0700</creation_ts>
          <short_desc>View Transition break on inline parents with block children</short_desc>
          <delta_ts>2025-05-29 05:07:22 -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>New Bugs</component>
          <version>Safari Technology Preview</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sebastian Markbåge">sebastian</reporter>
          <assigned_to name="Matt Woodrow">mattwoodrow</assigned_to>
          <cc>bramus</cc>
    
    <cc>graouts</cc>
    
    <cc>mattwoodrow</cc>
    
    <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2108195</commentid>
    <comment_count>0</comment_count>
    <who name="Sebastian Markbåge">sebastian</who>
    <bug_when>2025-04-02 08:17:06 -0700</bug_when>
    <thetext>If you try to start a View Transition when a parent with `display: inline` and `view-transition-name` has a `display: block` child then it leads to a duplicate name error.

https://repro-view-transition-inline-bug.vercel.app/

This errors with: InvalidStateError: Multiple elements found with view-transition-name: hi

The most common way this would happen is with:

&lt;a href=&quot;...&quot;&gt;&lt;div&gt;...&lt;/div&gt;&lt;/a&gt;

It should be treated as if it was `display: inline-block`. When that is explicitly specified, it works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108197</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-04-02 08:22:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/148432507&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108232</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2025-04-02 10:41:44 -0700</bug_when>
    <thetext>I think this started happening when we started iterating over renderers instead of elements in ViewTransition.cpp to get pseudo-element support.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116390</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-05-11 18:34:31 -0700</bug_when>
    <thetext>Putting a block level element inside of an inline causes the inline to be fragmented (see https://www.w3.org/TR/CSS2/visuren.html#img-anon-block, and this resolution in particular - https://github.com/w3c/csswg-drafts/issues/1477#issuecomment-380771705).

View transitions names should be skipped if the named element is fragmented (https://drafts.csswg.org/css-view-transitions/#view-transition-name-prop - If the element’s principal box is fragmented, skipped, or not rendered, this property has no effect.)

I think we should be silently ignoring `view-transition-name: hi`, and just running a transition on the root element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116400</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-05-11 20:28:54 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/45228</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119768</commentid>
    <comment_count>5</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-05-26 17:05:01 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/45929</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>