diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-03-08 21:39:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 21:39:30 -0800 |
commit | dc3b32c853d51973cea98c235e7a9ab0bd00366e (patch) | |
tree | 118114f13703d6dc59160103113f31b9f2794ee1 /components/layout/fragment.rs | |
parent | 5fe921f2ab81726dc34b0c427580f355d503f56e (diff) | |
parent | b4c50de31e466ff0c0b82b3f5523384617c8fdc8 (diff) | |
download | servo-dc3b32c853d51973cea98c235e7a9ab0bd00366e.tar.gz servo-dc3b32c853d51973cea98c235e7a9ab0bd00366e.zip |
Auto merge of #15861 - projektir:make-text-decoration-testable, r=Wafflespeanut
Make text decoration testable and do not serialize initial text-decoration-style
Servo now uses the same name for the text-decoration-line longhand property as Gecko. This was done to enable testing of the text-decoration shorthand.
The text-decoration shorthand has been fixed to not serialize initial text-decoration-style.
---
- [x ] `./mach build -d` does not report any errors
- [x ] `./mach test-tidy` does not report any errors
- [x ] These changes fix #15790
---
- [x ] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15861)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r-- | components/layout/fragment.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index b8d6e12d75d..1008c4f1a0b 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -41,7 +41,7 @@ use std::collections::LinkedList; use std::sync::{Arc, Mutex}; use style::arc_ptr_eq; use style::computed_values::{border_collapse, box_sizing, clear, color, display, mix_blend_mode}; -use style::computed_values::{overflow_wrap, overflow_x, position, text_decoration, transform}; +use style::computed_values::{overflow_wrap, overflow_x, position, text_decoration_line, transform}; use style::computed_values::{transform_style, vertical_align, white_space, word_break, z_index}; use style::computed_values::content::ContentItem; use style::logical_geometry::{Direction, LogicalMargin, LogicalRect, LogicalSize, WritingMode}; @@ -1419,15 +1419,15 @@ impl Fragment { self.style().get_color().color } - /// Returns the text decoration of this fragment, according to the style of the nearest ancestor + /// Returns the text decoration line of this fragment, according to the style of the nearest ancestor /// element. /// - /// NB: This may not be the actual text decoration, because of the override rules specified in + /// NB: This may not be the actual text decoration line, because of the override rules specified in /// CSS 2.1 § 16.3.1. Unfortunately, computing this properly doesn't really fit into Servo's /// model. Therefore, this is a best lower bound approximation, but the end result may actually /// have the various decoration flags turned on afterward. - pub fn text_decoration(&self) -> text_decoration::T { - self.style().get_text().text_decoration + pub fn text_decoration_line(&self) -> text_decoration_line::T { + self.style().get_text().text_decoration_line } /// Returns the inline-start offset from margin edge to content edge. @@ -2297,7 +2297,7 @@ impl Fragment { &SpecificFragmentInfo::UnscannedText(_)) => { // FIXME: Should probably use a whitelist of styles that can safely differ (#3165) if self.style().get_font() != other.style().get_font() || - self.text_decoration() != other.text_decoration() || + self.text_decoration_line() != other.text_decoration_line() || self.white_space() != other.white_space() || self.color() != other.color() { return false |