Skip to content

Commit

Permalink
Fix DCHECK failure in AppListView::GetAppListTransitionProgress()
Browse files Browse the repository at this point in the history
Bug: 894582

Change-Id: I08b1740c9e653bb6f3aa5c57653643888d13e630
Reviewed-on: https://chromium-review.googlesource.com/c/1279239
Reviewed-by: Alex Newcomer <newcomer@chromium.org>
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599402}
  • Loading branch information
Weidong Guo authored and Commit Bot committed Oct 12, 2018
1 parent abc7788 commit 39face3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ash/app_list/views/app_list_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,12 @@ void AppListView::Layout() {
app_list_background_shield_bounds);
}

float app_list_transition_progress = GetAppListTransitionProgress();
// Translate the background shield to avoid holes left by rounded corner in
// fullscreen state.
gfx::Transform transform;
if (app_list_transition_progress >= 1 && app_list_transition_progress <= 2) {
// Translate background shield so that it ends drag at y position
// -|kAppListBackgroundRadius| when dragging between peeking and fullscreen.
transform.Translate(
0, -kAppListBackgroundRadius * (app_list_transition_progress - 1));
if (app_list_state_ == AppListViewState::FULLSCREEN_ALL_APPS ||
app_list_state_ == AppListViewState::FULLSCREEN_SEARCH) {
transform.Translate(0, -kAppListBackgroundRadius);
}
app_list_background_shield_->SetTransform(transform);
}
Expand Down

0 comments on commit 39face3

Please sign in to comment.