mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Factor out ClipRect type into values; use Either for clip
MozReview-Commit-ID: C3R1erJdiID
This commit is contained in:
parent
8b7bb97aa9
commit
6b0d3902de
10 changed files with 223 additions and 238 deletions
|
@ -1589,7 +1589,7 @@ impl ComputedValues {
|
|||
// TODO(gw): Add clip-path, isolation, mask-image, mask-border-source when supported.
|
||||
if effects.opacity < 1.0 ||
|
||||
!effects.filter.is_empty() ||
|
||||
effects.clip.0.is_some() {
|
||||
!effects.clip.is_auto() {
|
||||
effects.mix_blend_mode != mix_blend_mode::T::normal ||
|
||||
return transform_style::T::flat;
|
||||
}
|
||||
|
@ -2290,10 +2290,10 @@ pub fn modify_style_for_text(style: &mut Arc<ComputedValues>) {
|
|||
/// doesn't clip its children.
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn modify_style_for_inline_absolute_hypothetical_fragment(style: &mut Arc<ComputedValues>) {
|
||||
if style.get_effects().clip.0.is_some() {
|
||||
if !style.get_effects().clip.is_auto() {
|
||||
let mut style = Arc::make_mut(style);
|
||||
let effects_style = Arc::make_mut(&mut style.effects);
|
||||
effects_style.clip.0 = None
|
||||
effects_style.clip = Either::auto()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue