New issue
Advanced search Search tips

Issue 674270 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Split WindowObserver::OnWindowVisibilityChanged into different functions

Project Member Reported by sky@chromium.org, Dec 14 2016

Issue description

OnWindowVisibilityChanged() is sent in two distinct cases:
. when the visibility of the window the observer was added to changes.
. when the visibility of an ancestor of (or descendant) changes.

It's extremely easy to miss the latter and leads to subtle bugs. To make this more obvious we should introduce explicit functions for the latter case, problem:

OnWindowVisibilityOfAncestorChanged();
OnWindowVisibilityOfDescendantChanged();

Or pass in a parameter to OnWindowVisibilityChanged() indicating the relation. Either one makes it more obvious when the function is called.
 

Comment 1 by msw@chromium.org, Dec 14 2016

Which would be called when the window itself changes visibility?
(I guess it'd be OnWindowVisibilityOfAncestorChanged, but it's not obvious)

Comment 2 by sky@chromium.org, Dec 14 2016

Maybe keeping a single function but adding a parameter would be clearest?
Status: Archived (was: Untriaged)
Archiving old bugs that haven't been actively assigned in over a year.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Archiving old bugs that haven't been actively assigned in over a year.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Sign in to add a comment