2020-08-01 05:05:43 +03:00
|
|
|
/*
|
2022-02-16 21:12:54 +03:00
|
|
|
* Copyright (c) 2020-2022, the SerenityOS developers.
|
2020-08-01 05:05:43 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-01 05:05:43 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class HTMLProgressElement final : public HTMLElement {
|
|
|
|
public:
|
|
|
|
using WrapperType = Bindings::HTMLProgressElementWrapper;
|
|
|
|
|
2022-02-18 23:00:52 +03:00
|
|
|
HTMLProgressElement(DOM::Document&, DOM::QualifiedName);
|
2020-08-01 05:05:43 +03:00
|
|
|
virtual ~HTMLProgressElement() override;
|
2022-02-16 21:12:54 +03:00
|
|
|
|
|
|
|
virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
|
|
|
|
|
|
|
double value() const;
|
|
|
|
void set_value(double);
|
|
|
|
|
|
|
|
double max() const;
|
|
|
|
void set_max(double value);
|
|
|
|
|
|
|
|
double position() const;
|
|
|
|
|
2022-03-02 00:03:30 +03:00
|
|
|
// ^HTMLElement
|
|
|
|
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
|
|
|
virtual bool is_labelable() const override { return true; }
|
|
|
|
|
2022-07-22 18:08:03 +03:00
|
|
|
bool using_system_appearance() const;
|
|
|
|
|
2022-02-16 21:12:54 +03:00
|
|
|
private:
|
2022-07-22 18:08:03 +03:00
|
|
|
void progress_position_updated();
|
|
|
|
|
2022-02-16 21:12:54 +03:00
|
|
|
bool is_determinate() const { return has_attribute(HTML::AttributeNames::value); }
|
2020-08-01 05:05:43 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|