2020-08-01 03:07:00 +01:00
|
|
|
/*
|
2021-04-28 22:46:44 +02:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2022-02-26 11:43:52 +01:00
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
2020-08-01 03:07:00 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-01 03:07:00 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-01-28 22:23:16 +00:00
|
|
|
#include <LibWeb/ARIA/Roles.h>
|
2020-08-01 03:07:00 +01:00
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class HTMLTableSectionElement final : public HTMLElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLTableSectionElement, HTMLElement);
|
2020-08-01 03:07:00 +01:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2020-08-01 03:07:00 +01:00
|
|
|
virtual ~HTMLTableSectionElement() override;
|
2022-02-26 11:43:52 +01:00
|
|
|
|
2022-09-01 20:50:16 +02:00
|
|
|
JS::NonnullGCPtr<DOM::HTMLCollection> rows() const;
|
2022-09-25 17:03:42 +01:00
|
|
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLTableRowElement>> insert_row(long index);
|
|
|
|
WebIDL::ExceptionOr<void> delete_row(long index);
|
2022-08-28 13:42:07 +02:00
|
|
|
|
2022-11-28 17:58:13 -06:00
|
|
|
// https://www.w3.org/TR/html-aria/#el-tbody
|
|
|
|
// https://www.w3.org/TR/html-aria/#el-tfoot
|
|
|
|
// https://www.w3.org/TR/html-aria/#el-thead
|
2023-01-28 22:23:16 +00:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::rowgroup; }
|
2022-11-28 17:58:13 -06:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
private:
|
|
|
|
HTMLTableSectionElement(DOM::Document&, DOM::QualifiedName);
|
2022-11-24 19:04:27 +01:00
|
|
|
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
2022-11-24 19:04:27 +01:00
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
|
|
|
|
JS::GCPtr<DOM::HTMLCollection> mutable m_rows;
|
2020-08-01 03:07:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|