Ensure Mac exit fullscreen prompt is correctly placed.
Bug was uncovered by fixing another bug that caused repeated, expensive browser layouts. Because the browser wasn't constantly laying out, the "Press %^F to exit fullscreen" prompt did not have its position immediately updated on being shown, and was using a stale position calculated before the browser moved to fullscreen. This was exacerbated on Mac by the fact that showing windows is asynchronous, so while on other platforms there was a layout pass as the browser was resized to fullscreen that repositioned the window, an explicit visibility check on Mac failed and that code was never run, plus the fact that the zoom-to-fullscreen animation on the Mac is fairly slow. This CL changes the logic (on Mac only) so that the position of the "toast" bubble is updated even if the widget is not yet visible, as long as the animation is playing or has played towards the "shown" state (i.e. the value of the SlideAnimation is greater than zero). Bug: 1122467 Change-Id: I0a962b52d7a7531dc7bc77748efc82877b62d05b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2389263Reviewed-by:Avi Drissman <avi@chromium.org> Commit-Queue: Dana Fried <dfried@chromium.org> Cr-Commit-Position: refs/heads/master@{#803969}
Showing
Please register or sign in to comment