layout: Implement mix-blend-mode per COMPOSITING § 3.4.1.

`background-blend-mode` is not yet supported because we don't support
multiple backgrounds yet.
This commit is contained in:
Patrick Walton 2015-01-08 13:53:17 -08:00
parent 3897547bc2
commit 97d3443003
10 changed files with 181 additions and 23 deletions

View file

@ -116,7 +116,9 @@ impl TextRunScanner {
let inherited_text_style = in_fragment.style().get_inheritedtext();
fontgroup = font_context.get_layout_font_group_for_style(font_style);
compression = match in_fragment.white_space() {
white_space::T::normal | white_space::T::nowrap => CompressionMode::CompressWhitespaceNewline,
white_space::T::normal | white_space::T::nowrap => {
CompressionMode::CompressWhitespaceNewline
}
white_space::T::pre => CompressionMode::CompressNone,
};
text_transform = inherited_text_style.text_transform;
@ -129,7 +131,9 @@ impl TextRunScanner {
let mut run_text = String::new();
for in_fragment in self.clump.iter() {
let in_fragment = match in_fragment.specific {
SpecificFragmentInfo::UnscannedText(ref text_fragment_info) => &text_fragment_info.text,
SpecificFragmentInfo::UnscannedText(ref text_fragment_info) => {
&text_fragment_info.text
}
_ => panic!("Expected an unscanned text fragment!"),
};