servo: Merge #11914 - Text fragment color merge (from notriddle:text_fragment_color_merge); r=jdm

The display list item for a line of text has a single color assigned for
it, so text fragments with different colors cannot be merged.

There is no issue number for this, as far as I know. I found this while
trying an internal program that uses red asterisks for required text
fields.
____________________

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not fix an existing Github issue
- [X] There are tests for these changes OR

Source-Repo: https://github.com/servo/servo
Source-Revision: 5b20673d43dadb86bd1770da89a712f137187331
This commit is contained in:
Michael Howell
2016-06-28 22:43:07 -05:00
parent 06cb3e7b0e
commit 012c3d4570
2 changed files with 10 additions and 5 deletions

View File

@@ -949,7 +949,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// Modify the style as necessary. (See the comment in
// `properties::modify_style_for_replaced_content()`.)
let mut style = (*node.style(self.style_context())).clone();
let mut style = node.style(self.style_context()).clone();
properties::modify_style_for_replaced_content(&mut style);
// If this is generated content, then we need to initialize the accumulator with the