Skip to content

Commit

Permalink
LibWeb: Update LegendBox and FieldSetBox to use GC namespace
Browse files Browse the repository at this point in the history
Fixes broken build.
  • Loading branch information
kalenikaliaksandr committed Nov 19, 2024
1 parent a820308 commit b96270e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Libraries/LibWeb/HTML/HTMLFieldSetElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Layout::FieldSetBox* HTMLFieldSetElement::layout_node()
return static_cast<Layout::FieldSetBox*>(Node::layout_node());
}

JS::GCPtr<Layout::Node> HTMLFieldSetElement::create_layout_node(CSS::StyleProperties style)
GC::Ptr<Layout::Node> HTMLFieldSetElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate<Layout::FieldSetBox>(document(), *this, style);
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/HTML/HTMLFieldSetElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class HTMLFieldSetElement final

virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::group; }

virtual JS::GCPtr<Layout::Node> create_layout_node(CSS::StyleProperties) override;
virtual GC::Ptr<Layout::Node> create_layout_node(CSS::StyleProperties) override;
Layout::FieldSetBox* layout_node();
Layout::FieldSetBox const* layout_node() const;

Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/HTML/HTMLLegendElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ HTMLFormElement* HTMLLegendElement::form()
return nullptr;
}

JS::GCPtr<Layout::Node> HTMLLegendElement::create_layout_node(CSS::StyleProperties style)
GC::Ptr<Layout::Node> HTMLLegendElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate<Layout::LegendBox>(document(), *this, move(style));
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/HTML/HTMLLegendElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class HTMLLegendElement final : public HTMLElement {

HTMLFormElement* form();

virtual JS::GCPtr<Layout::Node> create_layout_node(CSS::StyleProperties) override;
virtual GC::Ptr<Layout::Node> create_layout_node(CSS::StyleProperties) override;
Layout::LegendBox* layout_node();
Layout::LegendBox const* layout_node() const;

Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/FieldSetBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Web::Layout {

JS_DEFINE_ALLOCATOR(FieldSetBox);
GC_DEFINE_ALLOCATOR(FieldSetBox);

FieldSetBox::FieldSetBox(DOM::Document& document, DOM::Element& element, CSS::StyleProperties style)
: BlockContainer(document, &element, move(style))
Expand Down
5 changes: 3 additions & 2 deletions Libraries/LibWeb/Layout/FieldSetBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

#include <LibWeb/Forward.h>
#include <LibWeb/Layout/BlockContainer.h>

namespace Web::Layout {

class FieldSetBox final : public BlockContainer {
JS_CELL(FieldSetBox, BlockContainer);
JS_DECLARE_ALLOCATOR(FieldSetBox);
GC_CELL(FieldSetBox, BlockContainer);
GC_DECLARE_ALLOCATOR(FieldSetBox);

public:
FieldSetBox(DOM::Document&, DOM::Element&, CSS::StyleProperties);
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/LegendBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Web::Layout {

JS_DEFINE_ALLOCATOR(LegendBox);
GC_DEFINE_ALLOCATOR(LegendBox);

LegendBox::LegendBox(DOM::Document& document, DOM::Element& element, CSS::StyleProperties style)
: BlockContainer(document, &element, move(style))
Expand Down
4 changes: 2 additions & 2 deletions Libraries/LibWeb/Layout/LegendBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
namespace Web::Layout {

class LegendBox final : public BlockContainer {
JS_CELL(LegendBox, BlockContainer);
JS_DECLARE_ALLOCATOR(LegendBox);
GC_CELL(LegendBox, BlockContainer);
GC_DECLARE_ALLOCATOR(LegendBox);

public:
LegendBox(DOM::Document&, DOM::Element&, CSS::StyleProperties);
Expand Down

0 comments on commit b96270e

Please sign in to comment.