mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Inherit computed value flags when inheriting computed values.
This commit is contained in:
parent
2a05c29c30
commit
86799d4d6e
2 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,11 @@ use properties::{ComputedValues, StyleBuilder};
|
|||
|
||||
bitflags! {
|
||||
/// Misc information about a given computed style.
|
||||
///
|
||||
/// All flags are currently inherited for text, pseudo elements, and
|
||||
/// anonymous boxes, see StyleBuilder::for_inheritance and its callsites.
|
||||
/// If we ever want to add some flags that shouldn't inherit for them,
|
||||
/// we might want to add a function to handle this.
|
||||
pub flags ComputedValueFlags: u8 {
|
||||
/// Whether the style or any of the ancestors has a text-decoration-line
|
||||
/// property that should get propagated to descendants.
|
||||
|
|
|
@ -2414,6 +2414,7 @@ impl<'a> StyleBuilder<'a> {
|
|||
custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
|
||||
writing_mode: WritingMode,
|
||||
font_size_keyword: Option<(longhands::font_size::KeywordSize, f32)>,
|
||||
flags: ComputedValueFlags,
|
||||
visited_style: Option<Arc<ComputedValues>>,
|
||||
) -> Self {
|
||||
StyleBuilder {
|
||||
|
@ -2422,6 +2423,7 @@ impl<'a> StyleBuilder<'a> {
|
|||
custom_properties,
|
||||
writing_mode,
|
||||
font_size_keyword,
|
||||
flags,
|
||||
visited_style,
|
||||
% for style_struct in data.active_style_structs():
|
||||
% if style_struct.inherited:
|
||||
|
@ -2452,6 +2454,7 @@ impl<'a> StyleBuilder<'a> {
|
|||
parent.custom_properties(),
|
||||
parent.writing_mode,
|
||||
parent.font_computation_data.font_size_keyword,
|
||||
parent.flags,
|
||||
parent.clone_visited_style()
|
||||
)
|
||||
}
|
||||
|
@ -2747,6 +2750,7 @@ pub fn apply_declarations<'a, F, I>(device: &Device,
|
|||
custom_properties,
|
||||
WritingMode::empty(),
|
||||
inherited_style.font_computation_data.font_size_keyword,
|
||||
ComputedValueFlags::empty(),
|
||||
visited_style,
|
||||
),
|
||||
font_metrics_provider: font_metrics_provider,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue