ladybird/Userland/Libraries/LibWeb/Layout/Progress.cpp
Andreas Kling ed84fbce47 LibWeb: Make Paintable ref-counted
This will allow us to use a protective NonnullRefPtr to keep paintables
alive while running arbitrary JavaScript in response to events.
2022-03-11 00:21:49 +01:00

29 lines
634 B
C++

/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/Painter.h>
#include <LibGfx/StylePainter.h>
#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()
{
}
RefPtr<Painting::Paintable> Progress::create_paintable() const
{
return Painting::ProgressPaintable::create(*this);
}
}