mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
3897547bc2
commit
97d3443003
10 changed files with 181 additions and 23 deletions
|
@ -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!"),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue