Commit 439fd0c5 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Fix crash when the immesriv mode is enabled during initialization

This is a temp fix. It looks like it's trying to reveal first when
created, but it doesn't work that way. This could be either regression,
or wrong, and I'll look into separately.

BUG=825260

Change-Id: Idc605ef9f42b48b847c3bc562ebd1d9a3a0c33c6
Reviewed-on: https://chromium-review.googlesource.com/978891
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545657}
parent 7b818885
......@@ -194,8 +194,12 @@ void HeaderView::SetShouldPaintHeader(bool paint) {
void HeaderView::OnImmersiveRevealStarted() {
fullscreen_visible_fraction_ = 0;
SetPaintToLayer();
// The immersive layer should always be top.
layer()->parent()->StackAtTop(layer());
// AppWindow may call this before being added to the widget.
// https://crbug.com/825260.
if (layer()->parent()) {
// The immersive layer should always be top.
layer()->parent()->StackAtTop(layer());
}
parent()->Layout();
}
......
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