2020-06-07 23:10:45 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-06-07 23:10:45 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-11-28 17:58:13 -06:00
|
|
|
#include <LibWeb/DOM/ARIARoleNames.h>
|
2020-07-26 15:08:16 +02:00
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
2020-06-07 23:10:45 +02:00
|
|
|
|
2020-07-28 18:20:36 +02:00
|
|
|
namespace Web::HTML {
|
2020-06-07 23:10:45 +02:00
|
|
|
|
2020-07-28 02:54:19 +01:00
|
|
|
class HTMLTableRowElement final : public HTMLElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLTableRowElement, HTMLElement);
|
2020-07-27 05:04:26 +01:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2020-06-07 23:10:45 +02:00
|
|
|
virtual ~HTMLTableRowElement() override;
|
2022-02-26 11:43:52 +01:00
|
|
|
|
2022-09-01 20:50:16 +02:00
|
|
|
JS::NonnullGCPtr<DOM::HTMLCollection> cells() const;
|
2022-03-21 16:15:10 +01:00
|
|
|
|
|
|
|
int row_index() const;
|
|
|
|
int section_row_index() const;
|
2022-11-05 15:19:16 +00:00
|
|
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLTableCellElement>> insert_cell(i32 index);
|
|
|
|
WebIDL::ExceptionOr<void> delete_cell(i32 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-tr
|
2023-01-08 19:23:00 -05:00
|
|
|
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::row; }
|
2022-11-28 17:58:13 -06:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
private:
|
|
|
|
HTMLTableRowElement(DOM::Document&, DOM::QualifiedName);
|
2022-11-24 19:03:22 +01:00
|
|
|
|
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
|
|
|
|
JS::GCPtr<DOM::HTMLCollection> mutable m_cells;
|
2020-06-07 23:10:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|