1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

LibWeb: Add basic implementation of progress bar element

This commit is contained in:
Rafał Babiarz 2022-02-16 19:12:54 +01:00 committed by Tim Flynn
parent d8388f30c8
commit 21e353980f
6 changed files with 133 additions and 3 deletions

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/HTML/HTMLProgressElement.h>
#include <LibWeb/Layout/LabelableNode.h>
namespace Web::Layout {
class Progress : public LabelableNode {
public:
Progress(DOM::Document&, HTML::HTMLProgressElement&, NonnullRefPtr<CSS::StyleProperties>);
virtual ~Progress() override;
virtual void paint(PaintContext&, PaintPhase) override;
const HTML::HTMLProgressElement& dom_node() const { return static_cast<const HTML::HTMLProgressElement&>(LabelableNode::dom_node()); }
HTML::HTMLProgressElement& dom_node() { return static_cast<HTML::HTMLProgressElement&>(LabelableNode::dom_node()); }
};
}