Auto merge of #7186 - glennw:rounded-clip, r=pcwalton

Enable item clipping on normal transform layers. Fixes rounded corners on layers with 2d transforms.

Needed for #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7186)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-08-13 01:53:44 -06:00
commit c1cc2c1a27

View file

@ -1033,12 +1033,10 @@ impl<'a> Iterator for DisplayItemIterator<'a> {
impl DisplayItem { impl DisplayItem {
/// Paints this display item into the given painting context. /// Paints this display item into the given painting context.
fn draw_into_context(&self, paint_context: &mut PaintContext) { fn draw_into_context(&self, paint_context: &mut PaintContext) {
if paint_context.layer_kind == LayerKind::NoTransform { let this_clip = &self.base().clip;
let this_clip = &self.base().clip; match paint_context.transient_clip {
match paint_context.transient_clip { Some(ref transient_clip) if transient_clip == this_clip => {}
Some(ref transient_clip) if transient_clip == this_clip => {} Some(_) | None => paint_context.push_transient_clip((*this_clip).clone()),
Some(_) | None => paint_context.push_transient_clip((*this_clip).clone()),
}
} }
match *self { match *self {