mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
commit
c1cc2c1a27
1 changed files with 4 additions and 6 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue