2020-08-01 03:05:43 +01:00
|
|
|
/*
|
2022-02-16 19:12:54 +01:00
|
|
|
* Copyright (c) 2020-2022, the SerenityOS developers.
|
2020-08-01 03:05:43 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-01 03:05:43 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class HTMLProgressElement final : public HTMLElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLProgressElement, HTMLElement);
|
2020-08-01 03:05:43 +01:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2020-08-01 03:05:43 +01:00
|
|
|
virtual ~HTMLProgressElement() override;
|
2022-02-16 19:12:54 +01: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-01 21:03:30 +00:00
|
|
|
// ^HTMLElement
|
|
|
|
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
|
|
|
virtual bool is_labelable() const override { return true; }
|
|
|
|
|
2022-07-22 16:08:03 +01:00
|
|
|
bool using_system_appearance() const;
|
|
|
|
|
2022-02-16 19:12:54 +01:00
|
|
|
private:
|
2022-08-28 13:42:07 +02:00
|
|
|
HTMLProgressElement(DOM::Document&, DOM::QualifiedName);
|
|
|
|
|
2022-07-22 16:08:03 +01:00
|
|
|
void progress_position_updated();
|
|
|
|
|
2022-02-16 19:12:54 +01:00
|
|
|
bool is_determinate() const { return has_attribute(HTML::AttributeNames::value); }
|
2020-08-01 03:05:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|