Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 79db54bf56d12e55ab0e60eb1e7db6827a9d0f58
https://github.com/WebKit/WebKit/commit/79db54bf56d12e55ab0e60eb1e7db6827a9d0f58
Author: Anuj Panta <[email protected]>
Date: 2025-12-19 (Fri, 19 Dec 2025)
Changed paths:
M Source/JavaScriptCore/inspector/protocol/LayerTree.json
M Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp
M Source/WebCore/inspector/agents/InspectorLayerTreeAgent.h
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
M Source/WebInspectorUI/UserInterface/Base/Setting.js
M Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js
M Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js
M Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js
Log Message:
-----------
Web Inspector: Layers tab should show a visual representation of the layer
https://bugs.webkit.org/show_bug.cgi?id=302723
rdar://problem/164977594
Reviewed by Devin Rousso.
Implemented layer snapshot rendering to display actual composited content in
the 3D Layers view.
Added LayerTree.snapshotForLayer protocol command that uses
GraphicsLayer::paintGraphicsLayerContents to capture rendered output as PNG
data URLs. The
frontend loads these snapshots as Three.js textures and maps them onto layer
meshes with proper
UV coordinates, replacing the previous solid-color placeholder rectangles. This
approach provides
direct visualization of what each compositing layer actually renders, making it
easier to debug
compositing issues and understand layer content at a glance.
* Source/JavaScriptCore/inspector/protocol/LayerTree.json:
* Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::requestContent):
* Source/WebCore/inspector/agents/InspectorLayerTreeAgent.h:
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Base/Setting.js:
* Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js:
(WI.LayerTreeManager.prototype.snapshotForLayer):
* Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView):
(WI.Layers3DContentView.prototype.get navigationItems):
(WI.Layers3DContentView.prototype.attached):
(WI.Layers3DContentView.prototype.detached):
(WI.Layers3DContentView.prototype._updateLayers):
(WI.Layers3DContentView.prototype._createLayerGroup):
(WI.Layers3DContentView.prototype._populateLayerGroup):
(WI.Layers3DContentView.prototype._loadLayerTexture):
(WI.Layers3DContentView.prototype._createLayerMesh):
(WI.Layers3DContentView.prototype._handleLayerContentsSettingChanged):
(WI.Layers3DContentView.prototype._handleRefreshLayersButtonClicked):
(WI.Layers3DContentView.prototype._refreshAllLayers):
(WI.Layers3DContentView.prototype._zInterval):
* Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Canonical link: https://commits.webkit.org/304758@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications