Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6743d4ebb647587a2b5b6ae8df4041490b87eb54
      
https://github.com/WebKit/WebKit/commit/6743d4ebb647587a2b5b6ae8df4041490b87eb54
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-08-23 (Sun, 23 Aug 2026)

  Changed paths:
    M Source/WebCore/html/CanvasBase.cpp
    M Source/WebCore/html/CanvasBase.h
    M Source/WebCore/inspector/InspectorCanvas.cpp
    M Source/WebCore/inspector/InspectorCanvas.h
    M Source/WebCore/inspector/agents/page/PageCanvasAgent.cpp

  Log Message:
  -----------
  cssCanvasClients() returns a set of raw Element pointers
https://bugs.webkit.org/show_bug.cgi?id=322363
rdar://185651379

Reviewed by Chris Dumez.

CanvasBase::cssCanvasClients() and InspectorCanvas::cssCanvasClientNodes() were
the last HashSet<Element*> in WebCore; every other Element set in the tree is a
HashSet<Ref<Element>> or a WeakHashSet<Element>. Nothing misbehaves today —
the set is built and drained inside a single synchronous inspector call, with no
script or layout in between — but the uncounted container has no reason to exist
here: the producer already holds a RefPtr to each element, and both consumers
immediately re-ref every entry.

Return HashSet<Ref<Element>> instead and let the callers iterate Refs directly.

* Source/WebCore/html/CanvasBase.cpp:
(WebCore::CanvasBase::cssCanvasClients const):
(WebCore:: const): Deleted.
* Source/WebCore/html/CanvasBase.h:
* Source/WebCore/inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::cssCanvasClientNodes const):
* Source/WebCore/inspector/InspectorCanvas.h:
* Source/WebCore/inspector/agents/page/PageCanvasAgent.cpp:
(WebCore::PageCanvasAgent::requestCSSCanvasClientNodes):

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



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

Reply via email to