layout: Fix the pseudo for anonymous tables (#31578)

Anonymous tables should not use legacy pseudos, as the legacy layout
engine had them inherit lots of random properites that lead to bad
layout in the new layout engine.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-03-08 11:32:51 +01:00 committed by GitHub
parent a5a0e1cb3c
commit 49ae9bb442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 19 additions and 51 deletions

View file

@ -84,9 +84,7 @@ impl Table {
.stylist
.style_for_anonymous::<Node::ConcreteElement>(
&context.shared_context().guards,
// TODO: This should be updated for Layout 2020 once we've determined
// which styles should be inherited for tables.
&PseudoElement::ServoLegacyAnonymousTable,
&PseudoElement::ServoAnonymousTable,
&parent_info.style,
);
let anonymous_info = parent_info.new_replacing_style(anonymous_style.clone());