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:
parent
7526f9a8b7
commit
709fe01f52
8 changed files with 74 additions and 1 deletions
23
Userland/Libraries/LibWeb/Layout/TableWrapper.cpp
Normal file
23
Userland/Libraries/LibWeb/Layout/TableWrapper.cpp
Normal 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;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue