layout: Allow transforming inline replaced elements (#31833)

This requires passing through information about whether or not the
element in question is replaced when checking to see if it's
transformable and transitively all functions that make decisions about
containing blocks. A new FragmentFlag is added to help track this -- it
will be set on both the replaced items BoxFragment container as well as
the Fragment for the replaced item itself.

Fixes #31806.
This commit is contained in:
Martin Robinson 2024-03-27 12:57:27 +01:00 committed by GitHub
parent 15cb9dd5fc
commit b8c82c1ab0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 114 additions and 35 deletions

View file

@ -88,6 +88,9 @@ bitflags! {
const IS_BODY_ELEMENT_OF_HTML_ELEMENT_ROOT = 0b00000001;
/// Whether or not the node that created this Fragment is a `<br>` element.
const IS_BR_ELEMENT = 0b00000010;
/// Whether or not this Fragment was created to contain a replaced element or is
/// a replaced element.
const IS_REPLACED = 0b00000100;
}
}