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

Issue 818350 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 829523
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Multiple flashes observed during navigation on Mac

Project Member Reported by samans@chromium.org, Mar 3 2018

Issue description

Chrome Version: Version 66.0.3359.0 (Official Build) canary (64-bit)
OS: Mac OSX 10.13.2

What steps will reproduce the problem?
(1) Open google.ca
(2) Open theverge.com
(3) Go back

What is the expected result?
No flash.

What happens instead?
Page flashes white then black when going back.
 
mac.mov
7.6 MB View Download
Cc: fsam...@chromium.org samans@chromium.org ccameron@chromium.org
Summary: Multiple flashes observed during navigation on Mac (was: Multiple flashes observed during navigation)
ccameron: Is this a new known issue? Could it be caused by surface sync?
Labels: OS-Mac
This is likely due to how we handle the question "what is to be drawn when there is no web contents" -- we keep a solid color CALayer in the background, and it is likely to be flashed up at various points (during navigation or tab switch).
Components: UI>Browser>Navigation
I can reproduce it also on macOS 10.12.6 with latest Canary 67.0.3362.0.

Comment 5 by samans@chromium.org, Mar 14 2018

Labels: -Pri-3 M-67 Pri-2
I still see this on Canary 67.0.3369.0. Any updates on this? Feel free to cc more people if you'd like to. I don't know many mac experts myself.

Comment 6 by meh...@chromium.org, Mar 14 2018

Labels: Needs-Bisect
Status: Untriaged (was: Available)
Maybe a bisect can help to find the culprit CL.

Comment 7 by meh...@chromium.org, Mar 14 2018

Labels: -Type-Bug Type-Bug-Regression
Labels: -Needs-Bisect FoundIn-66 Triaged-ET Target-66 M-66 Target-67 FoundIn-67 Needs-Triage-M66
Able to reproduce the issue on mac 10.13.3 using chrome reported version #66.0.3359.0 and latest canary #67.0.3370.0. Issue is not seen on OS-win and OS-linux.
But the issue seems to be very inconsistent in nature. Hence, it won't be possible from TE-end to provide bisect results.
Marking it as untriaged for further inputs from UI>Browser>Navigation team. Requesting someone from UI>Browser>Navigation team to please have a look into the issue.

Thanks...!!

Comment 9 by samans@chromium.org, Mar 15 2018

Labels: ReleaseBlock-Stable
I'm guessing we're swapping Viz displays on navigation?
Cc: chrishtr@chromium.org
This has nothing to do with compositing -- this has to do with  issue 470669 .

Check out the attached video, which shows CALayer borders -- you'll note that the flashed frames have no borders. This is because they don't come from web contents.

The black background flash comes from this code:
  content::RenderWidgetHostViewMac::SetBackgroundColor(
  content::RenderFrameHostManager::CommitPending(
  content::RenderFrameHostManager::CommitPendingIfNecessary(
  content::RenderFrameHostManager::DidNavigateFrame(
  content::NavigatorImpl::DidNavigate(

If we get rid of the SetBackgroundColor call in RenderFrameHostManager, then the issue goes away. I've generally not been a fan of doing this SetBackgroundColor on Mac, because Mac manages to set the background color to the theme background color, which is an "appropriate" color to flash.

I also don't know where the white flash during back-navigation comes from. It's likely coming from some NSView above the RenderWidgetHostViewMac.
flash.mov
1.6 MB View Download
Thank you for investigating! The call to SetBackgroundColor in CommitPending explains the black flash, but it's been there for about a year so I'm wondering what changed recently that caused the white flash. I thought the white comes from the background color of the page we're switching to, but I installed a black theme and now the flash is black. Maybe we always had this transition from theme color to the background color of previous RWHV but now somehow a delay is introduced between these two operations and the flash becomes visible.
Components: -UI>Browser>Navigation Internals>GPU
Status: Available (was: Untriaged)
Is this something actionable / we have resources to fix?
Friendly ping to get an update on this issue as it is marked as stable blocker.

Thanks..!
Owner: ccameron@chromium.org
Status: Assigned (was: Available)
Assigning to ccameron@ for triage.
I'm quite content to put a #if !defined(OS_MACOSX) around the line at [1] to fix this.

chrishtr, are you okay with that?

[1] https://cs.chromium.org/chromium/src/content/browser/frame_host/render_frame_host_manager.cc?rcl=7cd4a5c57fc201c927c3b2b8e63f66c64631e8a3&l=2151
I'm not really in favor of that change. Changing to theme color then the final color
is worse than retaining the old site's background, then switching to the new site's background.

Regarding the white flash, I can reproduce it on Beta M66, and on Dev 67.0.3377.1 on Mac / Retina.

However, I was unable to reproduce it on Canary 67.0.3381.0 or 67.0.3383.0. Looks like the
white flash problem has been fixed.

I'm bisecting now.

I'm very scared that that patch had any functional effects ... it wasn't supposed to!

Feels suuuuper racy.
Just a heads up, M66 Stable cut is on April 12th, 10 days away. This issue is marked as RB-Stable for 66. Please make sure to address this issue prior to stable cut. Thanks! 
I don't think this should be RBS
- it's fixed and the fix is not exactly portable
- it's fairly minor
Re #18:
> I'm not really in favor of that change. Changing to theme color then the
> final color is worse than retaining the old site's background, then switching
> to the new site's background.

The original about flashing was about users with dark themes seeing flashes -- it was not about "oh, I'm at one dark page and going to another, and I want to avoid seeing the theme background color".

We only did the hack where we save off the old background color because Aura was unable to plumb the theme color through from the browser window to the WebContentsView/RenderWidgetHostView.
The fix proposed in  issue 815187  (just keep the old contents around longer) also does seem reasonable.
Reminder: Please note that M66 Stable is only 7 days away. This bug has been marked as ReleaseBlock Stable for M66. So please take a look and appropriately address this bug. 
To reiterate #22
- I don't think this should be RBS
- If we do want to do something for 66, my suggestion is to eliminate the "save off the old color and apply it to the new page", since it's unnecessary on Mac

We have a good fix for this behavior coming in 67.
Labels: -ReleaseBlock-Stable -M-66 -Target-66 -Needs-Triage-M66
Is it not possible to merge #19 into m66?
Anyways, removing RBS per ccameron's comment.
The change from #19 is part of a long chain of patches, not a good candidate for a merge.
Mergedinto: 829523
Status: Duplicate (was: Assigned)

Sign in to add a comment