mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add basic support for text-align: justify
(#30807)
This also enables parsing of `text-justify` for non-legacy layout, though only None is supported (disabling justification).
This commit is contained in:
parent
0be30b30ce
commit
ccf0b739df
18 changed files with 154 additions and 417 deletions
|
@ -282,7 +282,11 @@ impl Fragment {
|
||||||
.translate(containing_block.origin.to_vector());
|
.translate(containing_block.origin.to_vector());
|
||||||
let mut baseline_origin = rect.origin.clone();
|
let mut baseline_origin = rect.origin.clone();
|
||||||
baseline_origin.y += Length::from(fragment.font_metrics.ascent);
|
baseline_origin.y += Length::from(fragment.font_metrics.ascent);
|
||||||
let glyphs = glyphs(&fragment.glyphs, baseline_origin);
|
let glyphs = glyphs(
|
||||||
|
&fragment.glyphs,
|
||||||
|
baseline_origin,
|
||||||
|
fragment.justification_adjustment,
|
||||||
|
);
|
||||||
if glyphs.is_empty() {
|
if glyphs.is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -760,6 +764,7 @@ fn rgba(color: AbsoluteColor) -> wr::ColorF {
|
||||||
fn glyphs(
|
fn glyphs(
|
||||||
glyph_runs: &[Arc<GlyphStore>],
|
glyph_runs: &[Arc<GlyphStore>],
|
||||||
mut origin: PhysicalPoint<Length>,
|
mut origin: PhysicalPoint<Length>,
|
||||||
|
justification_adjustment: Length,
|
||||||
) -> Vec<wr::GlyphInstance> {
|
) -> Vec<wr::GlyphInstance> {
|
||||||
use gfx_traits::ByteIndex;
|
use gfx_traits::ByteIndex;
|
||||||
use range::Range;
|
use range::Range;
|
||||||
|
@ -778,6 +783,8 @@ fn glyphs(
|
||||||
point,
|
point,
|
||||||
};
|
};
|
||||||
glyphs.push(glyph);
|
glyphs.push(glyph);
|
||||||
|
} else {
|
||||||
|
origin.x += justification_adjustment;
|
||||||
}
|
}
|
||||||
origin.x += Length::from(glyph.advance());
|
origin.x += Length::from(glyph.advance());
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ use style::properties::ComputedValues;
|
||||||
use style::values::computed::Length;
|
use style::values::computed::Length;
|
||||||
use style::values::generics::text::LineHeight;
|
use style::values::generics::text::LineHeight;
|
||||||
use style::values::specified::text::{TextAlignKeyword, TextDecorationLine};
|
use style::values::specified::text::{TextAlignKeyword, TextDecorationLine};
|
||||||
|
use style::values::specified::TextJustify;
|
||||||
use style::Zero;
|
use style::Zero;
|
||||||
use webrender_api::FontInstanceKey;
|
use webrender_api::FontInstanceKey;
|
||||||
use xi_unicode::{linebreak_property, LineBreakLeafIter};
|
use xi_unicode::{linebreak_property, LineBreakLeafIter};
|
||||||
|
@ -134,6 +135,9 @@ struct LineUnderConstruction {
|
||||||
/// The LineItems for the current line under construction that have already
|
/// The LineItems for the current line under construction that have already
|
||||||
/// been committed to this line.
|
/// been committed to this line.
|
||||||
line_items: Vec<LineItem>,
|
line_items: Vec<LineItem>,
|
||||||
|
|
||||||
|
/// The number of justification opportunities in this line.
|
||||||
|
justification_opportunities: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LineUnderConstruction {
|
impl LineUnderConstruction {
|
||||||
|
@ -146,6 +150,7 @@ impl LineUnderConstruction {
|
||||||
has_floats_waiting_to_be_placed: false,
|
has_floats_waiting_to_be_placed: false,
|
||||||
placement_among_floats: OnceCell::new(),
|
placement_among_floats: OnceCell::new(),
|
||||||
line_items: Vec::new(),
|
line_items: Vec::new(),
|
||||||
|
justification_opportunities: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +165,23 @@ impl LineUnderConstruction {
|
||||||
self.placement_among_floats.take();
|
self.placement_among_floats.take();
|
||||||
let _ = self.placement_among_floats.set(new_placement);
|
let _ = self.placement_among_floats.set(new_placement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Trim the trailing whitespace in this line and return the width of the whitespace trimmed.
|
||||||
|
fn trim_trailing_whitespace(&mut self) -> Length {
|
||||||
|
// From <https://www.w3.org/TR/css-text-3/#white-space-phase-2>:
|
||||||
|
// > 3. A sequence of collapsible spaces at the end of a line is removed,
|
||||||
|
// > as well as any trailing U+1680 OGHAM SPACE MARK whose white-space
|
||||||
|
// > property is normal, nowrap, or pre-line.
|
||||||
|
let mut whitespace_trimmed = Length::zero();
|
||||||
|
let mut spaces_trimmed = 0;
|
||||||
|
for item in self.line_items.iter_mut().rev() {
|
||||||
|
if !item.trim_whitespace_at_end(&mut whitespace_trimmed, &mut spaces_trimmed) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.justification_opportunities -= spaces_trimmed;
|
||||||
|
whitespace_trimmed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The current unbreakable segment under construction for an inline formatting context.
|
/// The current unbreakable segment under construction for an inline formatting context.
|
||||||
|
@ -183,6 +205,9 @@ struct UnbreakableSegmentUnderConstruction {
|
||||||
|
|
||||||
/// The inline size of any trailing whitespace in this segment.
|
/// The inline size of any trailing whitespace in this segment.
|
||||||
trailing_whitespace_size: Length,
|
trailing_whitespace_size: Length,
|
||||||
|
|
||||||
|
/// The number of justification opportunities in this unbreakable segment.
|
||||||
|
justification_opportunities: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UnbreakableSegmentUnderConstruction {
|
impl UnbreakableSegmentUnderConstruction {
|
||||||
|
@ -193,6 +218,7 @@ impl UnbreakableSegmentUnderConstruction {
|
||||||
inline_box_hierarchy_depth: None,
|
inline_box_hierarchy_depth: None,
|
||||||
has_content: false,
|
has_content: false,
|
||||||
trailing_whitespace_size: Length::zero(),
|
trailing_whitespace_size: Length::zero(),
|
||||||
|
justification_opportunities: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,6 +229,7 @@ impl UnbreakableSegmentUnderConstruction {
|
||||||
self.inline_box_hierarchy_depth = None;
|
self.inline_box_hierarchy_depth = None;
|
||||||
self.has_content = false;
|
self.has_content = false;
|
||||||
self.trailing_whitespace_size = Length::zero();
|
self.trailing_whitespace_size = Length::zero();
|
||||||
|
self.justification_opportunities = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Push a single line item to this segment. In addition, record the inline box
|
/// Push a single line item to this segment. In addition, record the inline box
|
||||||
|
@ -228,12 +255,14 @@ impl UnbreakableSegmentUnderConstruction {
|
||||||
/// This prevents whitespace from being added to the beginning of a line.
|
/// This prevents whitespace from being added to the beginning of a line.
|
||||||
fn trim_leading_whitespace(&mut self) {
|
fn trim_leading_whitespace(&mut self) {
|
||||||
let mut whitespace_trimmed = Length::zero();
|
let mut whitespace_trimmed = Length::zero();
|
||||||
|
let mut spaces_trimmed = 0;
|
||||||
for item in self.line_items.iter_mut() {
|
for item in self.line_items.iter_mut() {
|
||||||
if !item.trim_whitespace_at_start(&mut whitespace_trimmed) {
|
if !item.trim_whitespace_at_start(&mut whitespace_trimmed, &mut spaces_trimmed) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.size.inline -= whitespace_trimmed;
|
self.size.inline -= whitespace_trimmed;
|
||||||
|
self.justification_opportunities -= spaces_trimmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Prepare this segment for placement on a new and empty line. This happens when the
|
/// Prepare this segment for placement on a new and empty line. This happens when the
|
||||||
|
@ -494,29 +523,38 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn finish_last_line(&mut self) {
|
||||||
|
// We are at the end of the IFC, and we need to do a few things to make sure that
|
||||||
|
// the current segment is committed and that the final line is finished.
|
||||||
|
//
|
||||||
|
// A soft wrap opportunity makes it so the current segment is placed on a new line
|
||||||
|
// if it doesn't fit on the current line under construction.
|
||||||
|
self.process_soft_wrap_opportunity();
|
||||||
|
|
||||||
|
// `process_soft_line_wrap_opportunity` does not commit the segment to a line if
|
||||||
|
// there is no line wrapping, so this forces the segment into the current line.
|
||||||
|
self.commit_current_segment_to_line();
|
||||||
|
|
||||||
|
// This has the effect of preventing the application of `text-align: justify` to
|
||||||
|
// this line because no justification opportunities means no justification.
|
||||||
|
self.current_line.justification_opportunities = 0;
|
||||||
|
|
||||||
|
// Finally we finish the line itself and convert all of the LineItems into
|
||||||
|
// fragments.
|
||||||
|
self.finish_current_line_and_reset();
|
||||||
|
}
|
||||||
|
|
||||||
/// Finish layout of all inline boxes for the current line. This will gather all
|
/// Finish layout of all inline boxes for the current line. This will gather all
|
||||||
/// [`LineItem`]s and turn them into [`Fragment`]s, then reset the
|
/// [`LineItem`]s and turn them into [`Fragment`]s, then reset the
|
||||||
/// [`InlineFormattingContextState`] preparing it for laying out a new line.
|
/// [`InlineFormattingContextState`] preparing it for laying out a new line.
|
||||||
fn finish_current_line_and_reset(&mut self) {
|
fn finish_current_line_and_reset(&mut self) {
|
||||||
let mut line_items = std::mem::take(&mut self.current_line.line_items);
|
let whitespace_trimmed = self.current_line.trim_trailing_whitespace();
|
||||||
|
let (inline_start_position, justification_adjustment) = self
|
||||||
|
.calculate_current_line_inline_start_and_justification_adjustment(whitespace_trimmed);
|
||||||
|
|
||||||
// From <https://www.w3.org/TR/css-text-3/#white-space-phase-2>:
|
|
||||||
// > 3. A sequence of collapsible spaces at the end of a line is removed,
|
|
||||||
// > as well as any trailing U+1680 OGHAM SPACE MARK whose white-space
|
|
||||||
// > property is normal, nowrap, or pre-line.
|
|
||||||
let mut whitespace_trimmed = Length::zero();
|
|
||||||
for item in line_items.iter_mut().rev() {
|
|
||||||
if !item.trim_whitespace_at_end(&mut whitespace_trimmed) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let inline_start_position =
|
|
||||||
self.calculate_inline_start_for_current_line(self.containing_block, whitespace_trimmed);
|
|
||||||
let block_start_position = self
|
let block_start_position = self
|
||||||
.current_line
|
.current_line
|
||||||
.line_block_start_considering_placement_among_floats();
|
.line_block_start_considering_placement_among_floats();
|
||||||
|
|
||||||
let had_inline_advance =
|
let had_inline_advance =
|
||||||
self.current_line.inline_position != self.current_line.start_position.inline;
|
self.current_line.inline_position != self.current_line.start_position.inline;
|
||||||
|
|
||||||
|
@ -537,6 +575,7 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
sequential_layout_state.advance_block_position(increment);
|
sequential_layout_state.advance_block_position(increment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut line_items = std::mem::take(&mut self.current_line.line_items);
|
||||||
if self.current_line.has_floats_waiting_to_be_placed {
|
if self.current_line.has_floats_waiting_to_be_placed {
|
||||||
place_pending_floats(self, &mut line_items);
|
place_pending_floats(self, &mut line_items);
|
||||||
}
|
}
|
||||||
|
@ -547,6 +586,7 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
ifc_containing_block: self.containing_block,
|
ifc_containing_block: self.containing_block,
|
||||||
positioning_context: &mut self.positioning_context,
|
positioning_context: &mut self.positioning_context,
|
||||||
line_block_start: block_start_position,
|
line_block_start: block_start_position,
|
||||||
|
justification_adjustment,
|
||||||
};
|
};
|
||||||
|
|
||||||
let positioning_context_length = state.positioning_context.len();
|
let positioning_context_length = state.positioning_context.len();
|
||||||
|
@ -597,22 +637,24 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
|
|
||||||
/// Given the amount of whitespace trimmed from the line and taking into consideration
|
/// Given the amount of whitespace trimmed from the line and taking into consideration
|
||||||
/// the `text-align` property, calculate where the line under construction starts in
|
/// the `text-align` property, calculate where the line under construction starts in
|
||||||
/// the inline axis.
|
/// the inline axis as well as the adjustment needed for every justification opportunity
|
||||||
fn calculate_inline_start_for_current_line(
|
/// to account for `text-align: justify`.
|
||||||
|
fn calculate_current_line_inline_start_and_justification_adjustment(
|
||||||
&self,
|
&self,
|
||||||
containing_block: &ContainingBlock,
|
|
||||||
whitespace_trimmed: Length,
|
whitespace_trimmed: Length,
|
||||||
) -> Length {
|
) -> (Length, Length) {
|
||||||
enum TextAlign {
|
enum TextAlign {
|
||||||
Start,
|
Start,
|
||||||
Center,
|
Center,
|
||||||
End,
|
End,
|
||||||
}
|
}
|
||||||
let line_left_is_inline_start = containing_block
|
let line_left_is_inline_start = self
|
||||||
|
.containing_block
|
||||||
.style
|
.style
|
||||||
.writing_mode
|
.writing_mode
|
||||||
.line_left_is_inline_start();
|
.line_left_is_inline_start();
|
||||||
let text_align = match containing_block.style.clone_text_align() {
|
let text_align_keyword = self.containing_block.style.clone_text_align();
|
||||||
|
let text_align = match text_align_keyword {
|
||||||
TextAlignKeyword::Start => TextAlign::Start,
|
TextAlignKeyword::Start => TextAlign::Start,
|
||||||
TextAlignKeyword::Center => TextAlign::Center,
|
TextAlignKeyword::Center => TextAlign::Center,
|
||||||
TextAlignKeyword::End => TextAlign::End,
|
TextAlignKeyword::End => TextAlign::End,
|
||||||
|
@ -630,10 +672,7 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
TextAlign::Start
|
TextAlign::Start
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
TextAlignKeyword::Justify => {
|
TextAlignKeyword::Justify => TextAlign::Start,
|
||||||
// TODO: Add support for justfied text.
|
|
||||||
TextAlign::Start
|
|
||||||
},
|
|
||||||
TextAlignKeyword::ServoCenter |
|
TextAlignKeyword::ServoCenter |
|
||||||
TextAlignKeyword::ServoLeft |
|
TextAlignKeyword::ServoLeft |
|
||||||
TextAlignKeyword::ServoRight => {
|
TextAlignKeyword::ServoRight => {
|
||||||
|
@ -658,12 +697,29 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
// line box."
|
// line box."
|
||||||
let text_indent = self.current_line.start_position.inline;
|
let text_indent = self.current_line.start_position.inline;
|
||||||
let line_length = self.current_line.inline_position - whitespace_trimmed - text_indent;
|
let line_length = self.current_line.inline_position - whitespace_trimmed - text_indent;
|
||||||
line_start +
|
let adjusted_line_start = line_start +
|
||||||
match text_align {
|
match text_align {
|
||||||
TextAlign::Start => text_indent,
|
TextAlign::Start => text_indent,
|
||||||
TextAlign::End => (available_space - line_length).max(text_indent),
|
TextAlign::End => (available_space - line_length).max(text_indent),
|
||||||
TextAlign::Center => (available_space - line_length + text_indent) / 2.,
|
TextAlign::Center => (available_space - line_length + text_indent) / 2.,
|
||||||
}
|
};
|
||||||
|
|
||||||
|
// Calculate the justification adjustment. This is simply the remaining space on the line,
|
||||||
|
// dividided by the number of justficiation opportunities that we recorded when building
|
||||||
|
// the line.
|
||||||
|
let num_justification_opportunities = self.current_line.justification_opportunities as f32;
|
||||||
|
let text_justify = self.containing_block.style.clone_text_justify();
|
||||||
|
let justification_adjustment = match (text_align_keyword, text_justify) {
|
||||||
|
// `text-justify: none` should disable text justification.
|
||||||
|
// TODO: Handle more `text-justify` values.
|
||||||
|
(TextAlignKeyword::Justify, TextJustify::None) => Length::zero(),
|
||||||
|
(TextAlignKeyword::Justify, _) if num_justification_opportunities > 0. => {
|
||||||
|
(available_space - line_length) / num_justification_opportunities
|
||||||
|
},
|
||||||
|
_ => Length::zero(),
|
||||||
|
};
|
||||||
|
|
||||||
|
(adjusted_line_start, justification_adjustment)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn place_float_fragment(&mut self, fragment: &mut BoxFragment) {
|
fn place_float_fragment(&mut self, fragment: &mut BoxFragment) {
|
||||||
|
@ -908,6 +964,10 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
self.current_line_segment.trailing_whitespace_size = inline_advance;
|
self.current_line_segment.trailing_whitespace_size = inline_advance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if glyph_store.is_whitespace() {
|
||||||
|
self.current_line_segment.justification_opportunities += 1;
|
||||||
|
}
|
||||||
|
|
||||||
match self.current_line_segment.line_items.last_mut() {
|
match self.current_line_segment.line_items.last_mut() {
|
||||||
Some(LineItem::TextRun(text_run)) => {
|
Some(LineItem::TextRun(text_run)) => {
|
||||||
debug_assert!(font_key == text_run.font_key);
|
debug_assert!(font_key == text_run.font_key);
|
||||||
|
@ -1012,6 +1072,8 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
self.current_line.max_block_size = self
|
self.current_line.max_block_size = self
|
||||||
.current_line_max_block_size()
|
.current_line_max_block_size()
|
||||||
.max(self.current_line_segment.size.block);
|
.max(self.current_line_segment.size.block);
|
||||||
|
self.current_line.justification_opportunities +=
|
||||||
|
self.current_line_segment.justification_opportunities;
|
||||||
let line_inline_size_without_trailing_whitespace =
|
let line_inline_size_without_trailing_whitespace =
|
||||||
self.current_line.inline_position - self.current_line_segment.trailing_whitespace_size;
|
self.current_line.inline_position - self.current_line_segment.trailing_whitespace_size;
|
||||||
|
|
||||||
|
@ -1334,20 +1396,7 @@ impl InlineFormattingContext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are at the end of the IFC, and we need to do a few things to make sure that
|
ifc.finish_last_line();
|
||||||
// the current segment is committed and that the final line is finished.
|
|
||||||
//
|
|
||||||
// A soft wrap opportunity makes it so the current segment is placed on a new line
|
|
||||||
// if it doesn't fit on the current line under construction.
|
|
||||||
ifc.process_soft_wrap_opportunity();
|
|
||||||
|
|
||||||
// `process_soft_line_wrap_opportunity` does not commit the segment to a line if
|
|
||||||
// there is no line wrapping, so this forces the segment into the current line.
|
|
||||||
ifc.commit_current_segment_to_line();
|
|
||||||
|
|
||||||
// Finally we finish the line itself and convert all of the LineItems into
|
|
||||||
// fragments.
|
|
||||||
ifc.finish_current_line_and_reset();
|
|
||||||
|
|
||||||
let mut collapsible_margins_in_children = CollapsedBlockMargins::zero();
|
let mut collapsible_margins_in_children = CollapsedBlockMargins::zero();
|
||||||
let content_block_size = ifc.current_line.start_position.block;
|
let content_block_size = ifc.current_line.start_position.block;
|
||||||
|
@ -1818,6 +1867,10 @@ struct LineItemLayoutState<'a> {
|
||||||
ifc_containing_block: &'a ContainingBlock<'a>,
|
ifc_containing_block: &'a ContainingBlock<'a>,
|
||||||
positioning_context: &'a mut PositioningContext,
|
positioning_context: &'a mut PositioningContext,
|
||||||
line_block_start: Length,
|
line_block_start: Length,
|
||||||
|
|
||||||
|
/// The amount of space to add to each justification opportunity in order to implement
|
||||||
|
/// `text-align: justify`.
|
||||||
|
justification_adjustment: Length,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn layout_line_items(
|
fn layout_line_items(
|
||||||
|
@ -1882,9 +1935,15 @@ enum LineItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LineItem {
|
impl LineItem {
|
||||||
fn trim_whitespace_at_end(&mut self, whitespace_trimmed: &mut Length) -> bool {
|
fn trim_whitespace_at_end(
|
||||||
|
&mut self,
|
||||||
|
whitespace_trimmed: &mut Length,
|
||||||
|
spaces_trimmed: &mut usize,
|
||||||
|
) -> bool {
|
||||||
match self {
|
match self {
|
||||||
LineItem::TextRun(ref mut item) => item.trim_whitespace_at_end(whitespace_trimmed),
|
LineItem::TextRun(ref mut item) => {
|
||||||
|
item.trim_whitespace_at_end(whitespace_trimmed, spaces_trimmed)
|
||||||
|
},
|
||||||
LineItem::StartInlineBox(_) => true,
|
LineItem::StartInlineBox(_) => true,
|
||||||
LineItem::EndInlineBox => true,
|
LineItem::EndInlineBox => true,
|
||||||
LineItem::Atomic(_) => false,
|
LineItem::Atomic(_) => false,
|
||||||
|
@ -1893,9 +1952,15 @@ impl LineItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trim_whitespace_at_start(&mut self, whitespace_trimmed: &mut Length) -> bool {
|
fn trim_whitespace_at_start(
|
||||||
|
&mut self,
|
||||||
|
whitespace_trimmed: &mut Length,
|
||||||
|
spaces_trimmed: &mut usize,
|
||||||
|
) -> bool {
|
||||||
match self {
|
match self {
|
||||||
LineItem::TextRun(ref mut item) => item.trim_whitespace_at_start(whitespace_trimmed),
|
LineItem::TextRun(ref mut item) => {
|
||||||
|
item.trim_whitespace_at_start(whitespace_trimmed, spaces_trimmed)
|
||||||
|
},
|
||||||
LineItem::StartInlineBox(_) => true,
|
LineItem::StartInlineBox(_) => true,
|
||||||
LineItem::EndInlineBox => true,
|
LineItem::EndInlineBox => true,
|
||||||
LineItem::Atomic(_) => false,
|
LineItem::Atomic(_) => false,
|
||||||
|
@ -1968,7 +2033,11 @@ fn line_height_from_style(layout_context: &LayoutContext, style: &ComputedValues
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TextRunLineItem {
|
impl TextRunLineItem {
|
||||||
fn trim_whitespace_at_end(&mut self, whitespace_trimmed: &mut Length) -> bool {
|
fn trim_whitespace_at_end(
|
||||||
|
&mut self,
|
||||||
|
whitespace_trimmed: &mut Length,
|
||||||
|
spaces_trimmed: &mut usize,
|
||||||
|
) -> bool {
|
||||||
if self
|
if self
|
||||||
.parent_style
|
.parent_style
|
||||||
.get_inherited_text()
|
.get_inherited_text()
|
||||||
|
@ -1986,6 +2055,7 @@ impl TextRunLineItem {
|
||||||
.map(|offset_from_end| self.text.len() - offset_from_end);
|
.map(|offset_from_end| self.text.len() - offset_from_end);
|
||||||
|
|
||||||
let first_whitespace_index = index_of_last_non_whitespace.unwrap_or(0);
|
let first_whitespace_index = index_of_last_non_whitespace.unwrap_or(0);
|
||||||
|
*spaces_trimmed += self.text.len() - first_whitespace_index;
|
||||||
*whitespace_trimmed += self
|
*whitespace_trimmed += self
|
||||||
.text
|
.text
|
||||||
.drain(first_whitespace_index..)
|
.drain(first_whitespace_index..)
|
||||||
|
@ -1996,7 +2066,11 @@ impl TextRunLineItem {
|
||||||
index_of_last_non_whitespace.is_none()
|
index_of_last_non_whitespace.is_none()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trim_whitespace_at_start(&mut self, whitespace_trimmed: &mut Length) -> bool {
|
fn trim_whitespace_at_start(
|
||||||
|
&mut self,
|
||||||
|
whitespace_trimmed: &mut Length,
|
||||||
|
spaces_trimmed: &mut usize,
|
||||||
|
) -> bool {
|
||||||
if self
|
if self
|
||||||
.parent_style
|
.parent_style
|
||||||
.get_inherited_text()
|
.get_inherited_text()
|
||||||
|
@ -2011,6 +2085,8 @@ impl TextRunLineItem {
|
||||||
.iter()
|
.iter()
|
||||||
.position(|glyph| !glyph.is_whitespace())
|
.position(|glyph| !glyph.is_whitespace())
|
||||||
.unwrap_or(self.text.len());
|
.unwrap_or(self.text.len());
|
||||||
|
|
||||||
|
*spaces_trimmed += index_of_first_non_whitespace;
|
||||||
*whitespace_trimmed += self
|
*whitespace_trimmed += self
|
||||||
.text
|
.text
|
||||||
.drain(0..index_of_first_non_whitespace)
|
.drain(0..index_of_first_non_whitespace)
|
||||||
|
@ -2030,11 +2106,23 @@ impl TextRunLineItem {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
let inline_advance: Length = self
|
let mut number_of_justification_opportunities = 0;
|
||||||
|
let mut inline_advance: Length = self
|
||||||
.text
|
.text
|
||||||
.iter()
|
.iter()
|
||||||
.map(|glyph_store| Length::from(glyph_store.total_advance()))
|
.map(|glyph_store| {
|
||||||
|
if glyph_store.is_whitespace() {
|
||||||
|
number_of_justification_opportunities += 1
|
||||||
|
}
|
||||||
|
Length::from(glyph_store.total_advance())
|
||||||
|
})
|
||||||
.sum();
|
.sum();
|
||||||
|
|
||||||
|
if !state.justification_adjustment.is_zero() {
|
||||||
|
inline_advance +=
|
||||||
|
state.justification_adjustment * number_of_justification_opportunities as f32;
|
||||||
|
}
|
||||||
|
|
||||||
let rect = LogicalRect {
|
let rect = LogicalRect {
|
||||||
start_corner: LogicalVec2 {
|
start_corner: LogicalVec2 {
|
||||||
block: Length::zero(),
|
block: Length::zero(),
|
||||||
|
@ -2055,6 +2143,7 @@ impl TextRunLineItem {
|
||||||
font_key: self.font_key,
|
font_key: self.font_key,
|
||||||
glyphs: self.text,
|
glyphs: self.text,
|
||||||
text_decoration_line: self.text_decoration_line,
|
text_decoration_line: self.text_decoration_line,
|
||||||
|
justification_adjustment: state.justification_adjustment,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2115,6 +2204,7 @@ impl InlineBoxLineItem {
|
||||||
ifc_containing_block: state.ifc_containing_block,
|
ifc_containing_block: state.ifc_containing_block,
|
||||||
positioning_context: nested_positioning_context,
|
positioning_context: nested_positioning_context,
|
||||||
line_block_start: state.line_block_start,
|
line_block_start: state.line_block_start,
|
||||||
|
justification_adjustment: state.justification_adjustment,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut saw_end = false;
|
let mut saw_end = false;
|
||||||
|
|
|
@ -85,8 +85,12 @@ pub(crate) struct TextFragment {
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing)]
|
||||||
pub font_key: FontInstanceKey,
|
pub font_key: FontInstanceKey,
|
||||||
pub glyphs: Vec<Arc<GlyphStore>>,
|
pub glyphs: Vec<Arc<GlyphStore>>,
|
||||||
|
|
||||||
/// A flag that represents the _used_ value of the text-decoration property.
|
/// A flag that represents the _used_ value of the text-decoration property.
|
||||||
pub text_decoration_line: TextDecorationLine,
|
pub text_decoration_line: TextDecorationLine,
|
||||||
|
|
||||||
|
/// Extra space to add for each justification opportunity.
|
||||||
|
pub justification_adjustment: Length,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
|
|
@ -102,7 +102,6 @@ ${helpers.predefined_type(
|
||||||
"TextJustify",
|
"TextJustify",
|
||||||
"computed::TextJustify::Auto",
|
"computed::TextJustify::Auto",
|
||||||
engines="gecko servo",
|
engines="gecko servo",
|
||||||
servo_pref="layout.legacy_layout",
|
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
spec="https://drafts.csswg.org/css-text/#propdef-text-justify",
|
spec="https://drafts.csswg.org/css-text/#propdef-text-justify",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[text-align-white-space-002.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[word-spacing-justify-001.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -35,9 +35,6 @@
|
||||||
[Property text-align-last inherits]
|
[Property text-align-last inherits]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Property text-justify inherits]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Property text-wrap has initial value wrap]
|
[Property text-wrap has initial value wrap]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -50,9 +47,6 @@
|
||||||
[Property overflow-wrap inherits]
|
[Property overflow-wrap inherits]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Property text-justify has initial value auto]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Property text-transform has initial value none]
|
[Property text-transform has initial value none]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[text-justify-computed-legacy.html]
|
|
||||||
[Property text-justify value 'distribute']
|
|
||||||
expected: FAIL
|
|
|
@ -1,12 +0,0 @@
|
||||||
[text-justify-computed.html]
|
|
||||||
[Property text-justify value 'auto']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Property text-justify value 'none']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Property text-justify value 'inter-word']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Property text-justify value 'inter-character']
|
|
||||||
expected: FAIL
|
|
|
@ -1,12 +0,0 @@
|
||||||
[text-justify-valid.html]
|
|
||||||
[e.style['text-justify'\] = "auto" should set the property value]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[e.style['text-justify'\] = "none" should set the property value]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[e.style['text-justify'\] = "inter-word" should set the property value]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[e.style['text-justify'\] = "inter-character" should set the property value]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[text-align-justify-002.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[text-align-justify-004.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[text-align-justify-006.html]
|
|
||||||
expected: FAIL
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[text-align-justify-tabs-001.html]
|
||||||
|
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
||||||
[distribute-alias.tentative.html]
|
|
||||||
[text-justify: distribute is a parse-time alias of inter-character]
|
|
||||||
expected: FAIL
|
|
|
@ -1,22 +1,4 @@
|
||||||
[text-justify-interpolation.html]
|
[text-justify-interpolation.html]
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (-0.3) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (0) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (0.3) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (-0.3) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (0) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (0.3) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Animations: property <text-justify> from [auto\] to [inter-word\] at (-0.3) should be [auto\]]
|
[Web Animations: property <text-justify> from [auto\] to [inter-word\] at (-0.3) should be [auto\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -38,69 +20,6 @@
|
||||||
[Web Animations: property <text-justify> from [auto\] to [inter-word\] at (1.5) should be [inter-word\]]
|
[Web Animations: property <text-justify> from [auto\] to [inter-word\] at (1.5) should be [inter-word\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (0) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (0.3) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (0.5) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (0.6) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (1) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (1.5) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (0) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (0.3) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (0.5) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (0.6) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (1) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-character\] at (1.5) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [auto\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (0) should be [auto\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (0.3) should be [auto\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (0.5) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (0.6) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (1) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-character\] at (1.5) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Animations: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [auto\]]
|
[Web Animations: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [auto\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -122,69 +41,6 @@
|
||||||
[Web Animations: property <text-justify> from [auto\] to [inter-character\] at (1.5) should be [inter-character\]]
|
[Web Animations: property <text-justify> from [auto\] to [inter-character\] at (1.5) should be [inter-character\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (-0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (0) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (0.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (0.6) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (1) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-character\] to [distribute\] at (1.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (-0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (0) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (0.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (0.6) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (1) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-character\] to [distribute\] at (1.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (-0.3) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (0) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (0.3) should be [inter-character\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (0.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (0.6) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (1) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-character\] to [distribute\] at (1.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Animations: property <text-justify> from [inter-character\] to [distribute\] at (-0.3) should be [inter-character\]]
|
[Web Animations: property <text-justify> from [inter-character\] to [distribute\] at (-0.3) should be [inter-character\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -206,69 +62,6 @@
|
||||||
[Web Animations: property <text-justify> from [inter-character\] to [distribute\] at (1.5) should be [distribute\]]
|
[Web Animations: property <text-justify> from [inter-character\] to [distribute\] at (1.5) should be [distribute\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (-0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (0) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (0.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (0.6) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (1) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [inter-word\] to [distribute\] at (1.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (-0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (0) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (0.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (0.6) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (1) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [inter-word\] to [distribute\] at (1.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (-0.3) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (0) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (0.3) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (0.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (0.6) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (1) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [inter-word\] to [distribute\] at (1.5) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Animations: property <text-justify> from [inter-word\] to [distribute\] at (-0.3) should be [inter-word\]]
|
[Web Animations: property <text-justify> from [inter-word\] to [distribute\] at (-0.3) should be [inter-word\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -290,69 +83,6 @@
|
||||||
[Web Animations: property <text-justify> from [inter-word\] to [distribute\] at (1.5) should be [distribute\]]
|
[Web Animations: property <text-justify> from [inter-word\] to [distribute\] at (1.5) should be [distribute\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (-0.3) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (0) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (0.3) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (0.5) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (0.6) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (1) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [distribute\] to [none\] at (1.5) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (-0.3) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (0) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (0.3) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (0.5) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (0.6) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (1) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [distribute\] to [none\] at (1.5) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (-0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (0) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (0.3) should be [distribute\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (0.5) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (0.6) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (1) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [distribute\] to [none\] at (1.5) should be [none\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Animations: property <text-justify> from [distribute\] to [none\] at (-0.3) should be [distribute\]]
|
[Web Animations: property <text-justify> from [distribute\] to [none\] at (-0.3) should be [distribute\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -383,51 +113,6 @@
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (0.3) should be [auto\]]
|
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (0.3) should be [auto\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (0.5) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (0.6) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (1) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-word\] at (1.5) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (0.5) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (0.6) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (1) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions with transition: all: property <text-justify> from [auto\] to [inter-word\] at (1.5) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (-0.3) should be [auto\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (0) should be [auto\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (0.3) should be [auto\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (0.5) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (0.6) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (1) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Animations: property <text-justify> from [auto\] to [inter-word\] at (1.5) should be [inter-word\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [auto\]]
|
[CSS Transitions: property <text-justify> from [auto\] to [inter-character\] at (-0.3) should be [auto\]]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[text_align_complex_a.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[text_align_justify_a.html]
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue