DescriptionChanges layer reparenting to happen after a window parent is changed in aura::Window::AddChild
BUG=364498
TEST=Follow steps in the bug or at https://code.google.com/p/chromium/issues/detail?id=364517. Ensure no crash.
TEST=aura_unittests --gtest_filter=WindowTest.RootWindowSetWhenReparenting
This addresses a class of crashes that happen when layers bounds are updated while the code is in child->ReparentLayers inside Window::AddChild where the window is removed from its old parent but not yet added to the new parent. GetRootWindow would return NULL causing crashes in places where we assume that (Window::IsVisible() == (Window::GetRootWindow() != NULL)).
There was a discussion about windows that are detached from the root - see here - https://codereview.chromium.org/82283002#msg12. It looks like the result of that discussion was that we should fix places where we assume that IsVisible() == (Window::GetRootWindow() != NULL). VideoDetector::MaybeNotifyObservers is one such place, NativeWidgetAura::IsMouseEventsEnabled() is another such place, there are probably many more.
This CL tries to avoid this whole class of errors by restoring the sequence in AddChild that existed before https://codereview.chromium.org/82283002.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265565
Patch Set 1 #Patch Set 2 : Changes layer reparenting to happen after a window parent is changed in aura::Window::AddChild (tes… #Patch Set 3 : Changes layer reparenting to happen after a window parent is changed (GetAncestorWithLayer timing) #
Messages
Total messages: 23 (0 generated)
|