1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

LibWeb: Override width calculation for table wrappers

Introduce `TableWrapper` type so table wrappers could be
distinguished from block containers and override width
calculation for table wrappers (CSS 2.2 spec, section 17.5.2)
 inside BFCs in the way that their width should be equal to
width of table box they wrap.
This commit is contained in:
Aliaksandr Kalenik 2023-01-14 14:48:20 +01:00 committed by Andreas Kling
parent 7526f9a8b7
commit 709fe01f52
8 changed files with 74 additions and 1 deletions

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Layout/TableWrapper.h>
namespace Web::Layout {
TableWrapper::TableWrapper(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
: BlockContainer(document, node, move(style))
{
}
TableWrapper::TableWrapper(DOM::Document& document, DOM::Node* node, CSS::ComputedValues computed_values)
: BlockContainer(document, node, move(computed_values))
{
}
TableWrapper::~TableWrapper() = default;
}