Commit aed202f9 authored by yiyix's avatar yiyix Committed by Commit Bot

Quick Fix Regression: Black patch is seen while opening new page

The background color of a new tab is set to the root background
color of the old tab (https://codereview.chromium.org/2737553004/).
Prior to my change, the root background color will be auto
corrected to the correct color by receiving the next CompositorFrame
(UpdateBackgroundColor is called in SubmitCompositorFrame).
However, after my change, since no new render frame metadata is
created by switching tabs, the new tab will be set with root
background color of the old tab. When we open another new tab,
the same color will carry to the new tab creation.

I have worked on rewriting the background color setting logic,
https://docs.google.com/document/d/1GLJzDVYuOsnTjysYAnCDWxUFofvxDBHtqTgYE60sEC8

I believe the complete fix requires more testing before merging to M67,
so I reverted SetRootBackgroundColor related logics in this CL.

Bug:830540

Change-Id: I6f9efaa580f4cac67b2aa3493cdcc093b92076f5
Reviewed-on: https://chromium-review.googlesource.com/1027208Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553609}
parent db9105d3
......@@ -898,6 +898,13 @@ void RenderWidgetHostViewAura::SubmitCompositorFrame(
DCHECK(delegated_frame_host_);
TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame");
// Override the background color to the current compositor background.
// This allows us to, when navigating to a new page, transfer this color to
// that page. This allows us to pass this background color to new views on
// navigation.
// TODO(yiyix): Remove this line when https://crbug.com/830540 is fixed.
UpdateBackgroundColorFromRenderer(frame.metadata.root_background_color);
delegated_frame_host_->SubmitCompositorFrame(
local_surface_id, std::move(frame), std::move(hit_test_region_list));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment