LibWeb: Don't (anonymously) wrap table boxes that are already wrapped

Instead just update the existing wrapper with computed values from the
table box, to insure that upside-down "inheritance" works as expected.

This allows table fixup to run on partially updated layout trees without
adding a new layer of unnecessary wrappers every time.
This commit is contained in:
Andreas Kling
2025-01-11 20:22:24 +01:00
committed by Andreas Kling
parent e8b5667a9e
commit b41a490e40
3 changed files with 25 additions and 0 deletions

View File

@@ -1109,6 +1109,11 @@ GC::Ref<NodeWithStyle> NodeWithStyle::create_anonymous_wrapper() const
return *wrapper;
}
void NodeWithStyle::set_computed_values(NonnullOwnPtr<CSS::ComputedValues> computed_values)
{
m_computed_values = move(computed_values);
}
void NodeWithStyle::reset_table_box_computed_values_used_by_wrapper_to_init_values()
{
VERIFY(this->display().is_table_inside());