
This makes them cheap to move around, since we can store them in a NonnullOwnPtr instead of memcopying 2584(!) bytes. Drastically reduces the chance of stack overflow while building the layout tree for deeply nested DOMs (since tree building was putting these things on the stack). This change also exposed a completely unnecessary ComputedValues deep copy in block layout.
23 lines
588 B
C++
23 lines
588 B
C++
/*
|
|
* 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, NonnullOwnPtr<CSS::ComputedValues> computed_values)
|
|
: BlockContainer(document, node, move(computed_values))
|
|
{
|
|
}
|
|
|
|
TableWrapper::~TableWrapper() = default;
|
|
|
|
}
|