layout: Do not inherit node and fragment flags in anonymous boxes (#31586)

This doesn't really have observable behavior right now, as much as I
tried to trigger some kind of bug. On the other hand, it's just wrong
and is very obvious when you dump the Fragment tree. If you create a
`display: table-cell` that is a child of the `<body>` all parts of the
anonymous table are flagged as if they are the `<body>` element.
This commit is contained in:
Martin Robinson 2024-03-09 10:13:19 +01:00 committed by GitHub
parent 55f908653f
commit 1f23ec2b27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 73 additions and 38 deletions

View file

@ -160,9 +160,7 @@ where
self.context,
self.text_decoration_line,
);
let info = &self
.info
.new_replacing_style(anonymous_style.clone().unwrap());
let info = &self.info.new_anonymous(anonymous_style.clone().unwrap());
IndependentFormattingContext::NonReplaced(NonReplacedFormattingContext {
base_fragment_info: info.into(),
style: info.style.clone(),