mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-03 15:41:57 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibGC/CellAllocator.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/CellAllocator.h>
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/DOM/InputEventsTarget.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
@ -16,18 +16,18 @@ namespace Web::DOM {
|
|||
|
||||
class EditingHostManager : public JS::Cell
|
||||
, public InputEventsTarget {
|
||||
JS_CELL(EditingHostManager, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(EditingHostManager);
|
||||
GC_CELL(EditingHostManager, JS::Cell);
|
||||
GC_DECLARE_ALLOCATOR(EditingHostManager);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<EditingHostManager> create(JS::Realm&, JS::NonnullGCPtr<Document>);
|
||||
[[nodiscard]] static GC::Ref<EditingHostManager> create(JS::Realm&, GC::Ref<Document>);
|
||||
|
||||
virtual void handle_insert(String const&) override;
|
||||
virtual void handle_delete(DeleteDirection) override;
|
||||
virtual void handle_return_key() override;
|
||||
virtual void select_all() override;
|
||||
virtual void set_selection_anchor(JS::NonnullGCPtr<DOM::Node>, size_t offset) override;
|
||||
virtual void set_selection_focus(JS::NonnullGCPtr<DOM::Node>, size_t offset) override;
|
||||
virtual void set_selection_anchor(GC::Ref<DOM::Node>, size_t offset) override;
|
||||
virtual void set_selection_focus(GC::Ref<DOM::Node>, size_t offset) override;
|
||||
virtual void move_cursor_to_start(CollapseSelection) override;
|
||||
virtual void move_cursor_to_end(CollapseSelection) override;
|
||||
virtual void increment_cursor_position_offset(CollapseSelection) override;
|
||||
|
@ -37,16 +37,16 @@ public:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor& visitor) override;
|
||||
|
||||
void set_active_contenteditable_element(JS::GCPtr<DOM::Node> element)
|
||||
void set_active_contenteditable_element(GC::Ptr<DOM::Node> element)
|
||||
{
|
||||
m_active_contenteditable_element = element;
|
||||
}
|
||||
|
||||
private:
|
||||
EditingHostManager(JS::NonnullGCPtr<Document>);
|
||||
EditingHostManager(GC::Ref<Document>);
|
||||
|
||||
JS::NonnullGCPtr<Document> m_document;
|
||||
JS::GCPtr<DOM::Node> m_active_contenteditable_element;
|
||||
GC::Ref<Document> m_document;
|
||||
GC::Ptr<DOM::Node> m_active_contenteditable_element;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue