mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add support for table fixups (#30868)
This adds support for fixing up tables so that internal table elements that are not properly parented in the DOM have the correct box tree structure according to the CSS Table specification [1]. Note that this only comes into play when building the DOM via script, as HTML 5 has its own table fixups that mean that the box tree construction fixups here are not necessary. There are no tests for this change. In general, it's hard to write tests against the shape of the box tree, because it depends on the DOM. We plan to test this via WPT tests once layout is complete. 1. https://drafts.csswg.org/css-tables/#table-internal-element Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
709d00583f
commit
81f5157522
7 changed files with 467 additions and 102 deletions
|
@ -2379,14 +2379,14 @@ impl Legalizer {
|
|||
FlowClass::TableRow => self.push_new_anonymous_flow::<E, _>(
|
||||
context,
|
||||
parent,
|
||||
&[PseudoElement::ServoLegacyAnonymousTableCell],
|
||||
&[PseudoElement::ServoAnonymousTableCell],
|
||||
SpecificFragmentInfo::TableCell,
|
||||
TableCellFlow::from_fragment,
|
||||
),
|
||||
FlowClass::Table | FlowClass::TableRowGroup => self.push_new_anonymous_flow::<E, _>(
|
||||
context,
|
||||
parent,
|
||||
&[PseudoElement::ServoLegacyAnonymousTableRow],
|
||||
&[PseudoElement::ServoAnonymousTableRow],
|
||||
SpecificFragmentInfo::TableRow,
|
||||
TableRowFlow::from_fragment,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue