From 347cf0580c07b9e6c1c225cf545084e8177d376b Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Mon, 4 Apr 2016 22:46:43 -0300 Subject: [PATCH] Move CSS text-overflow property from InheritedText to Text --- components/layout/incremental.rs | 2 +- components/layout/inline.rs | 2 +- components/style/properties.mako.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs index df63fa43af4..a647a7a7104 100644 --- a/components/layout/incremental.rs +++ b/components/layout/incremental.rs @@ -185,7 +185,7 @@ pub fn compute_damage(old: Option<&Arc>, new: &ServoCompute get_inheritedtext.letter_spacing, get_inheritedtext.text_rendering, get_inheritedtext.text_transform, get_inheritedtext.word_spacing, get_inheritedtext.overflow_wrap, get_inheritedtext.text_justify, - get_inheritedtext.white_space, get_inheritedtext.word_break, get_inheritedtext.text_overflow, + get_inheritedtext.white_space, get_inheritedtext.word_break, get_text.text_overflow, get_font.font_family, get_font.font_style, get_font.font_variant, get_font.font_weight, get_font.font_size, get_font.font_stretch, get_inheritedbox.direction, get_inheritedbox.writing_mode, diff --git a/components/layout/inline.rs b/components/layout/inline.rs index c0e209d5f78..1e4dd0ae0ae 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -671,7 +671,7 @@ impl LineBreaker { let mut need_ellipsis = false; let available_inline_size = self.pending_line.green_zone.inline - self.pending_line.bounds.size.inline - indentation; - match (fragment.style().get_inheritedtext().text_overflow, + match (fragment.style().get_text().text_overflow, fragment.style().get_box().overflow_x) { (text_overflow::T::clip, _) | (_, overflow_x::T::visible) => {} (text_overflow::T::ellipsis, _) => { diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 0b9dcd11217..59f0b1c3e57 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -2162,8 +2162,6 @@ pub mod longhands { // TODO(pcwalton): Support `word-break: keep-all` once we have better CJK support. ${single_keyword("word-break", "normal break-all")} - ${single_keyword("text-overflow", "clip ellipsis")} - // TODO(pcwalton): Support `text-justify: distribute`. ${single_keyword("text-justify", "auto none inter-word")} @@ -2172,6 +2170,8 @@ pub mod longhands { Method("has_overline", "bool"), Method("has_line_through", "bool")])} + ${single_keyword("text-overflow", "clip ellipsis")} + ${single_keyword("unicode-bidi", "normal embed isolate bidi-override isolate-override plaintext")} <%self:longhand name="text-decoration" custom_cascade="True">