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

  Changed paths:
    M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
    M Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
    M Source/WebInspectorUI/UserInterface/Main.html
    M Source/WebInspectorUI/UserInterface/Models/Recording.js
    M Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
    M Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css
    M Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js
    M Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js
    A Source/WebInspectorUI/UserInterface/Views/SavedRecordingTreeElement.css
    A Source/WebInspectorUI/UserInterface/Views/SavedRecordingTreeElement.js

  Log Message:
  -----------
  Web Inspector: Canvas recordings use a lot of memory and are never released
https://bugs.webkit.org/show_bug.cgi?id=180593

Reviewed by Mike Wyrzykowski.

* Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.removeSavedRecording): Added.
(WI.CanvasManager.Event):
Allow saved recordings to be explicitly removed and notify the Graphics views.

* Source/WebInspectorUI/UserInterface/Models/Recording.js:
(WI.Recording):
(WI.Recording.prototype.get source):
(WI.Recording.prototype.set source):
(WI.Recording.prototype.createDisplayName):
Keep a weak reference to the source `WI.Canvas` so a recording retained 
elsewhere does not also retain the canvas and its other recordings.

* Source/WebInspectorUI/UserInterface/Main.html:
* Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype.detached):
(WI.CanvasContentView.prototype._populateRecordingsContextMenu):
* Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype.attached):
(WI.CanvasOverviewContentView.prototype.detached):
(WI.CanvasOverviewContentView.prototype._addSavedRecording):
(WI.CanvasOverviewContentView.prototype._handleRecordingRemoved): Added.
* Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.prototype.attached):
(WI.GraphicsTabContentView.prototype.detached):
(WI.GraphicsTabContentView.prototype._addRecording):
(WI.GraphicsTabContentView.prototype._handleRecordingRemoved): Added.
* Source/WebInspectorUI/UserInterface/Views/SavedRecordingTreeElement.js: Added.
(WI.SavedRecordingTreeElement): Added.
(WI.SavedRecordingTreeElement.prototype._handleRemoveButtonClicked): Added.
* Source/WebInspectorUI/UserInterface/Views/SavedRecordingTreeElement.css: 
Added.
(.item.saved-recording > .status > .status-button.remove-recording): Added.
(.item.saved-recording:is(:hover, :focus-within) > .status > 
.status-button.remove-recording): Added.
Add `Clear Recordings` to the context menu for a live canvas and update its 
footer as recordings are added or removed.
Show a remove button when hovering a saved recording. Remove stale tree 
elements and content views when a saved recording is deleted.

* Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css:
(@media (prefers-color-scheme: dark) .content-view.canvas-overview > 
.content-view.canvas > footer .view-recording, .content-view.canvas-overview > 
.content-view.canvas.saved-recordings .tree-outline > .item.recording > .icon): 
Renamed from `.content-view.canvas-overview > .content-view.canvas > footer 
.view-recording`.
Drive-by: fix the saved recording icon in dark mode.

* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:

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



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

Reply via email to