Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index 83192d8c93df41d122c633fa68f89130182ba0cb..43102180c99fe1484bd1da33c9f64c6dad19e8b3 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -540,6 +540,13 @@ void View::SetPaintToLayer(ui::LayerType layer_type) { |
| DestroyLayer(); |
| CreateLayer(layer_type); |
| paint_to_layer_ = true; |
| + |
| + // Notify the parent chain about the layer change. |
| + View* view = this; |
|
sky
2017/04/17 15:24:01
View* view = parent();
and then you don't need two
ananta
2017/04/18 03:04:25
Done.
|
| + while (view && view->parent()) { |
| + view->parent()->OnChildLayerChanged(view); |
| + view = view->parent(); |
| + } |
| } |
| void View::DestroyLayer() { |
|
sky
2017/04/17 15:24:01
DestroyLayer needs to call OnChildLayerChanged too
ananta
2017/04/18 03:04:25
Done.
|