mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb/DOM: Create TreeWalker in document's realm
This commit is contained in:
parent
84f22cb6b3
commit
17c92d7c2b
Notes:
github-actions[bot]
2025-01-10 08:09:54 +00:00
Author: https://github.com/shannonbooth
Commit: 17c92d7c2b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3208
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 10 additions and 11 deletions
|
@ -16,7 +16,7 @@ class TreeWalker final : public Bindings::PlatformObject {
|
|||
GC_DECLARE_ALLOCATOR(TreeWalker);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static GC::Ref<TreeWalker> create(Node& root, unsigned what_to_show, GC::Ptr<NodeFilter>);
|
||||
[[nodiscard]] static GC::Ref<TreeWalker> create(JS::Realm&, Node& root, unsigned what_to_show, GC::Ptr<NodeFilter>);
|
||||
|
||||
virtual ~TreeWalker() override;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
unsigned what_to_show() const { return m_what_to_show; }
|
||||
|
||||
private:
|
||||
explicit TreeWalker(Node& root);
|
||||
explicit TreeWalker(JS::Realm&, Node& root);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue