mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout_2020: Add 'white_space' field to InlineNestingLevelState
Indicate current white-space property of current nesting context.
This commit is contained in:
parent
a725380db0
commit
6f377a9262
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,7 @@ use app_units::Au;
|
|||
use atomic_refcell::AtomicRef;
|
||||
use gfx::text::text_run::GlyphRun;
|
||||
use servo_arc::Arc;
|
||||
use style::computed_values::white_space::T as WhiteSpace;
|
||||
use style::logical_geometry::WritingMode;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Length, LengthPercentage, Percentage};
|
||||
|
@ -74,6 +75,7 @@ struct InlineNestingLevelState<'box_tree> {
|
|||
inline_start: Length,
|
||||
max_block_size_of_fragments_so_far: Length,
|
||||
positioning_context: Option<PositioningContext>,
|
||||
white_space: WhiteSpace,
|
||||
/// Indicates whether this nesting level have text decorations in effect.
|
||||
/// From https://drafts.csswg.org/css-text-decor/#line-decoration
|
||||
// "When specified on or propagated to a block container that establishes
|
||||
|
@ -297,6 +299,7 @@ impl InlineFormattingContext {
|
|||
inline_start: Length::zero(),
|
||||
max_block_size_of_fragments_so_far: Length::zero(),
|
||||
positioning_context: None,
|
||||
white_space: containing_block.style.clone_inherited_text().white_space,
|
||||
text_decoration_line: self.text_decoration_line,
|
||||
},
|
||||
sequential_layout_state,
|
||||
|
@ -503,6 +506,7 @@ impl InlineBox {
|
|||
start_corner += &relative_adjustement(&style, ifc.containing_block)
|
||||
}
|
||||
let positioning_context = PositioningContext::new_for_style(&style);
|
||||
let white_space = style.clone_inherited_text().white_space;
|
||||
let text_decoration_line =
|
||||
ifc.current_nesting_level.text_decoration_line | style.clone_text_decoration_line();
|
||||
PartialInlineBoxFragment {
|
||||
|
@ -523,6 +527,7 @@ impl InlineBox {
|
|||
inline_start: ifc.inline_position,
|
||||
max_block_size_of_fragments_so_far: Length::zero(),
|
||||
positioning_context,
|
||||
white_space,
|
||||
text_decoration_line: text_decoration_line,
|
||||
},
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue