Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index b6cd9d0e97f9345128f754a62f0b80e15fa2430f..3ef145ae65955ed8919eabcfc377555e43eb785c 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -821,6 +821,9 @@ void View::Paint(const ui::PaintContext& parent_context) { |
| clip_path_in_parent.offset(GetMirroredX(), y()); |
| clip_recorder.ClipPathWithAntiAliasing(clip_path_in_parent); |
| } |
| + } else { |
| + DCHECK(layer()); |
| + clip_recorder.ClipRect(GetVisibleBounds()); |
|
sky
2016/11/29 18:08:13
Is this really enough? What happens if an animatio
Evan Stade
2016/11/29 18:38:01
when the layer is moved that affects the view's tr
sky
2016/11/29 20:27:09
That's assuming you end up here, right? If the lay
|
| } |
| ui::TransformRecorder transform_recorder(context); |
| @@ -1379,10 +1382,12 @@ void View::PreferredSizeChanged() { |
| } |
| bool View::GetNeedsNotificationWhenVisibleBoundsChange() const { |
| - return false; |
| + return true; |
| } |
| void View::OnVisibleBoundsChanged() { |
| + if (layer()) |
| + SchedulePaint(); |
| } |
| // Tree operations ------------------------------------------------------------- |