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
|
|
|
|
|
2020-07-26 15:08:16 +02:00
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
2024-08-06 21:55:36 +01:00
|
|
|
#include <LibWeb/WebIDL/Types.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-06-12 22:47:51 +02:00
|
|
|
class HTMLTableCellElement final : public HTMLElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLTableCellElement, HTMLElement);
|
2023-11-19 19:47:52 +01:00
|
|
|
JS_DECLARE_ALLOCATOR(HTMLTableCellElement);
|
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 ~HTMLTableCellElement() override;
|
2020-06-12 22:47:51 +02:00
|
|
|
|
2022-03-28 23:27:56 +02:00
|
|
|
unsigned col_span() const;
|
2022-03-28 23:36:10 +02:00
|
|
|
unsigned row_span() const;
|
|
|
|
|
2023-05-25 20:37:57 +01:00
|
|
|
WebIDL::ExceptionOr<void> set_col_span(unsigned);
|
|
|
|
WebIDL::ExceptionOr<void> set_row_span(unsigned);
|
2022-03-28 23:27:56 +02:00
|
|
|
|
2024-08-06 21:55:36 +01:00
|
|
|
WebIDL::Long cell_index() const;
|
|
|
|
|
2023-01-28 22:23:16 +00:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override;
|
2022-11-28 17:58:13 -06:00
|
|
|
|
2020-06-12 22:47:51 +02:00
|
|
|
private:
|
2022-08-28 13:42:07 +02:00
|
|
|
HTMLTableCellElement(DOM::Document&, DOM::QualifiedName);
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2023-08-22 14:55:10 +02:00
|
|
|
virtual bool is_html_table_cell_element() const override { return true; }
|
|
|
|
|
2023-08-07 08:41:28 +02:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2020-07-26 20:01:35 +02:00
|
|
|
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
2020-06-07 23:10:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2023-08-22 14:55:10 +02:00
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
template<>
|
|
|
|
inline bool Node::fast_is<HTML::HTMLTableCellElement>() const { return is_html_table_cell_element(); }
|
|
|
|
}
|