Remove rayon_croissant and clean up contains_floats (#29960)

Remove rayon_croissant and refactor the way that information about
floats in flows bubbles up. This simplifies the code a good deal and
lets us take advantage of some more optimized functions provided by
rayon. This removes 2 crates from the dependency tree.

In addition, this allows avoiding passing `contains_floats` up from
every box tree construction function. This makes things simpler, but
also opens up the possibility of passing more of these flags up in the
future (such as `contains_counters`).
This commit is contained in:
Martin Robinson 2023-07-19 09:01:55 +02:00 committed by GitHub
parent 9c333ab1ee
commit 4f4c2a5922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 108 additions and 144 deletions

View file

@ -39,6 +39,7 @@ pub(crate) struct InlineFormattingContext {
// Whether this IFC contains the 1st formatted line of an element
// https://www.w3.org/TR/css-pseudo-4/#first-formatted-line
pub(super) has_first_formatted_line: bool,
pub(super) contains_floats: bool,
}
#[derive(Debug, Serialize)]
@ -172,6 +173,7 @@ impl InlineFormattingContext {
inline_level_boxes: Default::default(),
text_decoration_line,
has_first_formatted_line,
contains_floats: false,
}
}