ladybird/Userland/Libraries/LibWeb/Layout/Progress.cpp
Andreas Kling 4d401bf796 LibWeb: Make the paint tree GC-allocated
This simplifies the ownership model between DOM/layout/paint nodes
immensely by deferring to the garbage collector for figuring out what's
live and what's not.
2023-01-11 12:55:00 +01:00

26 lines
583 B
C++

/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Layout/Progress.h>
#include <LibWeb/Painting/ProgressPaintable.h>
namespace Web::Layout {
Progress::Progress(DOM::Document& document, HTML::HTMLProgressElement& element, NonnullRefPtr<CSS::StyleProperties> style)
: LabelableNode(document, element, move(style))
{
set_intrinsic_height(12);
}
Progress::~Progress() = default;
JS::GCPtr<Painting::Paintable> Progress::create_paintable() const
{
return Painting::ProgressPaintable::create(*this);
}
}