Bug 307431
| Summary: | Navigating with the Layers inspector tab open breaks the visualization | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | Web Inspector | Assignee: | Razvan Caliman <rcaliman> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | a_panta, inspector-bugzilla-changes, rcaliman, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Adrian Perez
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
(In reply to Adrian Perez from comment #0)
> This affects both the “main” branch and the “webkitglib/2.50” one.
This should read: the “main” branch and the “webkitglib/2.52” one.
Adrian Perez
As a workaround, if the “Layers” tab gets stuck like this, closing the inspector and reopening it again works (but it's an annoyance).
Adrian Perez
The empty size error comes from InspectorLayerTreeAgent::requestContent(), defined in Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp:
Inspector::CommandResult<String> InspectorLayerTreeAgent::requestContent(const Inspector::Protocol::LayerTree::LayerId& layerId)
{
// ...
FloatSize layerSize = graphicsLayer->size();
if (layerSize.isEmpty())
return makeUnexpected("Layer has zero size"_s);
// ...
}
Radar WebKit Bug Importer
<rdar://problem/170836910>
Razvan Caliman
This affects the macOS build of Web Inspector as well. It's not isolated to GTK/WPE.
The root cause is a race condition during page reload/navigation.
Razvan Caliman
Pull request: https://github.com/WebKit/WebKit/pull/63972
EWS
Committed 312435@main (95810670932e): <https://commits.webkit.org/312435@main>
Reviewed commits have been landed. Closing PR #63972 and removing active labels.