mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Move CSS text-shadow property from Effects to InheritedText
This commit is contained in:
parent
347cf0580c
commit
8c8090b5cd
4 changed files with 9 additions and 5 deletions
|
@ -1122,7 +1122,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
self.style().get_color().color
|
self.style().get_color().color
|
||||||
};
|
};
|
||||||
|
|
||||||
for text_shadow in self.style.get_effects().text_shadow.0.iter().rev() {
|
for text_shadow in self.style.get_inheritedtext().text_shadow.0.iter().rev() {
|
||||||
let offset = &Point2D::new(text_shadow.offset_x, text_shadow.offset_y);
|
let offset = &Point2D::new(text_shadow.offset_x, text_shadow.offset_y);
|
||||||
let color = self.style().resolve_color(text_shadow.color);
|
let color = self.style().resolve_color(text_shadow.color);
|
||||||
self.build_display_list_for_text_fragment(state,
|
self.build_display_list_for_text_fragment(state,
|
||||||
|
|
|
@ -229,7 +229,7 @@ pub fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &ServoCompute
|
||||||
get_box.z_index, get_box._servo_overflow_clip_box,
|
get_box.z_index, get_box._servo_overflow_clip_box,
|
||||||
get_inheritedtext._servo_text_decorations_in_effect,
|
get_inheritedtext._servo_text_decorations_in_effect,
|
||||||
get_pointing.cursor, get_pointing.pointer_events,
|
get_pointing.cursor, get_pointing.pointer_events,
|
||||||
get_effects.box_shadow, get_effects.clip, get_effects.text_shadow, get_effects.filter,
|
get_effects.box_shadow, get_effects.clip, get_inheritedtext.text_shadow, get_effects.filter,
|
||||||
get_effects.transform, get_effects.backface_visibility, get_effects.transform_style,
|
get_effects.transform, get_effects.backface_visibility, get_effects.transform_style,
|
||||||
get_effects.transform_origin, get_effects.perspective, get_effects.perspective_origin,
|
get_effects.transform_origin, get_effects.perspective, get_effects.perspective_origin,
|
||||||
get_effects.mix_blend_mode, get_effects.image_rendering,
|
get_effects.mix_blend_mode, get_effects.image_rendering,
|
||||||
|
|
|
@ -128,8 +128,8 @@ impl PropertyAnimation {
|
||||||
new_style.get_inheritedtext().letter_spacing.0)
|
new_style.get_inheritedtext().letter_spacing.0)
|
||||||
}
|
}
|
||||||
TransitionProperty::TextShadow => {
|
TransitionProperty::TextShadow => {
|
||||||
AnimatedProperty::TextShadow(old_style.get_effects().text_shadow.clone(),
|
AnimatedProperty::TextShadow(old_style.get_inheritedtext().text_shadow.clone(),
|
||||||
new_style.get_effects().text_shadow.clone())
|
new_style.get_inheritedtext().text_shadow.clone())
|
||||||
}
|
}
|
||||||
TransitionProperty::Transform => {
|
TransitionProperty::Transform => {
|
||||||
AnimatedProperty::Transform(old_style.get_effects().transform.clone(),
|
AnimatedProperty::Transform(old_style.get_effects().transform.clone(),
|
||||||
|
@ -276,7 +276,7 @@ impl PropertyAnimation {
|
||||||
[PaddingTop; mutate_padding; padding_top],
|
[PaddingTop; mutate_padding; padding_top],
|
||||||
[Right; mutate_positionoffsets; right],
|
[Right; mutate_positionoffsets; right],
|
||||||
[TextIndent; mutate_inheritedtext; text_indent],
|
[TextIndent; mutate_inheritedtext; text_indent],
|
||||||
[TextShadow; mutate_effects; text_shadow],
|
[TextShadow; mutate_inheritedtext; text_shadow],
|
||||||
[Top; mutate_positionoffsets; top],
|
[Top; mutate_positionoffsets; top],
|
||||||
[Transform; mutate_effects; transform],
|
[Transform; mutate_effects; transform],
|
||||||
[VerticalAlign; mutate_box; vertical_align],
|
[VerticalAlign; mutate_box; vertical_align],
|
||||||
|
|
|
@ -3161,6 +3161,8 @@ pub mod longhands {
|
||||||
}
|
}
|
||||||
</%self:longhand>
|
</%self:longhand>
|
||||||
|
|
||||||
|
${switch_to_style_struct("InheritedText")}
|
||||||
|
|
||||||
<%self:longhand name="text-shadow">
|
<%self:longhand name="text-shadow">
|
||||||
use cssparser::{self, ToCss};
|
use cssparser::{self, ToCss};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -3339,6 +3341,8 @@ pub mod longhands {
|
||||||
}
|
}
|
||||||
</%self:longhand>
|
</%self:longhand>
|
||||||
|
|
||||||
|
${switch_to_style_struct("Effects")}
|
||||||
|
|
||||||
<%self:longhand name="filter">
|
<%self:longhand name="filter">
|
||||||
//pub use self::computed_value::T as SpecifiedValue;
|
//pub use self::computed_value::T as SpecifiedValue;
|
||||||
use cssparser::ToCss;
|
use cssparser::ToCss;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue