Skip to content

Commit

Permalink
Move CSS image-rendering property from Effects to InheritedBox
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioc committed Apr 5, 2016
1 parent b568b72 commit 4f0558e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/layout/display_list_builder.rs
Expand Up @@ -566,7 +566,7 @@ impl FragmentDisplayListBuilding for Fragment {
webrender_image: webrender_image,
image_data: image_data.map(Arc::new),
stretch_size: Size2D::new(image_size.width, image_size.height),
image_rendering: style.get_effects().image_rendering.clone(),
image_rendering: style.get_inheritedbox().image_rendering.clone(),
}), display_list_section);
}
}
Expand Down Expand Up @@ -1206,7 +1206,7 @@ impl FragmentDisplayListBuilding for Fragment {
webrender_image: WebRenderImageInfo::from_image(image),
image_data: Some(Arc::new(image.bytes.clone())),
stretch_size: stacking_relative_content_box.size,
image_rendering: self.style.get_effects().image_rendering.clone(),
image_rendering: self.style.get_inheritedbox().image_rendering.clone(),
}), DisplayListSection::Content);
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/layout/incremental.rs
Expand Up @@ -232,7 +232,7 @@ pub fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &ServoCompute
get_effects.box_shadow, get_effects.clip, get_effects.text_shadow, get_effects.filter,
get_effects.transform, get_effects.backface_visibility, get_effects.transform_style,
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_inheritedbox.image_rendering,

// Note: May require REFLOW et al. if `visibility: collapse` is implemented.
get_inheritedbox.visibility
Expand Down
2 changes: 2 additions & 0 deletions components/style/properties.mako.rs
Expand Up @@ -4270,6 +4270,8 @@ pub mod longhands {
color-burn hard-light soft-light difference exclusion hue
saturation color luminosity""")}

${switch_to_style_struct("InheritedBox")}

<%self:longhand name="image-rendering">

pub mod computed_value {
Expand Down

0 comments on commit 4f0558e

Please sign in to comment.