<?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>307431</bug_id>
          
          <creation_ts>2026-02-10 06:05:12 -0800</creation_ts>
          <short_desc>Navigating with the Layers inspector tab open breaks the visualization</short_desc>
          <delta_ts>2026-05-01 09:43:17 -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>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Adrian Perez">aperez</reporter>
          <assigned_to name="Razvan Caliman">rcaliman</assigned_to>
          <cc>a_panta</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>rcaliman</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2179834</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-02-10 06:05:12 -0800</bug_when>
    <thetext>Steps to reproduce:

  1. run-minibrowser --wpe https://blogs.igalia.com/webkit/
  2. Open the Inspector with Ctrl+Shift+I
  3. In the inspector window, open the “Layers” tab
  4. Click the “About” link at the top of the page

Expected outcome:

  The “Layers” tab updates itself with the contents of the newly loaded page.

Actual outcome:

  The “Layers” tab remains empty and no longer updates. The following errors
  are written to the standard error stream:

  resource:///org/webkit/inspector/UserInterface/Controllers/ConsoleManager.js:241:27: CONSOLE ASSERT ERROR
  resource:///org/webkit/inspector/UserInterface/Base/Main.js:3131:22: CONSOLE ERROR Error: Layer has zero size

This affects both the “main” branch and the “webkitglib/2.50” one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2179839</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-02-10 06:23:19 -0800</bug_when>
    <thetext>(In reply to Adrian Perez from comment #0)

&gt; This affects both the “main” branch and the “webkitglib/2.50” one.

This should read: the “main” branch and the “webkitglib/2.52” one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2180201</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-02-11 00:25:12 -0800</bug_when>
    <thetext>As a workaround, if the “Layers” tab gets stuck like this, closing the inspector and reopening it again works (but it&apos;s an annoyance).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2180212</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-02-11 01:09:39 -0800</bug_when>
    <thetext>The empty size error comes from InspectorLayerTreeAgent::requestContent(), defined in Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp:

Inspector::CommandResult&lt;String&gt; InspectorLayerTreeAgent::requestContent(const Inspector::Protocol::LayerTree::LayerId&amp; layerId)
{
    // ...

    FloatSize layerSize = graphicsLayer-&gt;size();
    if (layerSize.isEmpty())
        return makeUnexpected(&quot;Layer has zero size&quot;_s);

    // ...
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2183565</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-02-20 15:29:32 -0800</bug_when>
    <thetext>&lt;rdar://problem/170836910&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206252</commentid>
    <comment_count>5</comment_count>
    <who name="Razvan Caliman">rcaliman</who>
    <bug_when>2026-04-30 07:37:41 -0700</bug_when>
    <thetext>This affects the macOS build of Web Inspector as well. It&apos;s not isolated to GTK/WPE. 

The root cause is a race condition during page reload/navigation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206256</commentid>
    <comment_count>6</comment_count>
    <who name="Razvan Caliman">rcaliman</who>
    <bug_when>2026-04-30 08:15:37 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/63972</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206587</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-01 09:43:15 -0700</bug_when>
    <thetext>Committed 312435@main (95810670932e): &lt;https://commits.webkit.org/312435@main&gt;

Reviewed commits have been landed. Closing PR #63972 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>