/* * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::Layout { Progress::Progress(DOM::Document& document, HTML::HTMLProgressElement& element, NonnullRefPtr style) : LabelableNode(document, element, move(style)) { set_intrinsic_height(12); } Progress::~Progress() { } void Progress::paint(PaintContext& context, PaintPhase phase) { if (!is_visible()) return; if (phase == PaintPhase::Foreground) { // FIXME: This does not support floating point value() and max() Gfx::StylePainter::paint_progressbar(context.painter(), enclosing_int_rect(absolute_rect()), context.palette(), 0, dom_node().max(), dom_node().value(), ""); } } }