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
commit b41a490e40
Notes: github-actions[bot] 2025-01-18 20:02:13 +00:00
3 changed files with 25 additions and 0 deletions

View file

@ -191,6 +191,9 @@ public:
// https://drafts.csswg.org/css-ui/#propdef-user-select
CSS::UserSelect user_select_used_value() const;
[[nodiscard]] bool has_been_wrapped_in_table_wrapper() const { return m_has_been_wrapped_in_table_wrapper; }
void set_has_been_wrapped_in_table_wrapper(bool value) { m_has_been_wrapped_in_table_wrapper = value; }
protected:
Node(DOM::Document&, DOM::Node*);
@ -211,6 +214,8 @@ private:
bool m_is_flex_item { false };
bool m_is_grid_item { false };
bool m_has_been_wrapped_in_table_wrapper { false };
GeneratedFor m_generated_for { GeneratedFor::NotGenerated };
u32 m_initial_quote_nesting_level { 0 };
@ -240,6 +245,8 @@ public:
virtual void visit_edges(Cell::Visitor& visitor) override;
void set_computed_values(NonnullOwnPtr<CSS::ComputedValues>);
protected:
NodeWithStyle(DOM::Document&, DOM::Node*, GC::Ref<CSS::ComputedProperties>);
NodeWithStyle(DOM::Document&, DOM::Node*, NonnullOwnPtr<CSS::ComputedValues>);