
Having this here instead of in ReplacedBox means we can access it when figuring out what the "preferred aspect ratio" is. There's some inconsistency between specs about what this is called, but they're moving towards referring to this as "natural width/height/ aspect-ratio", so let's copy that terminology.
25 lines
581 B
C++
25 lines
581 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_natural_height(12);
|
|
}
|
|
|
|
Progress::~Progress() = default;
|
|
|
|
JS::GCPtr<Painting::Paintable> Progress::create_paintable() const
|
|
{
|
|
return Painting::ProgressPaintable::create(*this);
|
|
}
|
|
|
|
}
|