This came up in issue 633140 , where the bug was revealed because I started only calling SetBounds if the bounds on the Blink side changed. It seems like there's a circular dependency where the aura::Window location is positioned relative to the Widget but the Widget's location is dependent on the Window location.
Put another way, when we want to move the popup up 20px so we do this:
1. RWHVA::SetBounds called with new screen coordinates
2. Call Window::SetBounds with parent-relative coordinates y: -20px
3. Call Layer::SetBounds
4. Calls Layer::SetBoundsFromAnimation
5. Calls Window::OnWindowBoundsChanged (this is where the Window::bounds_ is actually set)
6. Calls Window observer DesktopNativeWidgetAura::OnWindowBoundsChanged
7. Calls Widget::SetBounds passing Window::GetBoundsInScreen which because of the -20px will move Widget up by 20px on the screen but the Window is still -20px relative to the Widget.
Comment 1 by robliao@chromium.org
, Sep 17