Truly independent web browser
LibWeb: Measure text up to the next soft wrap opportunity when wrapping
Tim Ledbetter9ff8e6e88071
diff --git a/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rsindex b91de4b03a5..85ece837560 100644--- a/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs@@ -1677,19 +1677,15 @@ impl<'context> InlineFormattingContext<'context> {TextItemWrapOpportunity::None};}- let next_inline_size =- inline_level_iterator::sequence_inline_size(self, remaining_items, false).unwrap_or_default();- return if next_inline_size > CssPixels::default() {- TextItemWrapOpportunity::BeforeWhitespaceSequence(item.border_box_inline_size() + next_inline_size)- } else {- TextItemWrapOpportunity::None- };+ return inline_level_iterator::whitespace_and_sequence_inline_size(self, item, remaining_items).map_or(+ TextItemWrapOpportunity::None,+ TextItemWrapOpportunity::BeforeWhitespaceSequence,+ );}- if item.can_break_before- || (can_break_after_previous_overflow_item && !self.overflow_break_applies_to_style(style))- || line_ends_in_whitespace- {+ if item.can_break_before || line_ends_in_whitespace {TextItemWrapOpportunity::BeforeText+ } else if can_break_after_previous_overflow_item && !self.overflow_break_applies_to_style(style) {+ TextItemWrapOpportunity::AfterOverflowBreakableText} else {TextItemWrapOpportunity::None}@@ -2026,8 +2022,10 @@ impl<'context> InlineFormattingContext<'context> {let mut leading_margin = CssPixels::default();let mut leading_border = CssPixels::default();let mut leading_padding = CssPixels::default();+ let mut leading_right_to_left_end_margin = CssPixels::default();let mut absolute_boxes = Vec::new();let mut previous_text_item_allows_overflow_break_after = false;+ let mut whitespace_measured_next_run = false;let mut state_at_clamp_point = None;let mut items_after_clamp_point = Vec::new();let mut stopped_at_line_limit = false;@@ -2071,6 +2069,7 @@ impl<'context> InlineFormattingContext<'context> {}let can_break_after_previous_overflow_item =std::mem::take(&mut previous_text_item_allows_overflow_break_after);+ let run_fits_after_previous_whitespace = std::mem::take(&mut whitespace_measured_next_run);let line_starts_with_whitespace = self.line_data().line_boxes@@ -2087,15 +2086,18 @@ impl<'context> InlineFormattingContext<'context> {leading_margin += item.margin_start;leading_border += item.border_start;leading_padding += item.padding_start;+ leading_right_to_left_end_margin += item.entered_right_to_left_end_margin;continue;}item.margin_start += leading_margin;item.border_start += leading_border;item.padding_start += leading_padding;+ item.entered_right_to_left_end_margin += leading_right_to_left_end_margin;leading_margin = CssPixels::default();leading_border = CssPixels::default();leading_padding = CssPixels::default();+ leading_right_to_left_end_margin = CssPixels::default();match item.type_ {inline_level_iterator::ItemType::InlineEdge => {@@ -2109,9 +2111,7 @@ impl<'context> InlineFormattingContext<'context> {item_index: item_index + 1,offset_in_node: 0,});- let continuation = iterator- .next_inline_run_size(self)- .map(|_| iterator.next_unbreakable_run_inline_size(self));+ let continuation = iterator.next_unbreakable_run_inline_size(self);line_builder.break_line(line_builder::ForcedBreak::Yes, item.node, continuation);if !item.node.is_invalid() && self.clear_floating_boxes(item.node) {line_builder.did_introduce_clearance(self.block_axis_float_clearance.get());@@ -2152,6 +2152,7 @@ impl<'context> InlineFormattingContext<'context> {leading_margin += item.margin_start;leading_border += item.border_start;leading_padding += item.padding_start;+ leading_right_to_left_end_margin += item.entered_right_to_left_end_margin;line_builder.finish_current_line_before_block_level_box();if self.stops_at_line_clamp_point(line_builder, &mut state_at_clamp_point) {break;@@ -2197,7 +2198,7 @@ impl<'context> InlineFormattingContext<'context> {line_builder.commit_pending_margin_before_float();self.clear_floating_boxes(item.node);line_builder.set_unbreakable_run_inline_size_interrupted_by_float(- iterator.next_unbreakable_run_inline_size(self),+ iterator.next_unbreakable_run_inline_size(self).unwrap_or_default(),);if line_builder.only_finds_line_breaks() {let cells = self@@ -2242,7 +2243,6 @@ impl<'context> InlineFormattingContext<'context> {let style = self.style(self.parent_node(item.node));if style.text_wrap_mode() == text_wrap_mode::WRAP {let is_whitespace = item.is_collapsible_whitespace || item.is_ascii_whitespace(self);- let item_inline_size = item.border_box_inline_size();let line_ends_in_whitespace = self.line_data().line_boxes@@ -2276,12 +2276,26 @@ impl<'context> InlineFormattingContext<'context> {}continue;}+ whitespace_measured_next_run = true;}- TextItemWrapOpportunity::BeforeText => {+ TextItemWrapOpportunity::BeforeText+ | TextItemWrapOpportunity::AfterOverflowBreakableText => {+ let measure_rest_of_run = !is_whitespace+ && !run_fits_after_previous_whitespace+ && line_builder.can_break_before_next_item();+ let unbreakable_run_inline_size = if measure_rest_of_run {+ let stop_at_overflow_breakable_text = opportunity+ == TextItemWrapOpportunity::AfterOverflowBreakableText+ || line_builder.current_line_is_empty();+ iterator.unbreakable_run_inline_size(self, &item, stop_at_overflow_breakable_text)+ } else {+ inline_level_iterator::inline_extent([&item])+ };if overflow_break_allowed {- line_builder.break_if_needed_before_overflow_breakable_item(item_inline_size);+ line_builder+ .break_if_needed_before_overflow_breakable_item(unbreakable_run_inline_size);} else {- line_builder.break_if_needed(item_inline_size);+ line_builder.break_if_needed(unbreakable_run_inline_size);}line_builder.note_soft_wrap_opportunity();}@@ -3526,6 +3540,7 @@ enum TextItemWrapOpportunity {None,BeforeWhitespaceSequence(CssPixels),BeforeText,+ AfterOverflowBreakableText,}pub(crate) fn line_physical_horizontal_extent(line: &line_box::LineBoxData) -> CssPixels {diff --git a/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rs b/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rsindex b8fed51c616..825f071bc41 100644--- a/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rs+++ b/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rs@@ -49,6 +49,8 @@ pub(crate) struct Item {pub(crate) border_end: CssPixels,pub(crate) margin_start: CssPixels,pub(crate) margin_end: CssPixels,+ pub(crate) entered_right_to_left_end_margin: CssPixels,+ pub(crate) exited_right_to_left_end_margin: CssPixels,pub(crate) is_collapsible_whitespace: bool,pub(crate) can_break_before: bool,pub(crate) preceded_by_unattached_inline_start_edges: bool,@@ -56,7 +58,7 @@ pub(crate) struct Item {atomic: Option<Box<AtomicItemMetrics>>,}-const _: () = assert!(size_of::<Item>() == 88);+const _: () = assert!(size_of::<Item>() == 96);#[derive(Clone, Debug)]struct OwnedGlyphRun {@@ -179,6 +181,8 @@ impl Item {border_end: CssPixels::default(),margin_start: CssPixels::default(),margin_end: CssPixels::default(),+ entered_right_to_left_end_margin: CssPixels::default(),+ exited_right_to_left_end_margin: CssPixels::default(),is_collapsible_whitespace: false,can_break_before: false,preceded_by_unattached_inline_start_edges: false,@@ -419,6 +423,7 @@ impl Item {prefix.margin_start = self.margin_start;prefix.border_start = self.border_start;prefix.padding_start = self.padding_start;+ prefix.entered_right_to_left_end_margin = self.entered_right_to_left_end_margin;prefix.can_break_before = self.can_break_before;prefix.owned_glyph_run = Some(Box::new(prefix_glyphs));self.drop_prefix(split_offset_in_node, remainder_glyphs);@@ -433,6 +438,7 @@ impl Item {self.margin_start = CssPixels::default();self.border_start = CssPixels::default();self.padding_start = CssPixels::default();+ self.entered_right_to_left_end_margin = CssPixels::default();self.can_break_before = false;}@@ -551,6 +557,49 @@ impl Item {Some(self.take_prefix_before(split, shape(&text[start..split]), shape(&text[split..end])))}+ pub(crate) fn first_grapheme_cluster_inline_size(+ &self,+ prepared: &PreparedInlineContent,+ text: &[u16],+ segmenter: &text_chunker::GraphemeSegmenter,+ letter_spacing: f32,+ word_spacing: f32,+ ) -> Option<CssPixels> {+ assert_eq!(self.type_, ItemType::Text);+ let run = self.glyph_run(prepared)?;+ let start = self.offset_in_node;+ let end = start + self.length_in_node;+ if run.text_type != line_box_fragment::GLYPH_TEXT_TYPE_RTL+ && let Some(first_glyph) = run.glyphs.first()+ {+ let mut code_units = first_glyph.length_in_code_units;+ for glyph in run.glyphs.iter().skip(1) {+ if glyph.length_in_code_units == 0 {+ continue;+ }+ let offset = start + code_units;+ if offset >= end {+ break;+ }+ if segmenter.next_boundary(offset, true) == Some(offset) {+ return Some(CssPixels::nearest_value_for_f32(glyph.x));+ }+ code_units += glyph.length_in_code_units;+ }+ }+ let boundary = segmenter+ .next_boundary(start, false)+ .filter(|boundary| *boundary < end)?;+ let width = libgfx_rust::text_layout::shaped_text_width(+ run.font,+ &text[start..boundary],+ libgfx_rust::text_layout::TextType::try_from(run.text_type).expect("invalid Gfx::GlyphRun::TextType"),+ letter_spacing,+ word_spacing,+ );+ Some(CssPixels::nearest_value_for_f32(width))+ }+pub(crate) fn grapheme_cluster_inline_sizes(&self,prepared: &PreparedInlineContent,@@ -601,6 +650,7 @@ struct PendingInlineEdge {border: CssPixels,padding: CssPixels,physical: ExtraBoxMetrics,+ right_to_left_end_margin: CssPixels,is_start: bool,is_low: bool,takes_leading_metrics: bool,@@ -1359,6 +1409,7 @@ impl<'context> RunItemResolver<'_, 'context> {padding: sides.padding_right,}};+ let right_to_left_end_margin = self.negative_right_to_left_end_margin(node, sides.margin_left);if margin != CssPixels::default()|| border != CssPixels::default()|| padding != CssPixels::default()@@ -1372,6 +1423,7 @@ impl<'context> RunItemResolver<'_, 'context> {border,padding,physical,+ right_to_left_end_margin,is_start,is_low: is_start != reversed,takes_leading_metrics: is_start,@@ -1406,6 +1458,14 @@ impl<'context> RunItemResolver<'_, 'context> {self.keep_inline_edge(node, &sides, false);}+ fn negative_right_to_left_end_margin(&self, node: Node, margin_left: CssPixels) -> CssPixels {+ if margin_left < CssPixels::default() && self.context().style(node).direction() == direction::RTL {+ margin_left+ } else {+ CssPixels::default()+ }+ }+/// The end edges of inline boxes that end right after an out-of-flow box are pending when the resolver reaches/// that box. It takes no edges itself, so they precede the next item rather than follow its content.fn carry_trailing_metrics_past_out_of_flow_box(&mut self) {@@ -1425,15 +1485,19 @@ impl<'context> RunItemResolver<'_, 'context> {item.margin_start += edge.physical.margin;item.border_start += edge.physical.border;item.padding_start += edge.physical.padding;- false} else if !edge.takes_leading_metrics && add_trailing_metrics {item.margin_end += edge.physical.margin;item.border_end += edge.physical.border;item.padding_end += edge.physical.padding;- false} else {- true+ return true;+ }+ if edge.is_start {+ item.entered_right_to_left_end_margin += edge.right_to_left_end_margin;+ } else {+ item.exited_right_to_left_end_margin += edge.right_to_left_end_margin;}+ false});}@@ -1578,6 +1642,8 @@ impl<'context> RunItemResolver<'_, 'context> {item.border_end = contributions.border_end;item.margin_start = contributions.margin_start;item.margin_end = contributions.margin_end;+ item.entered_right_to_left_end_margin = self.negative_right_to_left_end_margin(item.node, item.margin_start);+ item.exited_right_to_left_end_margin = item.entered_right_to_left_end_margin;}fn resolve_element_item(&mut self, item_index: usize, prepared_item: &PreparedItem) -> Item {@@ -1595,6 +1661,8 @@ impl<'context> RunItemResolver<'_, 'context> {item.border_end = box_cells.border_right;item.margin_start = box_cells.margin_left;item.margin_end = box_cells.margin_right;+ item.entered_right_to_left_end_margin = self.negative_right_to_left_end_margin(node, item.margin_start);+ item.exited_right_to_left_end_margin = item.entered_right_to_left_end_margin;item.atomic = Some(Box::new(AtomicItemMetrics {min_content_inline_size: None,content_baselines,@@ -1819,14 +1887,32 @@ impl InlineLevelIterator {&self,context: &inline_formatting_context::InlineFormattingContext<'_>,) -> Option<CssPixels> {- sequence_inline_size(context, self.items(), false)+ sequence_inline_size(context, &self.prepared, self.items(), false)}pub(crate) fn next_unbreakable_run_inline_size(&self,context: &inline_formatting_context::InlineFormattingContext<'_>,+ ) -> Option<CssPixels> {+ sequence_inline_size(context, &self.prepared, self.items(), true)+ }++ pub(crate) fn unbreakable_run_inline_size(+ &self,+ context: &inline_formatting_context::InlineFormattingContext<'_>,+ item: &Item,+ stop_at_overflow_breakable_text: bool,) -> CssPixels {- sequence_inline_size(context, self.items(), true).unwrap_or_default()+ let items = std::iter::once(item).chain(self.items());+ let (length, end) = sequence_length(context, items.clone(), stop_at_overflow_breakable_text);+ if end == SequenceEnd::OverflowBreakableText {+ let first_grapheme_cluster = items+ .clone()+ .nth(length)+ .map(|item| first_grapheme_cluster(context, &self.prepared, item));+ return sequence_inline_extent(context, items.take(length).chain(first_grapheme_cluster.as_ref()));+ }+ sequence_inline_extent(context, items.take(length.max(1)))}pub(crate) fn next_non_whitespace_text_allows_overflow_break(@@ -1851,15 +1937,48 @@ impl InlineLevelIterator {}}+pub(crate) fn whitespace_and_sequence_inline_size(+ context: &inline_formatting_context::InlineFormattingContext<'_>,+ whitespace: &Item,+ items: &[Item],+) -> Option<CssPixels> {+ let (length, _) = sequence_length(context, items, false);+ if length == 0 {+ return None;+ }+ let size = sequence_inline_extent(context, std::iter::once(whitespace).chain(&items[..length]));+ (size > inline_extent([whitespace])).then_some(size)+}+pub(crate) fn sequence_inline_size(context: &inline_formatting_context::InlineFormattingContext<'_>,+ prepared: &PreparedInlineContent,items: &[Item],stop_at_overflow_breakable_text: bool,) -> Option<CssPixels> {- let mut size = CssPixels::default();- for (index, item) in items.iter().enumerate() {+ let (length, end) = sequence_length(context, items, stop_at_overflow_breakable_text);+ let first_grapheme_cluster =+ (end == SequenceEnd::OverflowBreakableText).then(|| first_grapheme_cluster(context, prepared, &items[length]));+ let size = sequence_inline_extent(context, items[..length].iter().chain(first_grapheme_cluster.as_ref()));+ (end == SequenceEnd::ForcedBreak || size > CssPixels::default()).then_some(size)+}++#[derive(Clone, Copy, PartialEq)]+enum SequenceEnd {+ ForcedBreak,+ OverflowBreakableText,+ Other,+}++fn sequence_length<'item>(+ context: &inline_formatting_context::InlineFormattingContext<'_>,+ items: impl IntoIterator<Item = &'item Item>,+ stop_at_overflow_breakable_text: bool,+) -> (usize, SequenceEnd) {+ let mut length = 0;+ for item in items {match item.type_ {- ItemType::ForcedBreak => return Some(size),+ ItemType::ForcedBreak => return (length, SequenceEnd::ForcedBreak),ItemType::BlockLevelBox => break,_ => {}}@@ -1869,17 +1988,116 @@ pub(crate) fn sequence_inline_size(break;}// NB: The sequence ends at its next soft wrap opportunity, such as the one after a hyphen.- if index > 0 && item.can_break_before {+ if length > 0 && item.can_break_before {break;}if item.is_ascii_whitespace(context) {break;}if stop_at_overflow_breakable_text && context.overflow_break_applies(item.node) {- break;+ return (length, SequenceEnd::OverflowBreakableText);}}- size += item.border_box_inline_size();+ length += 1;}- (size > CssPixels::default()).then_some(size)+ (length, SequenceEnd::Other)+}++fn first_grapheme_cluster(+ context: &inline_formatting_context::InlineFormattingContext<'_>,+ prepared: &PreparedInlineContent,+ item: &Item,+) -> Item {+ let style = context.style(context.style_source(item.node));+ let text_content = context.callbacks.text_content(item.node);+ let first_grapheme_cluster_inline_size = context.callbacks.with_grapheme_segmenter(item.node, |segmenter| {+ item.first_grapheme_cluster_inline_size(+ prepared,+ &text_content.text,+ segmenter,+ style.letter_spacing().to_double() as f32,+ style.word_spacing().to_double() as f32,+ )+ });+ let mut cluster = Item::new(ItemType::Text, item.node, item.prepared_item_index as usize);+ cluster.margin_start = item.margin_start;+ cluster.border_start = item.border_start;+ cluster.padding_start = item.padding_start;+ cluster.entered_right_to_left_end_margin = item.entered_right_to_left_end_margin;+ match first_grapheme_cluster_inline_size {+ Some(inline_size) => cluster.inline_size = inline_size,+ None => {+ cluster.inline_size = item.inline_size;+ cluster.padding_end = item.padding_end;+ cluster.border_end = item.border_end;+ cluster.margin_end = item.margin_end;+ cluster.exited_right_to_left_end_margin = item.exited_right_to_left_end_margin;+ }+ }+ cluster+}++fn sequence_inline_extent<'item>(+ context: &inline_formatting_context::InlineFormattingContext<'_>,+ items: impl Iterator<Item = &'item Item> + Clone,+) -> CssPixels {+ let mut last_content = None::<(usize, CssPixels)>;+ for (index, item) in items.clone().enumerate() {+ let whitespace = item.trailing_whitespace;+ if whitespace.length_in_code_units == 0 {+ last_content = Some((index, CssPixels::default()));+ continue;+ }+ let is_collapsible = item.is_collapsible_whitespace+ || matches!(+ context.style(context.style_source(item.node)).white_space_collapse(),+ white_space_collapse::COLLAPSE | white_space_collapse::PRESERVE_BREAKS+ );+ if !is_collapsible {+ last_content = Some((index, CssPixels::default()));+ } else if whitespace.length_in_code_units < item.length_in_node {+ last_content = Some((index, whitespace.inline_size));+ }+ }+ let mut previous_placed_item = None::<&Item>;+ inline_extent_without_removed_whitespace(items.enumerate().map(move |(index, item)| {+ let collapses = item.is_collapsible_whitespace+ && previous_placed_item+ .is_some_and(|previous| previous.type_ == ItemType::Text && previous.ends_in_ascii_space(context));+ if !collapses {+ previous_placed_item = Some(item);+ }+ let removed_inline_size = match last_content {+ _ if collapses => item.inline_size,+ Some((last_index, _)) if index < last_index => CssPixels::default(),+ Some((last_index, whitespace_inline_size)) if index == last_index => whitespace_inline_size,+ _ => item.inline_size,+ };+ (item, removed_inline_size)+ }))+}++pub(crate) fn inline_extent<'item>(items: impl IntoIterator<Item = &'item Item>) -> CssPixels {+ inline_extent_without_removed_whitespace(items.into_iter().map(|item| (item, CssPixels::default())))+}++fn inline_extent_without_removed_whitespace<'item>(+ items: impl IntoIterator<Item = (&'item Item, CssPixels)>,+) -> CssPixels {+ let mut position = CssPixels::default();+ let mut extent = None::<CssPixels>;+ let mut held_end_margin = CssPixels::default();+ for (item, removed_inline_size) in items {+ held_end_margin += item.entered_right_to_left_end_margin;+ position += item.margin_start - item.entered_right_to_left_end_margin + item.border_box_inline_size()+ - removed_inline_size;+ let end = position.max(position + item.margin_end);+ extent = Some(extent.map_or(end, |extent| extent.max(end)));+ position += item.margin_end;+ // NB: The end margin of a box that started before these items is already part of the line.+ let released_end_margin = item.exited_right_to_left_end_margin.max(held_end_margin);+ position += released_end_margin;+ held_end_margin -= released_end_margin;+ }+ extent.unwrap_or_default()}diff --git a/Libraries/LibWeb/Rust/src/layout/line_builder.rs b/Libraries/LibWeb/Rust/src/layout/line_builder.rsindex 6d44281bae7..687f5bf2cdd 100644--- a/Libraries/LibWeb/Rust/src/layout/line_builder.rs+++ b/Libraries/LibWeb/Rust/src/layout/line_builder.rs@@ -338,6 +338,16 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {self.line_count() == 0 || self.line(self.line_count() - 1).is_empty()}+ pub(crate) fn can_break_before_next_item(&mut self) -> bool {+ !self.current_line_is_empty() || self.floats_intrude_at_current_line_start()+ }++ fn floats_intrude_at_current_line_start(&self) -> bool {+ let line_height = self.containing_style().line_height();+ self.context()+ .any_floats_intrude_in_block_range(self.current_block_offset, self.current_block_offset + line_height)+ }+/// The inline size the current line breaks at. Balancing breaks lines before they fill the available inline size,/// but they still align within it.fn inline_size_to_break_current_line_at(&self) -> AvailableSize {@@ -705,11 +715,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {fn should_break(&mut self, next_item_inline_size: CssPixels) -> bool {let inline_size_to_break_at = if self.current_line_is_empty() {- let line_height = self.containing_style().line_height();- if !self- .context()- .any_floats_intrude_in_block_range(self.current_block_offset, self.current_block_offset + line_height)- {+ if !self.floats_intrude_at_current_line_start() {return false;}// NB: Balancing moves breaks between the content of lines, not lines past floats.diff --git a/Tests/LibWeb/Layout/expected/unbreakable-run-across-inline-box-boundaries.txt b/Tests/LibWeb/Layout/expected/unbreakable-run-across-inline-box-boundaries.txtindex 322f7e9d7b9..e3daf817f53 100644--- a/Tests/LibWeb/Layout/expected/unbreakable-run-across-inline-box-boundaries.txt+++ b/Tests/LibWeb/Layout/expected/unbreakable-run-across-inline-box-boundaries.txt@@ -1,6 +1,6 @@-Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline- BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 288 0+0+0] [BFC] children: not-inline- BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 270 0+0+8] children: not-inline+Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline overflow: [0,0 800x1298]+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 1298 0+0+0] [BFC] children: not-inline+ BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 1280 0+0+8] children: not-inlineBlockContainer <div> at [8,8] [0+0+0 100 0+0+684] [0+0+0 30 0+0+10] children: inlinefrag 0 from TextNode start: 0, length: 4, rect: [8,8 40x10] baseline: 8"aaaa"@@ -45,6 +45,392 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] childrenTextNode <#text> (not painted)BreakNode <br> (not painted)TextNode <#text> (not painted)+ BlockContainer <div> at [8,288] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,288 80x10] baseline: 8+ "aaaa bb-"+ frag 1 from TextNode start: 0, length: 2, rect: [28,298 20x10] baseline: 8+ "dd"+ TextNode <#text> (not painted)+ InlineNode <b> at [8,298] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [8,298 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,318] [0+0+0 100 0+0+684] [0+0+0 30 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,318 80x10] baseline: 8+ "aaaa bb-"+ frag 1 from TextNode start: 0, length: 2, rect: [28,328 20x10] baseline: 8+ "dd"+ frag 2 from TextNode start: 0, length: 1, rect: [8,338 10x10] baseline: 8+ "e"+ TextNode <#text> (not painted)+ InlineNode <b> at [8,328] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [8,328 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BreakNode <br> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,358] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,358 80x10] baseline: 8+ "aaaa bb-"+ frag 1 from TextNode start: 0, length: 2, rect: [28,368 20x10] baseline: 8+ "dd"+ TextNode <#text> (not painted)+ InlineNode <b> at [8,368] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [8,368 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,388] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 2, rect: [28,388 20x10] baseline: 8+ "bb"+ InlineNode <span> at [8,388] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [8,388 20x10] baseline: 8+ "aa"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ InlineNode <span> at [8,388] [0+0+0 100 0+0+0] [0+0+0 20 0+0+0]+ frag 0 from TextNode start: 0, length: 6, rect: [48,388 60x10] baseline: 8+ "cccccc"+ frag 0 from TextNode start: 6, length: 4, rect: [8,398 40x10] baseline: 8+ "cccc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,418] [0+0+0 100 0+0+684] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 10, rect: [8,418 100x10] baseline: 8+ "aaaa bb-cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [88,418] [-20+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [88,418 20x10] baseline: 8+ "dd"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,438] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,438 80x10] baseline: 8+ "aaaa bb-"+ frag 1 from TextNode start: 8, length: 1, rect: [8,448 10x10] baseline: 8+ "c"+ TextNode <#text> (not painted)+ InlineNode <span> at [28,448] [10+0+0 10 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 1, rect: [28,448 10x10] baseline: 8+ "d"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,468] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 3, rect: [8,468 30x10] baseline: 8+ "aaa"+ TextNode <#text> (not painted)+ InlineNode <span> at [28,478] [20+0+0 50 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 5, rect: [28,478 50x10] baseline: 8+ "bbbbb"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,498] [0+0+0 100 0+0+684] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,498 80x10] baseline: 8+ "aaaa bb-"+ frag 1 from TextNode start: 0, length: 2, rect: [88,498 20x10] baseline: 8+ "dd"+ TextNode <#text> (not painted)+ InlineNode <span> at [68,498] [-20+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [68,498 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,518] [0+0+0 100 0+0+684] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,518 80x10] baseline: 8+ "aaaa bb-"+ frag 1 from TextNode start: 0, length: 2, rect: [88,518 20x10] baseline: 8+ "dd"+ TextNode <#text> (not painted)+ InlineNode <span> at [88,518] [0+0+0 20 0+0+-20] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [88,518 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,538] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,538 80x10] baseline: 8+ "aaaa bb-"+ TextNode <#text> (not painted)+ InlineNode <span> at [18,548] [10+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [18,548 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,568] [0+0+0 100 0+0+684] [0+0+0 50 0+0+10] [BFC] children: not-inline+ BlockContainer <span> at [8,568] floating [0+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline+ BlockContainer <div> at [8,568] [0+0+0 100 0+0+0] [0+0+0 40 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 3, rect: [8,598 30x10] baseline: 8+ "aaa"+ TextNode <#text> (not painted)+ InlineNode <b> at [38,598] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [38,598 40x10] baseline: 8+ "aaaa"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,628] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [8,628 40x10] baseline: 8+ "aaaa"+ frag 1 from TextNode start: 5, length: 2, rect: [8,638 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [28,638] [0+0+0 40 0+0+-10] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [28,638 40x10] baseline: 8+ "dddd"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,658] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,658 80x10] baseline: 8+ "aaaa bb-"+ TextNode <#text> (not painted)+ InlineNode <span> at [8,668] [0+0+0 30 0+0+-10] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [8,668 30x10] baseline: 8+ "ccc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,688] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [8,688 40x10] baseline: 8+ "aaaa"+ frag 1 from TextNode start: 5, length: 2, rect: [8,698 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [28,698] [0+0+0 30 0+0+10] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [28,698 30x10] baseline: 8+ "ddd"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,718] [0+0+0 40 0+0+744] [0+0+0 20 0+0+10] children: inline+ InlineNode <span> at [8,718] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [8,718 40x10] baseline: 8+ "dddd"+ TextNode <#text> (not painted)+ InlineNode <span> at [8,728] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [8,728 40x10] baseline: 8+ "bbbb"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,748] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [68,748 40x10] baseline: 8+ "aaaa"+ TextNode <#text> (not painted)+ InlineNode <span> at [48,758] [-20+0+0 60 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 6, rect: [48,758 60x10] baseline: 8+ "bbbbcc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,778] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [68,778 40x10] baseline: 8+ "aaaa"+ TextNode <#text> (not painted)+ InlineNode <span> at [48,788] [-20+0+0 60 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [48,788 30x10] baseline: 8+ "bbb"+ TextNode <#text> (not painted)+ InlineNode <b> at [78,788] [0+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [78,788 30x10] baseline: 8+ "ccc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,808] [0+0+0 90 0+0+694] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [8,808 60x10] baseline: 8+ "aa-bb-"+ TextNode <#text> (not painted)+ InlineNode <span> at [68,808] [0+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [68,808 30x10] baseline: 8+ "ccc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,828] [0+0+0 90 0+0+694] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [8,828 60x10] baseline: 8+ "aa-bb-"+ TextNode <#text> (not painted)+ InlineNode <span> at [68,828] [0+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [68,828 30x10] baseline: 8+ "ccc"+ TextNode <#text> (not painted)+ InlineNode <b> at [8,828] [0+0+0 0 0+0+0] [0+0+0 10 0+0+0]+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,848] [0+0+0 90 0+0+694] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 9, rect: [8,848 90x10] baseline: 8+ "aa-bb-ccc"+ TextNode <#text> (not painted)+ InlineNode <span> at [8,848] [0+0+0 0 0+0+0] [0+0+0 10 0+0+0]+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,868] [0+0+0 70 0+0+714] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [8,868 40x10] baseline: 8+ "aaa "+ TextNode <#text> (not painted)+ InlineNode <span> at [48,868] [0+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [48,868 30x10] baseline: 8+ "ccc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,888] [0+0+0 100 0+0+684] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [8,888 60x10] baseline: 8+ "aa-bb-"+ TextNode <#text> (not painted)+ InlineNode <span> at [68,888] [0+0+0 30 0+0+10] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [68,888 30x10] baseline: 8+ "ccc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,908] [0+0+0 70 0+0+714] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 3, rect: [8,908 30x10] baseline: 8+ "aaa"+ TextNode <#text> (not painted)+ InlineNode <span> at [8,918] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [8,918 40x10] baseline: 8+ "ccc "+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,938] [0+0+0 60 0+0+724] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 3, rect: [8,938 30x10] baseline: 8+ "aa-"+ frag 1 from TextNode start: 0, length: 2, rect: [48,938 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [18,938] [-20+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [18,938 30x10] baseline: 8+ "bbb"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,958] [0+0+0 60 0+0+724] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 3, rect: [8,958 30x10] baseline: 8+ "aa-"+ frag 1 from TextNode start: 0, length: 2, rect: [48,958 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [18,958] [-20+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [18,958 30x10] baseline: 8+ "bbb"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,978] [0+0+0 60 0+0+724] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 3, rect: [8,978 30x10] baseline: 8+ "aa-"+ frag 1 from TextNode start: 0, length: 2, rect: [48,978 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [18,978] [-20+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 1, rect: [38,978 10x10] baseline: 8+ "b"+ InlineNode <b> at [18,978] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [18,978 20x10] baseline: 8+ "bb"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,998] [0+0+0 60 0+0+724] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 2, rect: [8,998 20x10] baseline: 8+ "aa"+ TextNode <#text> (not painted)+ InlineNode <span> at [18,998] [-10+0+0 30 0+0+20] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [18,998 30x10] baseline: 8+ " bb"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1018] [0+0+0 90 0+0+694] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 2, rect: [8,1018 20x10] baseline: 8+ "aa"+ frag 1 from TextNode start: 0, length: 2, rect: [48,1018 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [28,1018] [0+0+0 30 0+0+-10] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [28,1018 30x10] baseline: 8+ "bb "+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ InlineNode <span> at [78,1018] [10+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [78,1018 20x10] baseline: 8+ "dd"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1038] [0+0+0 100 0+0+684] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [8,1038 60x10] baseline: 8+ "aa-bb-"+ TextNode <#text> (not painted)+ InlineNode <span> at [68,1038] [0+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [68,1038 30x10] baseline: 8+ "cc "+ TextNode <#text> (not painted)+ InlineNode <span> at [98,1038] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 1, rect: [98,1038 10x10] baseline: 8+ "d"+ InlineNode <b> at [8,1038] [0+0+0 0 0+0+0] [0+0+0 10 0+0+0]+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1058] [0+0+0 100 0+0+684] [0+0+0 10 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 8, rect: [8,1058 80x10] baseline: 8+ "aa-bb-cc"+ frag 1 from TextNode start: 0, length: 1, rect: [98,1058 10x10] baseline: 8+ "d"+ TextNode <#text> (not painted)+ InlineNode <span> at [88,1058] [0+0+0 10 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 1, rect: [88,1058 10x10] baseline: 8+ " "+ TextNode <#text> (not painted)+ InlineNode <span> at [8,1058] [0+0+0 0 0+0+0] [0+0+0 10 0+0+0]+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1078] [0+0+0 40 0+0+744] [0+0+0 30 0+0+10] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 1, rect: [8,1088 10x10] baseline: 8+ "e"+ BlockContainer <span> at [8,1078] floating [0+0+0 30 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline+ TextNode <#text> (not painted)+ InlineNode <span> at [8,1088] [0+0+0 40 0+0+0] [0+0+0 20 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [18,1088 30x10] baseline: 8+ "dab"+ frag 0 from TextNode start: 3, length: 4, rect: [8,1098 40x10] baseline: 8+ "ccbb"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1118] [0+0+0 100 0+0+684] [0+0+0 30 0+0+10] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 2, rect: [58,1118 20x10] baseline: 8+ "cc"+ BlockContainer <span> at [8,1118] floating [0+0+0 50 0+0+0] [0+0+0 20 0+0+0] [BFC] children: not-inline+ TextNode <#text> (not painted)+ InlineNode <span> at [8,1118] [0+0+0 100 0+0+0] [0+0+0 30 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [78,1118 30x10] baseline: 8+ "bbb"+ frag 0 from TextNode start: 3, length: 5, rect: [58,1128 50x10] baseline: 8+ "bbbbb"+ frag 0 from TextNode start: 8, length: 4, rect: [8,1138 40x10] baseline: 8+ "bbbb"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1158] [0+0+0 60 0+0+724] [0+0+0 10 0+0+10] children: inline+ InlineNode <span> at [8,1158] [0+0+0 60 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [8,1158 30x10] baseline: 8+ "aa-"+ frag 1 from TextNode start: 0, length: 2, rect: [48,1158 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ InlineNode <span> at [18,1158] [-20+0+0 30 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 3, rect: [18,1158 30x10] baseline: 8+ "bbb"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1178] [0+0+0 60 0+0+724] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [8,1178 40x10] baseline: 8+ "aaa-"+ TextNode <#text> (not painted)+ InlineNode <span> at [-12,1188] [-20+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ InlineNode <b> at [-12,1188] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [-12,1188 40x10] baseline: 8+ "bbbb"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1208] [0+0+0 100 0+0+684] [0+0+0 20 0+0+10] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 2, rect: [100.6875,1208 7.3125x10] baseline: 8+ "שש"+ frag 1 from TextNode start: 0, length: 20, rect: [34.875,1218 73.125x10] baseline: 8+ "שששששששששששששששששששש"+ TextNode <#text> (not painted)+ BlockContainer <span> at [8,1208] floating [0+0+0 50 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1238] [0+0+0 60 0+0+724] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 1, rect: [8,1248 10x10] baseline: 8+ "b"+ InlineNode <span> at [8,1238] [0+0+0 40 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [8,1238 40x10] baseline: 8+ "aaaa"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ InlineNode <i> at [18,1248] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [18,1248 20x10] baseline: 8+ "cc"+ TextNode <#text> (not painted)+ BlockContainer <div> at [8,1268] [0+0+0 60 0+0+724] [0+0+0 20 0+0+10] children: inline+ frag 0 from TextNode start: 0, length: 1, rect: [8,1278 10x10] baseline: 8+ "b"+ InlineNode <span> at [8,1268] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 2, rect: [8,1268 20x10] baseline: 8+ "aa"+ TextNode <#text> (not painted)+ TextNode <#text> (not painted)+ InlineNode <i> at [18,1278] [0+0+0 80 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 8, rect: [18,1278 80x10] baseline: 8+ "cccccccc"+ TextNode <#text> (not painted)SC for Viewport<#document> [0,0 800x600] (z-index: auto)- SC for BlockContainer<HTML> [0,0 800x288] (z-index: auto)+ SC for BlockContainer<HTML> [0,0 800x1298] (z-index: auto)diff --git a/Tests/LibWeb/Layout/input/unbreakable-run-across-inline-box-boundaries.html b/Tests/LibWeb/Layout/input/unbreakable-run-across-inline-box-boundaries.htmlindex 601ae7ee79a..60e07528877 100644--- a/Tests/LibWeb/Layout/input/unbreakable-run-across-inline-box-boundaries.html+++ b/Tests/LibWeb/Layout/input/unbreakable-run-across-inline-box-boundaries.html@@ -13,3 +13,40 @@<div>aaaa bbbb<b>cc</b><br>d</div><div style="display: flow-root"><span style="float: left; width: 50px; height: 100px"></span>x<br><span>aaaaaaaa</span><br>c</div><div style="display: flow-root; overflow-wrap: anywhere"><span style="float: left; width: 50px; height: 100px"></span>x<br><span>aaaaaaaa</span><br>c</div>+<div>aaaa bb-<b>cc</b>dd</div>+<div>aaaa bb-<b>cc</b>dd<br>e</div>+<div style="overflow-wrap: anywhere">aaaa bb-<b>cc</b>dd</div>+<div><span style="overflow-wrap: anywhere">aa</span>bb<span style="overflow-wrap: anywhere">cccccccccc</span></div>+<div>aaaa bb-cc<span style="margin-left: -20px">dd</span></div>+<div>aaaa bb-c<span style="margin-left: 10px">d</span></div>+<div>aaa <span style="margin-left: 20px">bbbbb</span></div>+<div>aaaa bb-<span style="margin-left: -20px">cc</span>dd</div>+<div>aaaa bb-<span style="margin-right: -20px">cc</span>dd</div>+<div>aaaa bb-<span style="margin-left: 10px">cc</span></div>+<div style="display: flow-root"><span style="float: left; width: 50px; height: 30px"></span><div>aaa<b>aaaa</b></div></div>+<div>aaaa cc<span style="margin-right: -10px">dddd</span></div>+<div>aaaa bb-<span style="margin-right: -10px">ccc</span></div>+<div>aaaa cc<span style="margin-right: 10px">ddd</span></div>+<div style="width: 40px"><span style="word-break: break-all">dddd</span><span style="overflow-wrap: anywhere">bbbb</span></div>+<div dir="rtl">aaaa <span style="margin-left: -20px">bbbbcc</span></div>+<div dir="rtl">aaaa <span style="margin-left: -20px">bbb<b>ccc</b></span></div>+<div style="width: 90px">aa-bb-<span style="white-space: nowrap">ccc </span></div>+<div style="width: 90px">aa-bb-<span style="white-space: nowrap">ccc<b> </b></span></div>+<div style="width: 90px">aa-bb-ccc<span style="white-space: nowrap"> </span></div>+<div style="width: 70px">aaa <span style="white-space: nowrap">ccc </span></div>+<div>aa-bb-<span style="white-space: nowrap; margin-right: 10px">ccc </span></div>+<div style="width: 70px">aaa <span style="white-space: pre">ccc </span></div>+<div dir="rtl" style="width: 60px">aa-<span style="margin-left: -20px">bbb</span>cc</div>+<div style="width: 60px">aa-<span dir="rtl" style="margin-left: -20px">bbb</span>cc</div>+<div dir="rtl" style="width: 60px">aa-<span style="margin-left: -20px"><b>bb</b>b</span>cc</div>+<div style="width: max-content">aa<span style="margin-left: -10px; margin-right: 20px"> bb</span></div>+<div style="width: max-content">aa<span style="margin-right: -10px">bb </span>cc<span style="margin-left: 10px">dd</span></div>+<div>aa-bb-<span style="white-space: nowrap">cc </span><span style="white-space: nowrap"><b> </b>d</span></div>+<div>aa-bb-cc<span style="white-space: nowrap"> </span><span style="white-space: nowrap"> </span>d</div>+<div style="width: 40px; display: flow-root"><span style="float: left; width: 30px; height: 10px"></span>e<span style="overflow-wrap: anywhere">dabccbb</span></div>+<div style="display: flow-root"><span style="float: left; width: 50px; height: 20px"></span>cc<span style="overflow-wrap: anywhere">bbbbbbbbbbbb</span></div>+<div style="width: 60px"><span>aa-<span style="direction: rtl; margin-left: -20px">bbb</span>cc</span></div>+<div style="width: 60px">aaa-<span style="direction: rtl; margin-left: -20px"><b style="direction: ltr">bbbb</b></span></div>+<div dir="rtl" style="display: flow-root; overflow-wrap: anywhere">שש<span style="float: left; width: 50px; height: 10px"></span>שששששששששששששששששששש</div>+<div style="width: 60px"><span style="overflow-wrap: anywhere">aaaa</span>b<i>cc</i></div>+<div style="width: 60px"><span style="overflow-wrap: anywhere">aa</span>b<i>cccccccc</i></div>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-text/i18n/reference/css3-text-line-break-opclns-005-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-text/i18n/reference/css3-text-line-break-opclns-005-ref.htmlnew file mode 100644index 00000000000..3781541120a--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-text/i18n/reference/css3-text-line-break-opclns-005-ref.html@@ -0,0 +1,32 @@+<!DOCTYPE html>+<html lang="en" >+<head>+<meta charset="utf-8"/>+<title>CSS3 Text, linebreaks: 0F3C TIBETAN MARK ANG KHANG GYON</title>+<link rel='author' title='Richard Ishida' href='mailto:[email protected]'>+<style type='text/css'>+@font-face {+ font-family: 'mplus-1p-regular';+ src: url('../../../../fonts/mplus-1p-regular.woff') format('woff');+ /* filesize: 803K */+ }+.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; }+</style>+</head>+<body>+<p class="instructions">Test passes if the two orange boxes are identical.</p>+++<div class='ref'>中中<br />༼文</div>++++++<div class='ref'>中中<br />༼文</div>+++++</body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-text/line-break/reference/line-break-strict-014-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-text/line-break/reference/line-break-strict-014-ref.xhtnew file mode 100644index 00000000000..9f1cbbded6b--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-text/line-break/reference/line-break-strict-014-ref.xht@@ -0,0 +1,91 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Reftest Reference</title>+ <!-- reftest for line-break-strict-014.xht -->+ <link rel="author" title="Taka Oshiyama" href="mailto:[email protected]" />+ <link rel="author" title="Shinyu Murakami" href="mailto:[email protected]" />+ <meta http-equiv="content-language" content="en, ja" />+ <style type="text/css">+ @font-face+ {+ font-family: "mplus-1p-regular";+ src: url("../../../../fonts/mplus-1p-regular.woff") format("woff");+ /* filesize: 803300 bytes (784.5 KBytes) */+ /*+ mplus-1p-regular.ttf can be downloaded at/from [TBD later]+ */+ }+ p.control {+ border: 1px solid gray;+ color: blue;+ font-family: "mplus-1p-regular";+ width: 10.2em; /* added extra .2em for some symbols wider than 1em */+ }+ span.target {+ background-color: aqua;+ }+ div.wrapper {+ display: inline-block;+ border: 1px solid;+ margin: 10px;+ padding: 10px;+ }+ </style>+ </head>+ <body lang="en">+ <p>+ Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position.+ </p>+ <!-- iteration marks -->+ <div class="wrapper">+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">々</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">々</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">〻</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">〻</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ゝ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ゝ</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ゞ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ゞ</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ヽ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ヽ</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ヾ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ヾ</span>サンプル文</span>+ </p>+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-text/i18n/css3-text-line-break-opclns-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-text/i18n/css3-text-line-break-opclns-005.htmlnew file mode 100644index 00000000000..c5342083030--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-text/i18n/css3-text-line-break-opclns-005.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<html lang="en" >+<head>+<meta charset="utf-8"/>+<title>CSS3 Text, linebreaks: 0F3C TIBETAN MARK ANG KHANG GYON</title>+<link rel='author' title='Richard Ishida' href='mailto:[email protected]'>+<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'>+<link rel="match" href="../../../../../expected/wpt-import/css/css-text/i18n/reference/css3-text-line-break-opclns-005-ref.html">+<meta name='flags' content='should '>+<meta name="assert" content="Because it has OP Opening Punctuation property, the browser will not leave 0F3C TIBETAN MARK ANG KHANG GYON at the end of a line.">+<style type='text/css'>+@font-face {+ font-family: 'mplus-1p-regular';+ src: url('../../../fonts/mplus-1p-regular.woff') format('woff');+ /* filesize: 803K */+ }+.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; }+</style>+</head>+<body>+<p class="instructions">Test passes if the two orange boxes are identical.</p>+++<div class='test'>中中༼文</div>++++++<div class='ref'>中中<br />༼文</div>+++<!--Notes:++These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances.+<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>.+++-->+++</body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-text/line-break/line-break-strict-014.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-text/line-break/line-break-strict-014.xhtnew file mode 100644index 00000000000..224516dffca--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-text/line-break/line-break-strict-014.xht@@ -0,0 +1,97 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Text Test: line-break - strict and iteration marks</title>+ <!-- iteration marks -->+ <link rel="author" title="Taka Oshiyama" href="mailto:[email protected]" />+ <link rel="author" title="Shinyu Murakami" href="mailto:[email protected]" />+ <link rel="help" title="5.3. Line Breaking Rules: the 'line-break' property" href="https://drafts.csswg.org/css-text-3/#line-break-property" />+ <link rel="match" href="../../../../../expected/wpt-import/css/css-text/line-break/reference/line-break-strict-014-ref.xht" />+ <meta http-equiv="content-language" content="en, ja" />+ <meta name="assert" content="This test verifies that 'line-break: strict' does not allow line breaking before iteration marks such as IDEOGRAPHIC ITERATION MARK (U+3005) and VERTICAL IDEOGRAPHIC ITERATION MARK (U+303B)." />+ <style type="text/css">+ @font-face+ {+ font-family: "mplus-1p-regular";+ src: url("../../../fonts/mplus-1p-regular.woff") format("woff");+ /* filesize: 803300 bytes (784.5 KBytes) */+ /*+ mplus-1p-regular.ttf can be downloaded at/from [TBD later]+ */+ }+ .test span {+ line-break: strict; /* The property to be tested */+ }+ p.test, p.control {+ border: 1px solid gray;+ color: blue;+ font-family: "mplus-1p-regular";+ width: 10.2em; /* added extra .2em for some symbols wider than 1em */+ }+ span.target {+ background-color: aqua;+ }+ div.wrapper {+ display: inline-block;+ border: 1px solid;+ margin: 10px;+ padding: 10px;+ }+ </style>+ </head>+ <body lang="en">+ <p>+ Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position.+ </p>+ <!-- iteration marks -->+ <div class="wrapper">+ <p class="test" lang="ja">+ <span>サンプル文サンプル文<span class="target">々</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">々</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="test" lang="ja">+ <span>サンプル文サンプル文<span class="target">〻</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">〻</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="test" lang="ja">+ <span>サンプル文サンプル文<span class="target">ゝ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ゝ</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="test" lang="ja">+ <span>サンプル文サンプル文<span class="target">ゞ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ゞ</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="test" lang="ja">+ <span>サンプル文サンプル文<span class="target">ヽ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ヽ</span>サンプル文</span>+ </p>+ </div>+ <div class="wrapper">+ <p class="test" lang="ja">+ <span>サンプル文サンプル文<span class="target">ヾ</span>サンプル文</span>+ </p>+ <p class="control" lang="ja">+ <span>サンプル文サンプル<br />文<span class="target">ヾ</span>サンプル文</span>+ </p>+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt b/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txtindex 8e717a843bb..ab471dcec2a 100644--- a/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt+++ b/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt@@ -9,7 +9,7 @@ pre: 135x40, 135x40, 135x40, 135x40pre-wrap: 140x40, 50x100, 140x40, 120x60pre-line: 100x40, 50x60, 100x40, 100x40break-spaces: 130x40, 60x60, 130x40, 120x40-mixed whitespace: 230x40, 110x40, 230x40, 120x40+mixed whitespace: 230x20, 110x40, 230x20, 120x40forced breaks: 100x60, 50x80, 100x60, 100x60indent: 173x20, 63x60, 173x20, 120x40negative indent: 147x20, 50x60, 147x20, 120x40diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/CSS2/linebox/inline-negative-margin-001.txt b/Tests/LibWeb/Text/expected/wpt-import/css/CSS2/linebox/inline-negative-margin-001.txtnew file mode 100644index 00000000000..dc4951570a3--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/css/CSS2/linebox/inline-negative-margin-001.txt@@ -0,0 +1,19 @@+Harness status: OK++Found 13 tests++12 Pass+1 Fail+Pass [data-expected-height] 1+Pass [data-expected-height] 2+Pass [data-expected-height] 3+Pass [data-expected-height] 4+Pass [data-expected-height] 5+Pass [data-expected-height] 6+Fail [data-expected-height] 7+Pass [data-expected-height] 8+Pass [data-expected-height] 9+Pass [data-expected-height] 10+Pass [data-expected-height] 11+Pass [data-expected-height] 12+Pass [data-expected-height] 13\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/other-lang/css-text-line-break-de-po-loose.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/other-lang/css-text-line-break-de-po-loose.txtindex ddc15b53829..3397e60f186 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/other-lang/css-text-line-break-de-po-loose.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/other-lang/css-text-line-break-de-po-loose.txt@@ -2,8 +2,7 @@ Harness status: OKFound 10 tests-8 Pass-2 Fail+10 PassPass 00B0 DEGREE SIGN may NOT appear at line start if de and loosePass 2030 PER MILLE SIGN may NOT appear at line start if de and loosePass 2032 PRIME may NOT appear at line start if de and loose@@ -11,6 +10,6 @@ Pass 2033 DOUBLE PRIME may NOT appear at line start if de and loosePass 2035 REVERSED PRIME may NOT appear at line start if de and loosePass 2103 DEGREE CELSIUS may NOT appear at line start if de and loosePass 2109 DEGREE FAHRENHEIT may NOT appear at line start if de and loose-Fail FE6A SMALL PERCENT SIGN may NOT appear at line start if de and loose+Pass FE6A SMALL PERCENT SIGN may NOT appear at line start if de and loosePass FF05 FULLWIDTH PERCENT SIGN may NOT appear at line start if de and loose-Fail FFE0 FULLWIDTH CENT SIGN may NOT appear at line start if de and loose\ No newline at end of file+Pass FFE0 FULLWIDTH CENT SIGN may NOT appear at line start if de and loose\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-loose.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-loose.txtindex 882eac38794..3ac4a72d129 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-loose.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-loose.txt@@ -2,8 +2,7 @@ Harness status: OKFound 10 tests-8 Pass-2 Fail+10 PassPass 00B0 DEGREE SIGN may NOT appear at line start if loosePass 2030 PER MILLE SIGN may NOT appear at line start if loosePass 2032 PRIME may NOT appear at line start if loose@@ -11,6 +10,6 @@ Pass 2033 DOUBLE PRIME may NOT appear at line start if loosePass 2035 REVERSED PRIME may NOT appear at line start if loosePass 2103 DEGREE CELSIUS may NOT appear at line start if loosePass 2109 DEGREE FAHRENHEIT may NOT appear at line start if loose-Fail FE6A SMALL PERCENT SIGN may NOT appear at line start if loose+Pass FE6A SMALL PERCENT SIGN may NOT appear at line start if loosePass FF05 FULLWIDTH PERCENT SIGN may NOT appear at line start if loose-Fail FFE0 FULLWIDTH CENT SIGN may NOT appear at line start if loose\ No newline at end of file+Pass FFE0 FULLWIDTH CENT SIGN may NOT appear at line start if loose\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-normal.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-normal.txtnew file mode 100644index 00000000000..842c14a024f--- /dev/null+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-normal.txt@@ -0,0 +1,15 @@+Harness status: OK++Found 10 tests++10 Pass+Pass 00B0 DEGREE SIGN may NOT appear at line start if normal+Pass 2030 PER MILLE SIGN may NOT appear at line start if normal+Pass 2032 PRIME may NOT appear at line start if normal+Pass 2033 DOUBLE PRIME may NOT appear at line start if normal+Pass 2035 REVERSED PRIME may NOT appear at line start if normal+Pass 2103 DEGREE CELSIUS may NOT appear at line start if normal+Pass 2109 DEGREE FAHRENHEIT may NOT appear at line start if normal+Pass FE6A SMALL PERCENT SIGN may NOT appear at line start if normal+Pass FF05 FULLWIDTH PERCENT SIGN may NOT appear at line start if normal+Pass FFE0 FULLWIDTH CENT SIGN may NOT appear at line start if normal\ No newline at end of filediff --git a/Tests/LibWeb/Text/input/wpt-import/css/CSS2/linebox/inline-negative-margin-001.html b/Tests/LibWeb/Text/input/wpt-import/css/CSS2/linebox/inline-negative-margin-001.htmlnew file mode 100644index 00000000000..35ca37c571d--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/css/CSS2/linebox/inline-negative-margin-001.html@@ -0,0 +1,53 @@+<!DOCTYPE html>+<title>CSS Test: Check inline negative margin should not cause the line to wrap</title>+<script src="../../../resources/testharness.js"></script>+<script src="../../../resources/testharnessreport.js"></script>+<script src="../../../resources/check-layout-th.js"></script>+<link rel="help" href="https://crbug.com/979894">+<link rel="help" href="https://crbug.com/1011816">+<link rel="help" href="https://crbug.com/1040461">+<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#inline-width">+<link rel="author" title="Koji Ishii" href="mailto:[email protected]">+<link rel="stylesheet" type="text/css" href="../../../fonts/ahem.css" />+<style>+#container {+ font-family: Ahem;+ font-size: 10px;+ line-height: 1;+ margin-left: 10ch;+}+inline-block {+ display: inline-block;+}+.w1 { width: 1ch; }+.w2 { width: 2ch; }+.w3 { width: 3ch; }+.w4 { width: 4ch; }+.w5 { width: 5ch; }+span {+ color: orange;+}+img {+ height: .6em;+ background: orange;+}+</style>+<body>+ <section id="container">+ <div><inline-block data-expected-height=10>123 <span style="margin-left: -8ch">1234 </span></inline-block></div>+ <div><inline-block data-expected-height=10>123 <span style="margin-left: -8ch">123 </span></inline-block></div>+ <div class="w4" data-expected-height=10>123 <span style="margin-left: -4ch">1234 </span></div>+ <div class="w4" data-expected-height=10>123 <span style="margin-left: -4ch">123 </span></div>+ <div class="w4" data-expected-height=10><img class="w4"><span style="margin-left: -4ch">123</span></div>+ <div class="w4" data-expected-height=10><img class="w5"><span style="margin-left: -5ch">123</span></div>+ <div class="w4" data-expected-height=20><img class="w5"><span style="margin-left: -3ch">123</span></div>+ <div class="w4" data-expected-height=10><img class="w4"><img class="w1" style="margin-left: -1ch"></div>+ <div class="w4" data-expected-height=20><img class="w4"><img class="w2" style="margin-left: -1ch"></div>+ <div class="w4" data-expected-height=10><img class="w5"><img class="w1" style="margin-left: -2ch"></div>+ <div class="w4" data-expected-height=20><img class="w5"><img class="w2" style="margin-left: -2ch"></div>++ <div class="w4" data-expected-height=20><img class="w3"><img class="w2"><img class="w1" style="margin-left: -2ch"></div>+ <div class="w4" data-expected-height=20><img class="w2"> <img class="w2"><img class="w1" style="margin-left: -2ch"></div>+ </section>+<script>document.fonts.ready.then(() => checkLayout('[data-expected-height]'));</script>+</body>diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-normal.html b/Tests/LibWeb/Text/input/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-normal.htmlnew file mode 100644index 00000000000..0119a4fcfe0--- /dev/null+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-text/i18n/unknown-lang/css-text-line-break-po-normal.html@@ -0,0 +1,76 @@+<!DOCTYPE html>+<html lang="en" >+<head>+<meta charset="utf-8"/>+<title>CSS text, linebreaks: PO AFW (normal,unknown)</title>+<link rel="author" title="Richard Ishida" href="mailto:[email protected]">+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-property">+<script src="../../../../resources/testharness.js"></script>+<script src="../../../../resources/testharnessreport.js"></script>+<meta name="assert" content="When the language is unkonwn, and line-break:normal, a browser will NOT allow a break before a PO character with East Asian Width of A, F, or W.">+<style type="text/css">+@font-face {+ font-family: 'mplus-1p-regular';+ src: url('../../../../fonts/mplus-1p-regular.woff') format('woff');+ }+#wrapper { position: relative; }+.test { color: red; }+.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 185px; padding: 0; border: 1px solid orange; line-height: 1em; }+</style>+<style>+.test { line-break: normal; }+</style>+<script>+var charlist = `00B0 DEGREE SIGN+2030 PER MILLE SIGN+2032 PRIME+2033 DOUBLE PRIME+2035 REVERSED PRIME+2103 DEGREE CELSIUS+2109 DEGREE FAHRENHEIT+FE6A SMALL PERCENT SIGN+FF05 FULLWIDTH PERCENT SIGN+FFE0 FULLWIDTH CENT SIGN`+</script>+</head>+<body>+<script>+var lines = charlist.split('\n')+var out = '<div id="log"></div>\n'+for (var i=0;i<lines.length;i++) {+ // get the data+ var firstSpace = lines[i].indexOf(' ')+ var hex = lines[i].substr(0,firstSpace)+ var name = lines[i].substr(firstSpace)+ // make a test+ out += '<div class="wrapper"><div>'+hex+'</div>' ++ '<div class="test" id="test'+i+'" lang="">文文文文文文&#x'+hex+';字<span id="testSpan'+i+'">字</span></div>' ++ '<div class="ref" id="ref'+i+'" lang="">文文文文文<br/>文&#x'+hex+';字<span id="refSpan'+i+'">字</span></div>' ++ '</div>'+ }++document.querySelector('body').innerHTML = out+setup({explicit_done: true});++document.fonts.ready.then(validate);++function validate() {+ for (i=0;i<lines.length;i++) {+ test(function() {+ assert_approx_equals(+ document.getElementById('testSpan'+i).getBoundingClientRect().left,+ document.getElementById('refSpan'+i).getBoundingClientRect().left, 1);+ // Hide successful tests.+ document.getElementById('test'+i).parentNode.style.display = 'none';+ }, lines[i]+' may NOT appear at line start if normal');+ }+ done();+}+</script>+<!--Notes:+The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.++It also creates the expected behaviour with a ref instance, using <br/>. Each line ends with a span. The test then checks whether the left edge of the span is in the same place in test and ref instance.+-->+</body>+</html>