Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af624adbb3bc34102a4e7f99703c9d1350e8fc66
      
https://github.com/WebKit/WebKit/commit/af624adbb3bc34102a4e7f99703c9d1350e8fc66
  Author: Devin Rousso <[email protected]>
  Date:   2026-08-07 (Fri, 07 Aug 2026)

  Changed paths:
    M LayoutTests/inspector/canvas/requestClientNodes-css-expected.txt
    M LayoutTests/inspector/canvas/requestClientNodes-css.html
    M LayoutTests/inspector/canvas/requestClientNodes-expected.txt
    M LayoutTests/inspector/canvas/requestClientNodes-webgpu-expected.txt
    M LayoutTests/inspector/canvas/requestClientNodes-webgpu.html
    M LayoutTests/inspector/canvas/requestClientNodes.html
    M LayoutTests/inspector/canvas/requestNode-expected.txt
    M LayoutTests/inspector/canvas/requestNode.html
    M LayoutTests/inspector/canvas/worker-webgpu-expected.txt
    M LayoutTests/inspector/canvas/worker-webgpu.html
    M Source/JavaScriptCore/inspector/protocol/Canvas.json
    M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
    M Source/WebCore/inspector/InspectorCanvas.cpp
    M Source/WebCore/inspector/InspectorCanvas.h
    M Source/WebCore/inspector/agents/page/PageCanvasAgent.cpp
    M Source/WebCore/inspector/agents/page/PageCanvasAgent.h
    M Source/WebCore/inspector/agents/worker/WorkerCanvasAgent.cpp
    M Source/WebCore/inspector/agents/worker/WorkerCanvasAgent.h
    M Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
    M Source/WebInspectorUI/UserInterface/Models/Canvas.js
    M Source/WebInspectorUI/UserInterface/Protocol/CanvasObserver.js
    M Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
    M Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js
    M Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js
    M Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js

  Log Message:
  -----------
  Web Inspector: Canvas: distinguish configured WebGPU `<canvas>` from CSS 
canvas client nodes
https://bugs.webkit.org/show_bug.cgi?id=321150

Reviewed by Mike Wyrzykowski.

* Source/JavaScriptCore/inspector/protocol/Canvas.json:
* Source/WebCore/inspector/InspectorCanvas.h:
* Source/WebCore/inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::canvasElements const): Renamed from `canvasElement`.
(WebCore::InspectorCanvas::cssCanvasClientNodes const): Renamed from 
`clientNodes`.
(WebCore::InspectorCanvas::buildObjectForCanvas):
* Source/WebCore/inspector/agents/page/PageCanvasAgent.h:
* Source/WebCore/inspector/agents/page/PageCanvasAgent.cpp:
(WebCore::PageCanvasAgent::requestNodes): Renamed from `requestNode`.
(WebCore::PageCanvasAgent::requestCSSCanvasClientNodes): Renamed from 
`requestClientNodes`.
(WebCore::PageCanvasAgent::frameNavigated):
(WebCore::PageCanvasAgent::didChangeCSSCanvasClientNodes):
(WebCore::PageCanvasAgent::didChangeGPUDeviceClientNodes):
(WebCore::PageCanvasAgent::buildObjectForCanvas): Deleted.
(WebCore::PageCanvasAgent::nodeIdForCanvas): Deleted.
(WebCore::PageCanvasAgent::dispatchNodesChanged): Added.
(WebCore::PageCanvasAgent::dispatchCSSCanvasClientNodesChanged): Renamed from 
`dispatchClientNodesChanged`.
(WebCore::PageCanvasAgent::dispatchCSSCanvasNamesChanged): Added.
* Source/WebCore/inspector/agents/worker/WorkerCanvasAgent.h:
* Source/WebCore/inspector/agents/worker/WorkerCanvasAgent.cpp:
(WebCore::WorkerCanvasAgent::requestNodes): Renamed from `requestNode`.
(WebCore::WorkerCanvasAgent::requestCSSCanvasClientNodes): Renamed from 
`requestClientNodes`.
Return every `HTMLCanvasElement` configured with a `GPUDevice` from 
`Canvas.requestNodes`, while `Canvas.requestCSSCanvasClientNodes` only returns 
nodes that consume CSS canvas images.
Push DOM nodes via `Canvas.nodesChanged` instead of including it in the initial 
`Canvas`.

* Source/WebInspectorUI/UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.nodesChanged): Added.
(WI.CanvasObserver.prototype.cssCanvasClientNodesChanged):
(WI.CanvasObserver.prototype.cssCanvasNamesChanged): Added.
(WI.CanvasObserver.prototype.clientNodesChanged):
* Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.nodesChanged): Renamed from `clientNodesChanged`.
(WI.CanvasManager.prototype.cssCanvasClientNodesChanged): Added.
(WI.CanvasManager.prototype.cssCanvasNamesChanged): Added.
* Source/WebInspectorUI/UserInterface/Models/Canvas.js:
(WI.Canvas.prototype.constructor):
(WI.Canvas.fromPayload):
(WI.Canvas.prototype.get displayName):
(WI.Canvas.prototype.requestNodes): Renamed from `requestNode`.
(WI.Canvas.prototype.requestCSSCanvasClientNodes): Renamed from 
`requestClientNodes`.
(WI.Canvas.prototype.highlight): Added.
(WI.Canvas.prototype.saveIdentityToCookie):
(WI.Canvas.prototype.nodesChanged): Renamed from `clientNodesChanged`.
(WI.Canvas.prototype.cssCanvasClientNodesChanged): Added.
(WI.Canvas.prototype.cssCanvasNamesChanged): Added.
(WI.Canvas.Event):
Update CSS canvas names only from `Canvas.cssCanvasNamesChanged`.
Centralize hover highlighting logic instead of repeating it in a few places.

* Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.constructor):
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype.detached):
(WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu):
(WI.CanvasContentView.prototype._updateCanvasNode):
* Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WI.CanvasDetailsSidebarPanel.prototype.constructor):
(WI.CanvasDetailsSidebarPanel.prototype.set canvas):
(WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
(WI.CanvasDetailsSidebarPanel.prototype._refreshClientsSection):
(WI.CanvasDetailsSidebarPanel.prototype._handleNodesChanged): Added.
(WI.CanvasDetailsSidebarPanel.prototype._handleCSSCanvasClientNodesChanged): 
Renamed from `_handleClientNodesChanged`.
(WI.CanvasDetailsSidebarPanel.prototype._handleCSSCanvasNamesChanged): Added.
* Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):
* Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js:
(WI.CanvasTreeElement.prototype._handleMouseOver):
Display every configured node in the "Source" section.
Refresh the "Source" and "Client" sections from their corresponding events.

* LayoutTests/inspector/canvas/requestNode.html:
* LayoutTests/inspector/canvas/requestNode-expected.txt:
* LayoutTests/inspector/canvas/requestClientNodes.html:
* LayoutTests/inspector/canvas/requestClientNodes-expected.txt:
* LayoutTests/inspector/canvas/requestClientNodes-css.html:
* LayoutTests/inspector/canvas/requestClientNodes-css-expected.txt:
* LayoutTests/inspector/canvas/requestClientNodes-webgpu.html:
* LayoutTests/inspector/canvas/requestClientNodes-webgpu-expected.txt:
* LayoutTests/inspector/canvas/worker-webgpu.html:
* LayoutTests/inspector/canvas/worker-webgpu-expected.txt:

Canonical link: https://commits.webkit.org/318794@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to