mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Use the WritingMode bitflags from Stylo
This commit is contained in:
parent
b9adf8b7ac
commit
40ad9a722d
10 changed files with 62 additions and 81 deletions
|
@ -14,11 +14,12 @@ use crate::geom::flow_relative::{Rect, Sides, Vec2};
|
|||
use crate::positioned::adjust_static_positions;
|
||||
use crate::positioned::{AbsolutelyPositionedBox, AbsolutelyPositionedFragment};
|
||||
use crate::replaced::ReplacedContent;
|
||||
use crate::style_ext::{ComputedValuesExt, Position};
|
||||
use crate::style_ext::ComputedValuesExt;
|
||||
use crate::{relative_adjustement, ContainingBlock};
|
||||
use rayon::iter::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIterator};
|
||||
use rayon_croissant::ParallelIteratorExt;
|
||||
use servo_arc::Arc;
|
||||
use style::computed_values::position::T as Position;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Length, LengthOrAuto, LengthPercentage, LengthPercentageOrAuto};
|
||||
use style::values::generics::length::MaxSize;
|
||||
|
@ -412,7 +413,7 @@ fn layout_in_flow_non_replaced_block_level<'a>(
|
|||
let containing_block_for_children = ContainingBlock {
|
||||
inline_size,
|
||||
block_size,
|
||||
mode: style.writing_mode(),
|
||||
mode: style.writing_mode,
|
||||
};
|
||||
// https://drafts.csswg.org/css-writing-modes/#orthogonal-flows
|
||||
assert_eq!(
|
||||
|
@ -520,7 +521,7 @@ fn layout_in_flow_replaced_block_level<'a>(
|
|||
let border = style.border_width();
|
||||
let computed_margin = style.margin().percentages_relative_to(cbis);
|
||||
let pb = &padding + &border;
|
||||
let mode = style.writing_mode();
|
||||
let mode = style.writing_mode;
|
||||
// FIXME(nox): We shouldn't pretend we always have a fully known intrinsic size.
|
||||
let intrinsic_size = replaced.intrinsic_size.size_to_flow_relative(mode);
|
||||
// FIXME(nox): This can divide by zero.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue