2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
|
2019-10-17 23:09:41 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
#include <LibWeb/Layout/BlockBox.h>
|
2019-10-17 23:09:41 +02:00
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
namespace Web::Layout {
|
2020-03-07 10:27:02 +01:00
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
class TableCellBox final : public BlockBox {
|
2019-10-17 23:09:41 +02:00
|
|
|
public:
|
2021-01-07 16:37:51 +01:00
|
|
|
TableCellBox(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
|
|
|
|
|
TableCellBox(DOM::Document&, DOM::Element*, CSS::ComputedValues);
|
2020-11-22 15:53:01 +01:00
|
|
|
virtual ~TableCellBox() override;
|
2019-10-17 23:09:41 +02:00
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
TableCellBox* next_cell() { return next_sibling_of_type<TableCellBox>(); }
|
|
|
|
|
const TableCellBox* next_cell() const { return next_sibling_of_type<TableCellBox>(); }
|
2019-10-18 09:36:46 +02:00
|
|
|
|
2020-06-13 00:10:52 +02:00
|
|
|
size_t colspan() const;
|
|
|
|
|
|
2021-01-07 18:00:51 +01:00
|
|
|
static CSS::Display static_display() { return CSS::Display::TableCell; }
|
|
|
|
|
|
2019-10-17 23:09:41 +02:00
|
|
|
private:
|
2020-06-28 15:11:08 +02:00
|
|
|
virtual float width_of_logical_containing_block() const override;
|
2019-10-17 23:09:41 +02:00
|
|
|
};
|
2019-10-17 23:34:12 +02:00
|
|
|
|
|
|
|
|
}
|