2020-07-31 23:07:00 -03:00
|
|
|
/*
|
2021-04-28 17:46:44 -03:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
2020-07-31 23:07:00 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-07-31 23:07:00 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-01-28 19:23:16 -03:00
|
|
|
#include <LibWeb/ARIA/Roles.h>
|
2020-07-31 23:07:00 -03:00
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
2024-02-26 14:54:36 -03:00
|
|
|
#include <LibWeb/WebIDL/Types.h>
|
2020-07-31 23:07:00 -03:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
|
|
class HTMLTableSectionElement final : public HTMLElement {
|
2022-08-28 08:42:07 -03:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLTableSectionElement, HTMLElement);
|
2024-11-14 12:01:23 -03:00
|
|
|
GC_DECLARE_ALLOCATOR(HTMLTableSectionElement);
|
2020-07-31 23:07:00 -03:00
|
|
|
|
2022-08-28 08:42:07 -03:00
|
|
|
public:
|
2020-07-31 23:07:00 -03:00
|
|
|
virtual ~HTMLTableSectionElement() override;
|
2022-02-26 07:43:52 -03:00
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
GC::Ref<DOM::HTMLCollection> rows() const;
|
|
|
|
|
WebIDL::ExceptionOr<GC::Ref<HTMLTableRowElement>> insert_row(WebIDL::Long index);
|
2024-02-26 14:54:36 -03:00
|
|
|
WebIDL::ExceptionOr<void> delete_row(WebIDL::Long index);
|
2022-08-28 08:42:07 -03:00
|
|
|
|
2022-11-28 20:58:13 -03: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 19:23:16 -03:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::rowgroup; }
|
2022-11-28 20:58:13 -03:00
|
|
|
|
2022-08-28 08:42:07 -03:00
|
|
|
private:
|
|
|
|
|
HTMLTableSectionElement(DOM::Document&, DOM::QualifiedName);
|
2022-11-24 15:04:27 -03:00
|
|
|
|
2023-08-22 09:55:10 -03:00
|
|
|
virtual bool is_html_table_section_element() const override { return true; }
|
|
|
|
|
|
2023-08-07 03:41:28 -03:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2022-11-24 15:04:27 -03:00
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
|
|
2024-12-23 13:51:10 -03:00
|
|
|
virtual bool is_presentational_hint(FlyString const&) const override;
|
2026-04-30 06:44:26 -03:00
|
|
|
virtual void apply_presentational_hints(Vector<CSS::StyleProperty>&) const override;
|
2024-10-01 13:45:10 -03:00
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
GC::Ptr<DOM::HTMLCollection> mutable m_rows;
|
2020-07-31 23:07:00 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
2023-08-22 09:55:10 -03:00
|
|
|
|
|
|
|
|
namespace Web::DOM {
|
2025-05-13 08:06:33 -03:00
|
|
|
|
2023-08-22 09:55:10 -03:00
|
|
|
template<>
|
|
|
|
|
inline bool Node::fast_is<HTML::HTMLTableSectionElement>() const { return is_html_table_section_element(); }
|
2025-05-13 08:06:33 -03:00
|
|
|
|
2023-08-22 09:55:10 -03:00
|
|
|
}
|