New issue
Advanced search Search tips

Issue 829918 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 3
Type: Bug-Regression



Sign in to add a comment

visibilitychange triggered when using the Chrome window's buttons

Project Member Reported by smcgruer@chromium.org, Apr 6 2018

Issue description

(Filed on behalf of user cmi@ from #chromium IRC)

Chrome Version: 66.0.3359.0 to 67.0.3391.0 (revision 548796)
OS: Windows 10 Pro (1709) 64-Bit.

What steps will reproduce the problem?
(1) Launch Chromium
(2) Open Dev Tools, javascript console
(3) Apply the script: document.addEventListener("visibilitychange", (e) => console.log("visiblity: " + document.visibilityState))
(4) Move the mouse around in the chrome (native) window and UI elements such as buttons reload, account switcher and the general Window buttons (minimize, maximize and close).

What is the expected result?

No visibilitychange events expected to be triggered, as it works in 65.0.3325.0 and previous versions.

What happens instead?

Several "visibilitychange" events are triggered when moving around in the window's native UI and over its buttons
while still having the same tab and window visible.
 
Cc: fdoray@chromium.org khushals...@chromium.org
Labels: -Type-Bug RegressedIn-67 Type-Bug-Regression
Status: Available (was: Untriaged)
Reproduced and bisected with attached test file. Note that you must open devtools for this to reproduce (then just move your mouse around on the Chrome UI):

Revision 546288 is [(g)ood/(b)ad/(r)etry/(u)nknown/(s)tdout/(q)uit]: b
You are probably looking for a change made after 546270 (known good), but no later than 546288 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/b1c46a820659e573e287dd89a4524bbc91df98d9..db5cf5c4acb1f5d2bd812ec632a60391c50b4f00

cc-ing a few people based on that list; please help if you can.

fdoray - https://chromium.googlesource.com/chromium/src/+/e616115a9b1dca27ffdf447c79b4413305c49bb4

khusalsagar - https://chromium.googlesource.com/chromium/src/+/4361dcb9a14ccbf76b21abc3c3592a905430c3b1


I was only able to reproduce in 67, so marking RegressedIn-67 as a guess.
index.html
253 bytes View Download
My patch simply added a PostTask for processing frame acks in cc. I don't think that change could cause this.
Owner: fdoray@chromium.org
Status: Assigned (was: Available)
Should be fixed on Windows by https://chromium-review.googlesource.com/c/chromium/src/+/946520

Will need to see if it happens on ChromeOS too.
Labels: OS-Linux OS-Windows
Sorry, I failed to note in #1 that I reproduced this bug locally on my Linux desktop, whilst the original reporter (cmi) used Windows.
I confirm that my CL https://chromium.googlesource.com/chromium/src/+/e616115a9b1dca27ffdf447c79b4413305c49bb4 is responsible for this. I'm investigating the issue.

Comment 6 by fdoray@chromium.org, Apr 13 2018

Status: Started (was: Assigned)
Work under review at https://chromium-review.googlesource.com/c/chromium/src/+/1010602
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a67aa878448792b3e57c219663a3965c41c953b

commit 8a67aa878448792b3e57c219663a3965c41c953b
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Apr 13 20:40:44 2018

Pause occlusion tracking when reordering native views.

Reordering native views causes multiple changes to the window tree.
This CL instantiates a ScopedPauseOcclusionTracking in
DesktopNativeWidgetAura to ensure that occlusion is recomputed after
the reordering is done rather than after each individual change.

Note: It has been discussed that occlusion should be recompute once
per frame if the window tree has changed since the last frame, rather
than in direct response to window tree changes. That would fix this
issue. However, it is a more involved change, so having this simple
fix in the meantime is still relevant. https://crbug.com/832645

Bug:  829918 , 832645
Change-Id: I043be75b53ee10683f8bd5bdbe298bdbcf54a987
Reviewed-on: https://chromium-review.googlesource.com/1010602
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550750}
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Comment 8 by fdoray@chromium.org, Apr 17 2018

Status: Fixed (was: Started)
Fixed with CL in #7.
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a67aa878448792b3e57c219663a3965c41c953b

commit 8a67aa878448792b3e57c219663a3965c41c953b
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Apr 13 20:40:44 2018

Pause occlusion tracking when reordering native views.

Reordering native views causes multiple changes to the window tree.
This CL instantiates a ScopedPauseOcclusionTracking in
DesktopNativeWidgetAura to ensure that occlusion is recomputed after
the reordering is done rather than after each individual change.

Note: It has been discussed that occlusion should be recompute once
per frame if the window tree has changed since the last frame, rather
than in direct response to window tree changes. That would fix this
issue. However, it is a more involved change, so having this simple
fix in the meantime is still relevant. https://crbug.com/832645

Bug:  829918 , 832645
Change-Id: I043be75b53ee10683f8bd5bdbe298bdbcf54a987
Reviewed-on: https://chromium-review.googlesource.com/1010602
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550750}
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Sign in to add a comment