Index: ui/wm/core/window_util.cc |
diff --git a/ui/wm/core/window_util.cc b/ui/wm/core/window_util.cc |
index 07723511c841a3fd3c58726520c205064cc1c062..bdfaee5981c440c4c335dd000f6ec044b9393cef 100644 |
--- a/ui/wm/core/window_util.cc |
+++ b/ui/wm/core/window_util.cc |
@@ -28,7 +28,7 @@ void CloneChildren(ui::Layer* to_clone, |
if (old_layer) { |
if (factory && owner->layer()->delegate()) |
old_layer->set_delegate( |
- factory->CreateDelegate(owner->layer()->delegate())); |
+ factory->CreateDelegate(old_layer, owner->layer())); |
parent->Add(old_layer); |
// RecreateLayer() moves the existing children to the new layer. Create a |
// copy of those. |
@@ -91,10 +91,9 @@ std::unique_ptr<ui::LayerTreeOwner> RecreateLayers( |
std::unique_ptr<ui::LayerTreeOwner> old_layer( |
new ui::LayerTreeOwner(root->RecreateLayer().release())); |
if (old_layer->root()) { |
- if (factory) { |
sky
2016/08/23 17:15:07
optional: personally I would leave the {} here as
Evan Stade
2016/08/29 23:51:54
oops, this was not intentional
|
+ if (factory) |
old_layer->root()->set_delegate( |
- factory->CreateDelegate(root->layer()->delegate())); |
- } |
+ factory->CreateDelegate(old_layer->root(), root->layer())); |
CloneChildren(root->layer(), old_layer->root(), factory); |
} |
return old_layer; |