New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617315 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver?

Project Member Reported by sky@chromium.org, Jun 3 2016

Issue description

AFAICT:
  void OnWindowBoundsChanging(mus::Window* window,
                              const gfx::Rect& old_bounds,
                              const gfx::Rect& new_bounds) override {
    window_tree_host()->SetBounds(new_bounds);
  }

handles updating the bounds of the StubWindow, so that the call to OnBoundsChanged() in OnWindowBoundsChanged() is unnecessary:

  void OnWindowBoundsChanged(mus::Window* window,
                             const gfx::Rect& old_bounds,
                             const gfx::Rect& new_bounds) override {
    platform_window_delegate()->OnBoundsChanged(new_bounds);
  }

 
OnWindowBoundsChanging() does update bounds on StubWindow. However, the following processes are not triggered when OnWindowBoundsChanged() does not notify platform_window_delegate()->OnBoundsChanged:

1. WindowTreeHost::bounds_ isn't updated
2. WindowTreeHost observers for OnHostMoved and OnHostResized are not notified.

Bot failures on https://codereview.chromium.org/2040783002/#ps1 highlight several tests that break when we ignore these aura state flows.
Setting the bounds on StubWindow would normally trigger OnBoundsChanged() on WindowTreeHost*, but WindowTreeHostMus is not set as the delegate to the StubWindow, which is why we need to explicitly trigger the callback.

I see that this is a bit confusing. Can we look into making WTHMus a delegate to StubWindow again?
Uploaded candidate that reintroduces delegate: https://codereview.chromium.org/2040783002/#ps20001

Comment 5 by sky@chromium.org, Mar 7 2017

Status: WontFix (was: Assigned)
NativeWidgetMus has been nuked. So this is no longer relevant.

Sign in to add a comment