DescriptionEnsure View invalidates Widget::root_layers_ when LayerOwner::RecreateLayer is invoked
Adding a Layer to a subview in a Widget currently causes functions like
wm::RecreateLayers() to leave stale copies of the old layer inside the
"root layer" cache in views::Widget. This happens because views::View
doesn't have a signal when its layer changes via
LayerOwner::RecreateLayer() and so it fails to call
Widget::UpdateRootLayers().
To fix, allow LayerOwner::RecreateLayer() to be overridden by View.
While a LayerOwnerDelegate also receives a notification when
RecreateLayer() completes, View can't also be a LayerOwnerDelegate
without causing conflicts with subclasses of views::View which already
are.
BUG=546846, 391646
TEST=Updated views_unittests ViewAuraTest.RecreateLayersWithWindows
with checks that would fail prior to this fix.
Committed: https://crrev.com/e540e65b1024433c088933f558095a5e849dea25
Cr-Commit-Position: refs/heads/master@{#362535}
Patch Set 1 #Patch Set 2 : clearer test #Patch Set 3 : ordering is hard #
Total comments: 2
Patch Set 4 : Update WindowStateTest #Patch Set 5 : Update ViewAuraTest.RecreateLayersWithWindows #Patch Set 6 : Rollback ash/wm/window_state_unittest.cc - redundant now #
Messages
Total messages: 15 (8 generated)
|