mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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
|
@ -44,9 +44,9 @@ use std::sync::{Arc, Mutex};
|
|||
use string_cache::Atom;
|
||||
use style::{ComputedValues, TElement, TNode, cascade_anonymous};
|
||||
use style::computed_values::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use style::computed_values::{LengthOrPercentageOrNone};
|
||||
use style::computed_values::{clear, overflow_wrap, position, text_align, text_decoration};
|
||||
use style::computed_values::{vertical_align, white_space, word_break};
|
||||
use style::computed_values::{LengthOrPercentageOrNone, clear, mix_blend_mode, overflow_wrap};
|
||||
use style::computed_values::{position, text_align, text_decoration, vertical_align, white_space};
|
||||
use style::computed_values::{word_break};
|
||||
use url::Url;
|
||||
|
||||
/// Fragments (`struct Fragment`) are the leaves of the layout tree. They cannot position
|
||||
|
@ -1747,6 +1747,9 @@ impl Fragment {
|
|||
if !self.style().get_effects().filter.is_empty() {
|
||||
return true
|
||||
}
|
||||
if self.style().get_effects().mix_blend_mode != mix_blend_mode::T::normal {
|
||||
return true
|
||||
}
|
||||
match self.style().get_box().position {
|
||||
position::T::absolute | position::T::fixed => {
|
||||
// FIXME(pcwalton): This should only establish a new stacking context when
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue