Move to_bidi_level method from Stylo to Servo (#37343)

This method is only used in Servo and is the only reason that `stylo`
depends on `unicode-bidi`.

Stylo PR: https://github.com/servo/stylo/pull/196
This commit is contained in:
Nico Burns 2025-06-11 15:44:13 +01:00 committed by GitHub
parent c1ee354c38
commit 7427ea4aed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 17 deletions

View file

@ -21,7 +21,7 @@ use crate::formatting_contexts::{
IndependentNonReplacedContents,
};
use crate::layout_box_base::LayoutBoxBase;
use crate::style_ext::DisplayGeneratingBox;
use crate::style_ext::{ComputedValuesExt, DisplayGeneratingBox};
/// A builder used for both flex and grid containers.
pub(crate) struct ModernContainerBuilder<'a, 'dom> {
@ -152,7 +152,7 @@ impl<'a, 'dom> ModernContainerBuilder<'a, 'dom> {
self.context,
true, /* has_first_formatted_line */
false, /* is_single_line_text_box */
self.info.style.writing_mode.to_bidi_level(),
self.info.style.to_bidi_level(),
)?;
let block_formatting_context = BlockFormattingContext::from_block_container(