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

Issue 652007 link

Starred by 5 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 640466



Sign in to add a comment

Select dropdown fade out animation pauses page thread

Reported by two...@gmail.com, Oct 1 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Steps to reproduce the problem:
1. Have an animation or anything updating on a page
2. Select something using a select element on the same page

JSFiddle: https://jsfiddle.net/kvmy8q9d/5/

What is the expected behavior?
Page does not halt when select is animating

What went wrong?
Page halts until select animation is completed

Did this work before? No 

Chrome version: 53.0.2785.116  Channel: stable
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 23.0 r0

Chrome on Linux and Windows do not halt.
Safari and Firefox on Mac also do not halt, Opera on Mac does halt.
 
Cc: rbasuvula@chromium.org
Labels: M-55
Status: Untriaged (was: Unconfirmed)
Tested the issue on Chrome Stable#53.0.2785.143, Canary 55.0.2879.0 on Mac OS X 10.12 and was able to reproduce the issue.

This is a Non-Regression issue seen from M30# 30.0.1549.0 (208818), marking the status to Untriaged so that the issue would get addressed.

Note: This is a Mac specific issue, not seen on Win and linux.
Thank You.
Components: -UI Blink>Animation
[mac triage] Reproduced this on Chrome 53.0.2785.143 OSX 10.11. Not reproducible on Safari.
Cc: ccameron@chromium.org
Components: -Blink>Animation Internals>GPU>Scheduling
Labels: Hotlist-Interop
Summary: Select dropdown fade out animation pauses page thread (was: Select element animation pauses page thread)
The fade out animation of the select drop down on Mac is done by the OS, Chrome does not perform that animation.

Attached trace, we seem to simply stop rendering frames during the ~200ms fadeout.
Screen Shot 2016-10-05 at 5.44.28 pm.png
153 KB View Download
trace_select-fadeout-mac.json.gz
2.1 MB Download
Cc: rnimmagadda@chromium.org rsesek@chromium.org
 Issue 614810  has been merged into this issue.

Comment 5 by dk...@chromium.org, Oct 24 2016

Cc: vmi...@chromium.org
+Victor can you help triage this bug to the right location?

Comment 6 by vmi...@chromium.org, Oct 24 2016

Cc: enne@chromium.org
Status: Available (was: Untriaged)
It looks like we stop getting BeginFrames in the DisplayScheduler during this time.  enne@ are you familiar with this input on Mac?

Comment 7 by enne@chromium.org, Oct 24 2016

No, I don't really know anything about it.  I'm happy to take a look after I finish looking at another regression, though.

Comment 8 by enne@chromium.org, Oct 28 2016

Cc: jcivelli@chromium.org
Labels: -Pri-2 -M-55 Pri-3
I took a brief look and I think this is more mac-specific than I can fix.  As far as I can tell, it looks like this is related to the nested message loop in https://cs.chromium.org/chromium/src/content/browser/frame_host/popup_menu_helper_mac.mm?rcl=0&l=75.

Here's a quick trace where I clicked the select box, moused around for a little bit, and then chosen an option.  I did this a few times.  It looks like events are pumped while the select box is open and I mouse around, but as soon as I pick something (or cancel), then everything freezes across all processes for 300ms or so.  However, during both the mousing around and the freezing the nested message loop is running.  So, I'm not sure where the difference is.
Screen Shot 2016-10-27 at 3.05.14 PM.png
240 KB View Download

Comment 9 by rsesek@chromium.org, Oct 28 2016

Blocking: 640466
This is because the MessageLoop gets starved. When AppKit is closing the select menu, it is spinning a runloop in a mode that does not service the MessageLoop.

This CL https://codereview.chromium.org/2118883002/diff/1/base/message_loop/message_pump_mac.mm would fix it, but it may not be something we want to land.
Blockedon: 640466
Blocking: -640466
 Issue 673284  has been merged into this issue.

Comment 12 by sdy@chromium.org, Feb 23 2017

Blocking: 640466

Comment 13 by sdy@chromium.org, Feb 23 2017

Blockedon: -640466
r470769 is in Version 60.0.3097.0 canary and mostly resolves this. There is still a brief pause, but it's much shorter.

Comment 15 by two...@gmail.com, May 18 2017

Nice work, this is almost perfect! Thank you.
Blocking: -640466
Blockedon: 640466
Project Member

Comment 18 by bugdroid1@chromium.org, Sep 20 2017

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

commit 24ab401b3662d052facf19a169f553ea9a6bf7e1
Author: Trent Apted <tapted@chromium.org>
Date: Wed Sep 20 11:34:22 2017

Re-enable listening on private runloop modes, for a whitelist.

r470769 started observing private AppKit run loop modes to keep
UI and web pages responsive while menus were fading out, but it
interacted badly with app-modal dialogs.

This re-enables r470769, but only in 3 places:
 - Web page context menus
 - Web page <select> menus
 - menus run from toolkit-views UI.

      pause briefly when either the <select> menu or the right-
      click context menu are fading out. (The main menubar and the
      Chrome app/wrench menu still cause a brief pause when dismissed).

Bug:  726200 ,  602914 , 640466, 652007
Test: https://jsfiddle.net/kvmy8q9d/5/ - the animation shouldn't
Change-Id: Idf769c1f830ccb3ddc67205acb9e86aac2ec0460
Reviewed-on: https://chromium-review.googlesource.com/647836
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503112}
[modify] https://crrev.com/24ab401b3662d052facf19a169f553ea9a6bf7e1/base/message_loop/message_pump_mac.h
[modify] https://crrev.com/24ab401b3662d052facf19a169f553ea9a6bf7e1/base/message_loop/message_pump_mac.mm
[modify] https://crrev.com/24ab401b3662d052facf19a169f553ea9a6bf7e1/base/message_loop/message_pump_mac_unittest.cc
[modify] https://crrev.com/24ab401b3662d052facf19a169f553ea9a6bf7e1/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm
[modify] https://crrev.com/24ab401b3662d052facf19a169f553ea9a6bf7e1/content/browser/renderer_host/webmenurunner_mac.mm
[modify] https://crrev.com/24ab401b3662d052facf19a169f553ea9a6bf7e1/ui/views/controls/menu/menu_runner_impl_cocoa.mm

 Issue 816446  has been merged into this issue.
Blocking: 640466
Blockedon: -640466

Sign in to add a comment